Replies: 4 comments 3 replies
-
First of all you should have a closer look and understand the EditTemplate and all its components. There are at least 18 of them. The edit template is activated by the PageTemplate - story section. A very important widget in edit mode is the https://tiddlywiki.com/#FieldManglerWidget ... You will probably need to have a look at the source code, to understand it. If you want to activate js actions you have to have a closer look at the TW-Hook mechanism. https://tiddlywiki.com/dev/#HookMechanism Have a closer look at the dev-docs |
Beta Was this translation helpful? Give feedback.
-
If you could be more specific about your usecase, I could be more specific about the elements, where I would start. ... The first post will probably be too general, and will probably not be helpful, because it's too much info |
Beta Was this translation helpful? Give feedback.
-
I think the best approach would be to create a custom editor toolbar button. When they are clicked, they have access to the text being edited. You can explore the built-in editor toolbar buttons here: https://github.com/Jermolene/TiddlyWiki5/tree/master/core/ui/EditorToolbar |
Beta Was this translation helpful? Give feedback.
-
Thanks everyone, Specifically: |
Beta Was this translation helpful? Give feedback.
-
My use case is to write a complex JavaScript function that edits the content of a tiddler (using regex, maps, etc.) while the tiddler is open in edit mode. What is the recommended way to do that?
I will probably end up with more than one of these, so I'd want to be able to separate the execution code from the pattern specification.
Any advice will be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions