Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
17.10.14, 18.8.0
-
None
-
Unknown
-
Description
After a macro is inserted, from Quick Actions or by submitting the Edit Macro dialog, the WYSIWYG editor selects the whole macro widget instead of putting the cursor in its content. The user has to click in the content before typing, and text typed right away goes nowhere, or outside the macro: for an inline macro like footnote, it goes before the macro, so "XYZ" typed after inserting a footnote at the end of "A sentence" gives A sentence XYZ{{footnote}}My note{{/footnote}}.
The fix is done in the macro plugin of the editor, plugin.js:
- After inserting a macro whose content is edited in place, put the cursor in that content, at its end, whether the macro was inserted from Quick Actions or from the Edit Macro dialog, and whether its content is mandatory or not.
- When the content cannot be edited in place, put the cursor after the macro rather than leaving the widget selected.
- When the content is empty, show a placeholder in it that says what to type, like the focused-line placeholder that the editor already shows, so that an empty content is not just an empty line.
XWIKI-25563 asks for the same cursor placement for the Quick Actions of the macros whose content is mandatory; this issue extends it to every insertion.
Most macros below need their content to be edited in place first, see the Depends on column.
Depends on
- XWIKI-25567, for the cache, container and context macros.
- XWIKI-19978, for the code macro.
- XRENDERING-831, for the comment macro.
- XRENDERING-830 and XWIKI-19954, for the footnote macro.
- XWIKI-25571 and XWIKI-23735, for the gallery macro.
- XWIKI-25570, for the tree macro.
- MATHJAX-40, for the mathjax macro.
KOs covered
| Macro | Criterion | Problem | Depends on |
|---|---|---|---|
| figureCaption | I4 cursor | After submitting the dialog, the macro widget is selected and the cursor is not in its content: text typed right away goes nowhere. | |
| cache | I4 cursor | After submitting the dialog the macro widget is selected and the cursor is not in the content: typed text changes nothing. | XWIKI-25567 |
| container | I4 cursor | After insertion from Quick Actions, the macro is a non-editable placeholder with no content area: typed text goes after the macro. | XWIKI-25567 |
| context | I4 cursor | After the insertion, the macro is a placeholder with no content area: the text typed next goes outside the macro. | XWIKI-25567 |
| code | I4 cursor | After submitting the dialog, the macro widget is selected and the cursor is not in its content: typed text goes nowhere. | XWIKI-19978 |
| comment | I4 cursor | After submitting the dialog, the macro widget is selected and the cursor is not in its content. | XRENDERING-831 |
| footnote | I4 cursor | After submitting the dialog, the macro widget is selected, and text typed right away goes before the footnote number, not after it. | XRENDERING-830, XWIKI-19954 |
| gallery | I4 cursor | After submitting the dialog, the macro widget is selected and the cursor is not in its content. | XWIKI-25571, XWIKI-23735 |
| mathjax | I4 cursor | After submitting the dialog, the macro widget is selected and the cursor is not in its content: typed text goes nowhere. | MATHJAX-40 |
| tree | I4 cursor | After the Quick Actions insertion, a static tree has no content area: typed text goes outside the macro, and nodes are added only as a wiki syntax list in the Edit Macro dialog. | XWIKI-25570 |
| content | I2 zero-config | Minor. Inserted from Quick Actions or by the Edit Macro dialog with the default values, the macro is {{content}} {{/content}}: an empty content that renders nothing in view mode and only an empty line in the editor, with no placeholder saying what it is. |
Impact found on macro fluidity
These 11 KOs come from the WYSIWYG usability audit of the macros, under the criteria I4 cursor and I2 zero-config of its usability criteria, which ask that after insertion the cursor is in the macro content, so the user can keep typing without an extra click, and that inserting a macro with only default values gives a sensible result. The page of each macro, linked in the table, has the full notes and the steps to reproduce. This issue fixes figureCaption and content on its own; the other macros also need their content to be edited in place, which the issues listed under Depends on cover.
Attachments
Issue Links
- depends on
-
XWIKI-19954 Add support for editing the macro content in-place for non-standalone macros
-
- Open
-
-
MATHJAX-40 Edit the formulas of the MathJax macro in place in the WYSIWYG editor
-
- Open
-
-
XRENDERING-830 Declare the content of the footnote macro as rich text
-
- Open
-
-
XRENDERING-831 Show and edit the text of the comment macro in place in the WYSIWYG editor
-
- Open
-
-
XWIKI-19978 "Code" Macro Should Support Inline Editing
-
- Open
-
-
XWIKI-23735 Provide an image picker for the Gallery macro when used in WYSIWYG
-
- Open
-
-
XWIKI-25567 Edit the content of the cache, container and context macros in place
-
- Open
-
-
XWIKI-25570 Edit the nodes of a static tree in place in the WYSIWYG editor
-
- Open
-
-
XWIKI-25571 Edit the images of the gallery macro in place in the WYSIWYG editor
-
- Open
-
- is related to
-
XWIKI-25563 Insert the wrapper macros from Quick Actions without the Edit Macro dialog when the content is their only mandatory field
-
- Open
-
-
XWIKI-25574 Keep the empty content of the figure and footnote macros reachable by one click in the WYSIWYG editor
-
- Open
-