This is the code I'm trying to embed:
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/jJECepNeCJ0&hl=en_US&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http开发者_开发知识库://www.youtube.com/v/jJECepNeCJ0&hl=en_US&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
The interesting thing is that this code seems to display the embedded video in the Preview immediately below the form. Once the form is saved, the code snippet is rendered as text.
It works fine for me.
Make sure your code snippet doesn't have four spaces before it.
You're probably going to have to extend whatever markdown filter you're using (assuming django.contrib.markup) to ignore <object>
tags.
If you're using some sort of Javascript editor in your form, it may be converting the < to <
before it is saved into your database. In this case, you may have to change the editor.
精彩评论