November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Try to edit the property in HTML mode again and replace the p with a div
<div>
<object width="703" height="340" data="/PageFiles/920/v1.swf" type="application/x-shockwave-flash">
<param name="data" value="/PageFiles/920/v1.swf" />
<param name="src" value="/PageFiles/920/v1.swf" />
</object>
</div>
The embedded code will then not be wrapped with <p>
More advanced solution can be found here: http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=43969 but I dont think removing p for all content is a good idea.
Thanks for the suggestion. I can see that this is a workaround if I have an editor who is happy to edit HTML. Unfortunately this isn't often the case.
I agree with you that it is very unwise to remove p for all content!
I was hoping that there would be some configuration where I could say "don't wrap HTML element type: object".
Writing a bit of js to undo the addition of the <p> tag only around objects and add it to tinyMCE but that would potentially be overwritten in any future upgrade and I would prefer not to have to alter it.
Hi Joel,
Try adding following class in your project and rebuild.
using EPiServer.Editor.TinyMCE;
...
[TinyMCEPluginNonVisual(AlwaysEnabled = true, EditorInitConfigurationOptions = "{force_p_newlinesEdit:false}")]
public class TinyMceDisablePtagForLineBreak
{
}
As pointed out http://www.tinymce.com/wiki.php/Configuration:force_br_newlines, <P> tag is better for line break than <br />.
You can customise TinyMCE even further to change new line rule for Media type only.
Jay
I'm using the standard TinyMCE "Insert/Edit embedded media" button to add a flash movie within an XHTML string property.
The inserted code is this:
The object is being wrapped in paragraph tags. When I edit the HTML to remove them, hit the "update" button (don't save or publish the page) then view the HTML again, they have been re-inserted.
I am guessing this is entirely due to TinyMCE as it's not being submitted into the EPiServer DB.
Is there a way to stop this happening?