Text: Add Templates to Text

Created on 6 Nov 2019  Â·  7Comments  Â·  Source: nextcloud/text

Problem

Often, I create the same type of documents, e.g. meeting minutes or agendas. The structure of these documents is always the same.

Solution

How about adding a „Template Section“?

  • Allow users to create new templates for commonly used types of documents
  • Allow sharing of templates
  • Allow users to create new text documents from a template

Of course, today it's already possible to copy an *.md-file, but with templating I prefer a more assistive way.

What a template can do

  • Define a structure for a type of document, that is not editable. So you can ensure that all necessary information has been added to the document.
  • Add some placeholder texts that assist users what to write.
enhancement

Most helpful comment

Templates definitely make sense to me, the question would be how we integrate them design-wise. Just showing a template picker when creating the file feels a bit to present to me. Any good idea how to integrate a template picker in a less present way @nextcloud/designers

All 7 comments

Templates definitely make sense to me, the question would be how we integrate them design-wise. Just showing a template picker when creating the file feels a bit to present to me. Any good idea how to integrate a template picker in a less present way @nextcloud/designers

So, what we actually need in my opinion are three different views and and a discussion about how to design them. I've written down my first ideas:

1. Create / Edit / Delete / Share templates (Overview)
We need a view containing all the templates, a user has created or has access to. From there, we need features like CREATE (Add a new template), EDIT (edit an already existing template), DELETE (a template) and SHARE (a template).

But where to put the button / link to such a page? Possible solutions might be:

  1. Create a new app icon for Nextcloud Text, that directs a user to a template overview.
  2. Make it an „Admin only“ feature and add it to the administrative settings.

2. Template Generator
This is the place, where users create their own templates. It might be a view looking quite similar like the „normal“ text editor, but with some exceptions:

  • Offer „locking“ of some lines (e.g. headings), so when using the template it's not possible to change the structure.
  • Add placeholders with instructions instead of adding normal text.

(The tiptap team implemented such a placeholder feature.)

3. Create a new document from a template
Finally, some ideas regarding @juliushaertl s initial question: I share your concern, that a picker would not be the best solution, so here are some other approaches that came into my mind:

  • Add an „Use Template“ button at the top of the editor.
  • Save a default template on a per-folder basis. Might be a proper solution if the same type of document should be stored in a folder.
  • Simply add a „New Textdocument from Template“ entry

What do you think?

@nicostuhlfauth do you have any screenshots of how established solutions like Dropbox Paper or Google Docs handle this? It would help a lot in coming up with a solution which is user friendly. :)

@jancborchardt If they have not changed it, Google offers custom templates only for paying G Suite customers. I will take a look at Dropbox paper's solution and create some basic mockups during the next few days.

@jancborchardt Collabora already offers to choose between templates.

When you click on the plus, once you choose the filename, you get a modal with each template in a preview mode.

I think it is already really good :)

We had some plans in the past to make template handling more unified in the server, so this would be something I'd love to tackle first before introducing another templating mechanism in an app: https://github.com/nextcloud/server/issues/22426

@juliushaertl Yes. I agree. I think when a new file is created with the (+) button an overview of compatible templates should be shown to choose from. The templates should be stored in a 'templates' folder in the root. So this would work for all kind of different apps an mime types.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobiasKaminsky picture tobiasKaminsky  Â·  4Comments

Klakla2 picture Klakla2  Â·  5Comments

juliushaertl picture juliushaertl  Â·  3Comments

andynd picture andynd  Â·  3Comments

jancborchardt picture jancborchardt  Â·  3Comments