Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17793

Users cannot continue typing seamlessly after inserting a mention with the '@' shortcut

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    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

          Activity

            People

              mflorea Marius Dumitru Florea
              mleduc Manuel Leduc
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: