Opened 15 years ago
Closed 15 years ago
#12048 closed enhancement (duplicate)
<video> tag is deleted when switching between Visual/HTML editors.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9.1 |
Component: | Editor | Keywords: | tinymce |
Focuses: | Cc: |
Description
SUMMARY:
I'm trying to embed a new HTML5 style video in a post. But it's very difficult, as the Wordpress Editor is continually deleting my <video> HTML when I switch over to Visual to do some writing.
STEPS TO REPRODUCE:
- Start a new post. Write a few words.
- Switch to "HTML"
- Paste in the following code:
<video width="700" height="394" controls autobuffer="false"><source src="http://example.com/example.m4v" type="video/mp4" /></video>
- Switch to "Visual". (A large white space for the video should be present.)
- Switch back to "HTML".
EXPECTED RESULTS:
Nothing happens. My <video> tag remains and my code and post is unchanged.
ACTUAL RESULTS:
The entire <video> tag, and its contents, is gone!
WORKAROUNDS:
None that I can find, except to never touch the "Visual" tab, which is challenging...
Change History (7)
#1
@
15 years ago
- Milestone changed from Unassigned to Future Release
- Priority changed from high to normal
- Severity changed from major to normal
- Type changed from defect (bug) to enhancement
#2
@
15 years ago
Thanks so much for taking the time to look at my bug.
First, I'm not totally sure I would call this an "enhancement" request as I'm literally losing data every time I edit or open this post. Switching to "Visual" at any point should never, in my opinion at least, delete large chunks of your crafted HTML and replace it with nothing at all. Sounds like a great preference, at least -- "Preserve unknown HTML". Wait, that's an enhancement request, isn't it? Nuts.
(I only say this because I keep forgetting about the situation, and I keep going to edit tiny things on that post, and it keeps wiping out the video entirely, and I keep not noticing until later, and I keep having to revert. Anyway.)
Fortunately, as we're a Mac software house, our users are predominately <video> capable. After posting a <video> video, we received literally zero comments that the video couldn't be seen. Hooray. The time is now! :)
Thanks for the suggestion on the plug-in front. I'll look into it now.
The problem is that most currently used browsers do not support HTML 5 yet (IE, older FF and WebKit, etc.) so if you add <video> or <audio> tags most visitors to the site won't see them.
Currently the visual editor uses XHTML 1 doctype and tags. There is an update in the works for it to support some HTML 5 tags that should be available soon. If you want to experiment with <video> now, I'd suggest adding a small plugin: