Mat, Much of this here is beyond me, however I read your desire to get a focused tiddler value, however made me wonder if I have something that can help.
The last opened, linked to or edited tiddler (draft of), I call this the "focused tiddler", is stored in $:/HistoryList!!current-tiddler I am now using this to track the last focused tiddler and scroll to return to that tiddler within a long story. Regards Tony On Wednesday, July 8, 2020 at 5:30:55 AM UTC+10, Mat wrote: > > Jed, thank you for replying and following this! > > It is probably possible to pass the name of the current tiddler when the >> tiddler is in edit mode and has focus by using css selectors or by walking >> up the dom tree until you reach a div that has the data-tiddler-title >> attribute. >> > > Sounds hopeful. I have no idea how to pass it using css though. I don't > know if it is relevant but Tobias made this dom plugin > <http://tobibeer.github.io/tw5-plugins/#dom> long ago. > > >> This should also be possible in text areas outside of edit mode as long >> as they are inside a tiddler, I don't know if it would work in places like >> the sidebar. >> > > Maybe the currentTiddler could be stored in a state tiddler, as set when > focussing on a tiddler? > > The third item in your list (the popup staying open) is a problem with >> when the values update. At the moment it is only on keyup. That should >> probably be changed to keydown. Making it also update on focus and blur >> events would probably help. >> > > A sufficient simplification, at least for now, might be to limit the whole > mechanism to only work on the text field? > > >> The last item, being incompatible with the editor toolbar, is because >> when the toolbar is active the editor is put in an iframe. There are limits >> to the information that can be passed in and out of an iframe. We can >> almost certainly work around this but I didn't work on it. >> > > Again, hopeful to hear. Overall, much of the editor toolbar functionality > would actually be better suited inside EditorMagic but it would probably be > a hard sell if it is required. > > But, for now, I think the most important thing is the currentTiddler > matter because it prevents the plugin from being used at all outside the > demo. If you have a chance to experiment a bit, it would be terrific! > > Thanks again! > > <:-) > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/d956e0c3-a198-48d0-8cdc-f782465762dbo%40googlegroups.com.
