Ryan Peters
Ryan Peters

Reputation: 7708

CKEditor auto-formats (screws up) HTML5 tags

I'm trying to paste a simple piece of HTML into the HTML editor

<video class="videofile" controls="controls" height="272" poster="poster.jpg" preload="none" tabindex="0" width="480"> 
    <source src="video.mp4" type="video/mp4" /> 
    <source src="video.webm" type="video/webm" />  
</video>

However, when I go back to WYSIWYG, it auto-formats it as such:

<p><video class="videofile" controls="controls" height="272" poster="poster.jpg" preload="none" tabindex="0" width="480"> <source src="video.mp4" type="video/mp4"> <source src="video.webm" type="video/webm"> </source></source></video></p>

It's completely screwed up (note the tags). How can I disable this? I've tried setting config.FormatOutput and config.AutoParagraph to be false. Thanks.

Upvotes: 1

Views: 1140

Answers (3)

Ryan Peters
Ryan Peters

Reputation: 7708

I could never find an answer for this issue. I ended up allowing a raw TEXTAREA editor for code entry. Thanks.

Upvotes: 1

eon
eon

Reputation: 1938

CKEditor 3.6.1 supposedly doesn't improperly mess with HTML5 tags. Can you upgrade?

Upvotes: 0

AlfonsoML
AlfonsoML

Reputation: 12690

You can use this plugin http://alfonsoml.blogspot.com/2011/01/html5-video-plugin-for-ckeditor.html and that way you don't have to paste anything in source mode and the HTML will remain valid.

Upvotes: 0

Related Questions