-
Notifications
You must be signed in to change notification settings - Fork 953
Open
Description
🐞 Bug: Link duplication when space + embed selected
Summary:
When selecting a combination of whitespace and an embedded expression (e.g., {OBJECTID}), clicking the link icon results in multiple <a> elements being generated in the DOM. This leads to rendering and editing issues in the WYSIWYG editor.
Steps to Reproduce:
- Open the text editor.
- Insert an embedded expression like
{OBJECTID}. - Select the embedded expression plus an adjacent space.
- Click the "link" icon and enter a URL.
- Inspect the resulting HTML or view in editor.
Expected Behavior:
Only one <a> tag should be created, wrapping both the space and the embed.
Actual Behavior:
Multiple <a> elements are created—one around the space, one around the expression.
Screenshots:
- Selection including
{OBJECTID}and space:
- Generated HTML with multiple
<a>tags:
Additional Context:
I called the method.
// selection includes: space + {OBJECTID} + space
editor.formatText(selection.index, selection.length, 'link', 'current_page', 'user');Metadata
Metadata
Assignees
Labels
No labels
