Details
Description
Currently, when a mention is inserted with the '@' shortcut, the inserted macro is selected in CKEditor, and the user needs to press the right arrow to move the caret at the end of the text and continue typing.
The UX can be improved by instead:
- Insert an single space as the return value of outputTemplate
- on the afterInsertHtml event:
- move the caret at the left of the inserted space
- call the xwiki-macro-insert command to insert the macro
- wait for afterCommandExec (see code below) and move the caret just after the inserted mention macro
var handler = editor.once('afterCommandExec', function(event) { if(event.data.name === 'xwiki-macro-insert') { handler.removeListener(); // TODO.... } });
Attachments
Issue Links
- depends on
-
CKEDITOR-418 Cannot edit text before or after a macro that supports inline if it's been initially added as standalone
- Closed
-
XWIKI-19273 Upgrade to CKEditor Integration 1.58
- Closed
- is duplicated by
-
XWIKI-19148 Cursor position is lost after inserting a mention
- Closed
- is related to
-
XWIKI-17965 In wysiwyg, cannot type text after a mention, if the mention is the first thing in a paragraph
- Closed
-
XWIKI-19236 Mentions are not inline where inserted in an empty line
- Closed
-
XWIKI-19286 Mention macro is transformed into a block after the page is saved if inserted standalone on an empty line
- Closed