I'm trying to insert a Vimeo video using the WYSIWYG module with CKeditor. Everything appears to work fine including the preview image until I click submit and I look at the HTML that was inserted. Instead of Vimeo code, I get code for Media Element, which I also have installed on the site.

<div class="mediaelement-video media-element file-default" data-file_info="%7B%22fid%22:%22936%22,%22view_mode%22:%22default%22,%22type%22:%22media%22%7D"><video class="mediaelement-formatter-identifier-1367972092-0" controls="controls" height="390" src="http://vimeo.com/65321262" width="640">&nbsp;</video></div><div class="mediaelement-video media-element file-default" data-file_info="%7B%22fid%22:%22936%22,%22view_mode%22:%22default%22,%22type%22:%22media%22%7D"><video class="mediaelement-formatter-identifier-1367966040-0" controls="controls" height="390" src="http://vimeo.com/65321262" width="640">&nbsp;</video></div>

Any help would be appreciated.

Comments

deggertsen’s picture

Title: Media code for Vimeo not getting entered in the WYSIWYG » Vimeo Videos are not rendering

Ok, I've got it so that the HTML output is correct now (I actually have no idea how I fixed it):

[[{"fid":"940","view_mode":"default","type":"media","attributes":{"height":488,"width":800,"alt":"Hudson and Five Steps to Following Instructions","class":"media-element file-default"}}]]

However, it still will not render the file correctly. It only renders an image rather than the actual video.

<div id="file-940" class="file file-video file-video-vimeo">
  <div class="content">
    <img typeof="foaf:Image" src="http://example.com/sites/default/files/styles/large/public/media-vimeo/65321262.jpg?itok=X1tDr3nD" width="800" height="488" alt="Hudson and Five Steps to Following Instructions">  </div>
</div>
steinmb’s picture

Hi
What version of WYSIWYG, CKeditor, Media and file_entity are you currently using?

deggertsen’s picture

Wysiwyg 7.x-2.2+14-dev (2013-Apr-19)
CKEditor 4.1.1.5a2a7e3
Media 7.x-2.0-unstable7+38-dev (2013-Mar-28)
File entity (fieldable files) 7.x-2.0-unstable7+61-dev (2013-Apr-03)

I have stopped using this module because of the above issue and am now using https://drupal.org/project/oembed instead as it works just fine with Vimeo.

steinmb’s picture

Title: Vimeo Videos are not rendering » Inline Vimeo Videos with WYSIWYG and CKeditor 4.x are not rendering

Thanx for getting replying though. I'll leave this issue open anyway until someone can verify the problem and/or fix it. The markup you got in #1 should work.

gmclelland’s picture

Status: Active » Closed (works as designed)

@deggertsen - I don't believe playing media while editing in the wysiwyg editor is supported with the Media module. This is why you see the preview image. When you view the node it should display the correct video markup.

Under admin/structure/file-types/manage/video/file-display

Make sure your "Display precedence order" is set correctly.

Vimeo Video should probably be higher than mediaelement.

If you want to customize what size preview image is displayed in the wysiwyg, you will need the patch in #1792738: Allow custom file view modes for WYSIWYG display

Please reopen if you think the markup is incorrect when viewing the node.

Hope that helps

deggertsen’s picture

@gmclelland It was still only showing the preview image on the view page. I didn't expect the video to play in the editor.

Thanks for all the input. Maybe I'll try Media: Vimeo again.