-
-
Notifications
You must be signed in to change notification settings - Fork 621
Open
Description
Steps to reproduce:
- select a word in your text and use the Trumbowyg toolbar to click on "bold" (or "superscript" or any other button that creates a tag around your word)
- click outside the editor, then select the bold word again.
- click on the createLink button
- In the modal popup you will see that as text for the link something like
<b xmlns="http://www.w3.org/1999/xhtml">yourword</b>is proposed
This is due to the fact that the selected range is processed via new XMLSerializer().serializeToString and that will create the xmlns attribute. One way to fix this would be to add the following line as the first line in the createLink function:
text = text.replace(/ xmlns="[^"]+"/, '');
That way the attribute is removed again right after creation. This is not a very elegant solution, but it appears to be the most practical.
Metadata
Metadata
Assignees
Labels
No labels