Interesting! The search box I noticed lets you scroll among result and by pressing the enter it gets and passes the input for further processing.
One other point is the saveTiddler attribute, as it lets prevent auto-triggering other processes!
This will let's developer a lot of flexibility!
--Mohammad
BurningTreeC that would be a warmly welcome addition. Navigation via arrows is probably standard UI these days.
Considering how your solution makes things trigger from within the edit-text widget, would you say it could serve as an ingredient in the
Feature Request: Trigger Custom Popups via Custom Strings #3784 ? I.e does your solution necessarily read(?) the full edit-text field content or could it trigger from patterns in the middle of the field content? Prime example; could it give a dropdown list for "[[Bar" when typing "Foo [[Bar" and then again for "[[Frotz" in "Foo [[Bar]] [[Frotz" ?
Hi Mat, do you mean revealing a popup/dropdown when typing something that matches one or more items of a given list? Like typing "hello" and it opens a popup if there are tiddlers whose titles contain "hello" ?
For simple input fields I can imagine that would work. For whole textareas or for the editor it's more complicated. An idea would be making the space key and maybe the backspace key additionally delete the content of the saveTiddler to inserting space / deleting ... then it could be possible
edit-text
widget and the macro accepts all its attributes" which made me think that you had manipulated the edit-text widget to more generally trigger actions.BurningTreeC wrote:Hi Mat, do you mean revealing a popup/dropdown when typing something that matches one or more items of a given list? Like typing "hello" and it opens a popup if there are tiddlers whose titles contain "hello" ?Yes, that would be a possible application yes. The "given list" could be predefined strings (some kind of DataTiddler) and/or the set of all tiddler titles or, as you suggest, the string merely matches part of a tiddler title.For simple input fields I can imagine that would work. For whole textareas or for the editor it's more complicated. An idea would be making the space key and maybe the backspace key additionally delete the content of the saveTiddler to inserting space / deleting ... then it could be possibleYeah, "whole textarea" is the key because it would be used to access "anything" during the actual authoring of the text. But not sure what you mean with the space/backspace keys here. (Maybe I don't understand because I'm not a programmer.) Regardless, the request is to be able to type text, like this very sentence, and as you, mid text, begin to type some arbitrary but predefined string pattern e.g @Burn or [[Burni it triggers a popup with arbitrary content (e.g a select list or reference info or whatever)
My question was promted when I, in your demo, read "In its heart it's anedit-text
widget and the macro accepts all its attributes" which made me think that you had manipulated the edit-text widget to more generally trigger actions.
<:-)
I have not played with this yet, so please excuse my ignorance but could the possible values be selected from a filter for example "[subfilder<defaultvalues>] +[subfolder<existingvaluesinfield>]"
regards
Tony
ok, meanwhile I made it work in textareas, too and tried some things in this direction. It seems to be possible.
What would be great and necessary if doing it following this idea, is a insert-text tm-edit-text-operation that just inserts text at the cursor position/selection and moves the cursor to the end of the inserted text, without leaving a selection. The replace-text operation I'm using at the moment can't just insert a space without leaving a selected space, it's not like pressing the space-bar normally, sadly...
Would be great to reveal the popup at the position where the cursor is, but that's a different task
BurningTreeC wrote:ok, meanwhile I made it work in textareas, too and tried some things in this direction. It seems to be possible.HA! I did not expect you to actually look into this but it seems you also sense how extremely useful this would be if it worked :-D !!!!!!
What would be great and necessary if doing it following this idea, is a insert-text tm-edit-text-operation that just inserts text at the cursor position/selection and moves the cursor to the end of the inserted text, without leaving a selection. The replace-text operation I'm using at the moment can't just insert a space without leaving a selected space, it's not like pressing the space-bar normally, sadly...No solution, but trying to understand (and maybe someone more knowledgable has ideas): When you say "space", you're referring to the space character " ", right?, as opposed to e.g the space/area that is currently typed at or perhaps the space/are after the replaced text is inserted. And you're saying that it, at the moment, not is possible to e.g type the triggering string "[[foo bar" because the space character makes things trigger already at "[[foo" ...and by continuing to type "bar", this overwrites wherever the "[[foo" is temporarily stored in some state type tiddler? Or is it that the to-be-inserted text must not contain a space character?
@Mat , I think a different mechanism is needed for that popup-triggering. It believe it can be additionally implemented, but we'd need to figure out what the conditions are when it should catch in
BTC,I like it a lot because it simplifies coding. I'm an amateur. Give me a macro already.
Good thingsJosiah
Hi BTC,This is fantastic! Is this coming to the core? It's such an intuitive ui feature that the lack of it in the core is pretty jarring.
Best wishes,admls