Q: Can TextEdit have Templates?

Discussion in 'Mac Apps and Mac App Store' started by mmcrider, Jan 22, 2008.

  1. mmcrider macrumors newbie

    Jan 22, 2008
    If one were to open an iWork Pages Template, enter some text, and then save by hitting the command-s quick key, a save dialog would then open asking for a name.

    Can TextEdit work similarly or be made to work similarly?

    Here's my application: I review lots of agreements and there are important points I need to extract in order to do my work. I don't want to go hunting through the entire agreement to find these points. So, what I used to do in Windows is have template with some 'fields', which were nothing more than words with a colon after it. I would "fill" out this form and save it. Then, whenever I needed to know what was in the agreement, I would just open up this document.

    I don't need fancy word processor functions for this. Just text.

    Of course, I could make a 'template' myself by just opening a TextEdit 'document' and typing in the 'fields' and saving with the name, Template.txt. But, if I were to open this and begin working and then hit command-s, I would not be asked to enter a filename, but instead, Template.txt would be over-written with the new text.

    If this isn't a native function, is there anyway this could be applied? Or, do you know of any other Text editor for Mac that would already have this functionality.


  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    TextEdit has no support for templates. As you note you can set up something similar yourself with the worry of overwriting the template file. I think you can easily work around this: if you create the template then set the file to be read-only then when you try and save it TextEdit should ask you for a new file name.

    Note I can't try this: I'm at work and not on a Mac :(

    If you really want a proper templates solution the entire source code for TextEdit is included as an example with the Developer Tools: you could add any functionality you wanted if you can write Cocoa/Obj-C code...
  3. mmcrider thread starter macrumors newbie

    Jan 22, 2008
    Thanks, Robbie. I set the attritube 'locked' and now it tells me it's locked when I go to save it. So, I answer that I don't want to over-write the locked file, which closes the dialog. Then, I do a 'save as'. This is functional, but I was hoping to make this a little more seemless.

    However, that was a great idea. I think I'm off to www.rentacoder.com to see if I can find someone to write this for me.

    Thanks again.


Share This Page