CKEditor 3.6.6.1
Media 7.x-2.0-unstable7+53-dev
The screenshot with comments attached - we can see what is the problem in the screenshot and it is broken markup in the text editor.
I've tried to debug the media/js/wysiwyg- media.js file and till the lines
190: // Insert placeholder markup into wysiwyg.
191: Drupal.wysiwyg.instances[this.instanceId].insert(markup);
everything seams ok and the "markup" is correct, but the inserted markup in the editor is not correct.
Problably this is not the issue to media module but to CKEditor module. But still - it affects insertion of the media in the CKEditor with the media module.
Comment | File | Size | Author |
---|---|---|---|
ckeditor-internet-media-bug.jpg | 421.66 KB | Nor4a |
Comments
Comment #1
gmclelland CreditAttribution: gmclelland commentedSee those spans with a line-height? I believe those are due to a chrome bug. I wonder if that is messing with the markup?
Would be interested if you could test this with another browser like Firefox. Remove those spans first.
Here is what my markup looks like after I insert an image at the end of a paragraph. Note: I'm using the 3.x version of Tinymce
<p>Here is another paragraph.<img height="211" width="290" class="media-element file-quarter" typeof="foaf:Image" src="http://mysite:8082/sites/default/files/styles/quarter/public/events/young-reader.jpg?itok=DyIkxLW0" alt="Person Reading" title=""></p>
Here is what my markup looks like when I insert an image into a new paragraph.
<p><img height="292" width="290" class="media-element file-quarter" typeof="foaf:Image" src="http://mysite:8082/sites/default/files/styles/quarter/public/patch.jpg?itok=MKNCpLFv" alt="Patch" title=""></p>
I'm using the latest 2.x-devs of media and file_entity, wysiwyg modules.
Also, if you view the source of the inserted media markup in the wysiwyg, what do you get?
It should look something like:
<p>Here is another paragraph.[[{"fid":"1083","view_mode":"quarter","fields":{"format":"quarter","field_file_image_alt_text[und][0][value]":"Person Reading","field_file_image_title_text[und][0][value]":"","field_image_tags[und]":""},"type":"media","link_text":null,"attributes":{"height":211,"width":290,"class":"media-element file-quarter"}}]]</p>
I had a similar issue where something was messing up the media code #2028255: ckeditor styles break media module markup
Hope that helps
Comment #2
Nor4a CreditAttribution: Nor4a commentedYes. It seams to be a Chrome bug, because I just tested on the Opera and IE10 - every seams to be fine.
But still - html markup is like this:
And of course for the correct html markup (when I switch off the editor) I see the markup like this:
And in the Chrome I see this:
What can be done with this "Chrome bug"?
Where to report it? :)
Comment #3
Dave ReidComment #4
gmclelland CreditAttribution: gmclelland commented@Nor4a I don't think your output looks right. I would try using wysiwyg-2.x-dev with TinyMCE 3.5.8 and see if that changes you output.
http://ckeditor.com/forums/CKEditor/ckeditor-4.01-inserting-span-element...
Comment #5
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedClosing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team