What would be the best way to add a second text field, in edit mode only, preferably that I can see in the preview pane?
Use case: File for producing Spanish resources as exported htmls from node.js, but with a second text field below the default text field, for me to add any additional notes in English, only viewable in edit mode.
Did you try modifying the edit template to include the field?
I’ve done something related… but I have several “extra” editors that bring up related tiddlers (not fields). Probably overkill for what you’re aiming for.
@DaveGifford also just add to @twMat’s suggestion the creation of a tiddler to hide the visibility of the field in standard field editor because to edit it with that it will destroy the text area;
Do test on single and node implementations to test your tiddlers survive a save and reload (someone raise this issue in the past), but I don’t think it is present now.
For other passing the tag should be $:/tags/EditTemplate (@twMat typo)
I made a package demonstrating this and including the hide field. You can hide the button and just add, but not edit the “note” field using the normal field editor.
Thanks Tony, I will play around with this. I did notice the typo, but added it for fun and for some reason it did work as …ViewTemplate. Anyway, yes I chnged it to edittemplate before responding here yesterday.
I noticed on twMats solution that it was making the fields area act weird (with every keystroke in a new field, the tiddler slid down to hide the type and fields area), so I listed it after fields and it worked better.
I am not sure what you are talking about destroying the text field. I m using twMats solution and added text to both fields, saved, the normal text field displayed correctly in view mode, and I edited it again and everything in both fields is intact.
I do feel a more generic plug and play solution for additional text fields along with field definitions and field types is the next step in empowering the design of tiddlywikis.