Replies: 3 comments 6 replies
-
Hi @saqimtiaz great, that would certainly be very handy. |
Beta Was this translation helpful? Give feedback.
-
I have been giving this some more thought and what needs more consideration is making the caret co-ordinates available to actions. We can divide this into actions triggered inside the editor (via editor toolbar buttons or other editor tools), and actions triggered outside the editor. I would really appreciate input on the second of these, actions triggered outside the editor widget. Actions triggered inside the editor widget Actions triggered outside the editor widget Suggestion 1 would be to have two new attributes for
Suggestion 2 is a more generic version of the above idea, two new attributes for
Can we think of a more elegant way to go about this? One way to avoid the issue altogether would have been to have Another option is having |
Beta Was this translation helpful? Give feedback.
-
@saqimtiaz Any updates regarding this discussion and implementation of UX described here |
Beta Was this translation helpful? Give feedback.
-
It would be desirable to have core support for positioning a popup at the caret position in the tiddler editor. This would make it possible to implement autocompletion solutions that work across all the editor engines (simple, framed, codemirror), something that is currently lacking.
It is proposed to do so by:
getCaretPosition()
tv-popup-coords
to theinputActions
fired by the<$edit-text/codemirror>
widget on every input event in the editor<$action-popup>
to display a popup at the caret position.The codemirror library already provides a
cm.cursorCoords()
method that can provide the caret co-ordinates.For the simple and framed engine, the textarea-caret-position library can be used to get the caret co-ordinates. This is the library used by the edit-comptext plugin, works well and is 5kb uncompressed and 2kb minified.
Beta Was this translation helpful? Give feedback.
All reactions