U4-8887 - TinyMCE inserts __mcenew in id attribute for images

Created by Bjarne Fyrstenborg 22 Aug 2016, 16:56:25 Updated by Sebastiaan Janssen 25 Jul 2018, 11:39:15

Tags: Up For Grabs PR

It seems that TinyMCE inserts __mcenew in id attribute for images, which will be invalid markup if multiple images are inserted on same page.

1 Attachments


Bjarne Fyrstenborg 04 Jan 2017, 07:26:03

This is still an issue in Umbraco 7.5.6

Vidar Aune Westrum 06 Jan 2017, 13:32:47

I can see that the ID is being cleaned on line 6730 within the if on line 6725 in umbraco.services.js. Are there any reasons for clearing the ID only when the maxSize is set?

What if we save the element created in line 6719 and bring it in to the $timeout and we don't need to get the element in 6722? then we shouldn't need this id?

Edit: I might understand now - editor.dom.createHTMLonly creates the html and it's not an object until it's inserted in the editor.dom.....

Edit2: yes... But if we wipe the ID in $timeout then, regardless the maxSize if, should do the work?

russellshome 26 Jun 2018, 21:16:09

This is still an issue in 7.11

russellshome 26 Jun 2018, 22:07:00

I added https://github.com/umbraco/Umbraco-CMS/pull/2729

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.4.3, 7.5.6, 7.11.1

Due in version: 7.12.0


Story Points: