Further to #400482: editor.instance.prepareContent() breaks editor's native markup handling: the mceItem class was being added to locally placed images on a site I'm developing, preventing images from being edited. I found that when I disabled the "teaser break" plugin the issue was fixed for new image placement.

Previously placed images were not editable however. I fixed this by running some cleanup queries on the node_revisions table:

UPDATE node_revisions SET body = REPLACE(body, 'class="mceItem"', ''), teaser = REPLACE(teaser, 'class="mceItem"', '');
UPDATE node_revisions SET body = REPLACE(body, 'class=mceItem', ''), teaser = REPLACE(teaser, 'class=mceItem', '');
UPDATE node_revisions SET body = REPLACE(body, ' mceItem', ''), teaser = REPLACE(teaser, ' mceItem', '');
UPDATE node_revisions SET body = REPLACE(body, 'mceItem', ''), teaser = REPLACE(teaser, 'mceItem', '');
UPDATE node_revisions SET body = REPLACE(body, 'src="http://example.com/sites/', 'src="/sites/'), teaser = REPLACE(teaser, 'src="http://example.com/sites/', 'src="/sites/');

Comments

sun’s picture

TwoD’s picture

Status: Active » Closed (duplicate)

Teaser Break itself is not the issue. The problem disappears if Teaser Break is the only "Drupal plugin" you have enabled and you disable it because the cause was in a part of the TinyMCE implementation handling those plugins (fixed in 2.1). Like Sun said, this is already discussed in #715228: Popup does not launch for editing existing image so I'm marking this a duplicate.

Note that if you used 2.0 to insert the image, switching to 2.1 will not remove the class automatically, but it won't add it on new images you insert after the switch (unless explicitly told to do so for certain placeholder images provided by Drupal plugins).