Skip to content

Template system #2

@mkh-user

Description

@mkh-user

Feature Summary

Introduce a modular template system that allows users to define reusable contents for creating new files.

Motivation

Manually copying content is error-prone and inefficient. A template system will improve productivity, ensure consistency, and reduce onboarding time for new users.

Proposed Design

  • Introduce a user://templates/ directory to store reusable file templates.
  • Each template can include placeholders like {{filename}}, {{author}}, {{date}}, {{license}}, etc.
  • "New With Template" MultiActionScript (Like Recent Files)
  • "Save As Template" ActionScript
  • "Template Manager" ActionScript and window
  • Provide an interactive popup to fill placeholders. (We need this in Snippets #56 too)
  • Support both built-in and user-defined templates.

Acceptance Criteria

  • Users can see, edit or remove templates in "Template Manager".
  • Users can generate a new file from a selected template.
  • Placeholder values are correctly replaced during generation.
  • Users can disable placeholder completion to fill them later.
  • A "New With Template" submenu in File menu with items loaded from user://templates/ and res://templates/. (submenu item is currently available)
  • Users can use "Save As Template" to save new templates and select name for templates.
  • Documentation includes usage examples and template creation guidelines.

Related Issues / Discussions

Implementation Notes (Optional)

  • Keep templates text files, not converted files to target file type.

Localization & Accessibility

Nothing

Community Feedback (Optional)

Nothing

Metadata

Metadata

Assignees

Labels

feature: TemplatesProvides reusable templates for faster setup or content generation

Projects

Status

Completed

Relationships

None yet

Development

No branches or pull requests

Issue actions