November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
After much searching I've discovered the answer. I found this blog entry by Chris Sharp who explained why this doesn't work in Episerver 7 and how to get round it. http://cjsharp.com/blog/2013/04/15/how-to-add-valid-elements-like-iframes-to-tinymce-in-episerver-7/
Here's the code in case the link doesn't work in the future:-
Extended Valid Elements Code
[TinyMCEPluginNonVisual(PlugInName = "TinyMceExtendedValidElements", AlwaysEnabled = true, EditorInitConfigurationOptions = "{ extended_valid_elements: 'iframe[src|frameborder=0|alt|title|width|height|align|name]' }")]
public class TinyMceExtendedValidElements
{
}
Empty File Handler (for when the script is missing)
public class EmptyFileHandler : IHttpHandler
{
public bool IsReusable
{
get { return true; }
}
public void ProcessRequest(HttpContext context)
{
}
}
Web.Config update
<configuration>
... some configuration ...
<location path="util/editor/tinymce/plugins">
<system.webServer>
<handlers>
<add name="TinyMceExtendedValidElements" path="/util/editor/tinymce/plugins/TinyMceExtendedValidElements/editor_plugin.js" verb="GET" type="MyEPiServerProject.Business.Handlers.EmptyFileHandler, MyEPiServerProject" />
</handlers>
</system.webServer>
</location>
</configuration>
Episerver.Config update
<episerver>
... some configuration ...
<tinyMCE mergedConfigurationProperties="valid_elements, extended_valid_elements, invalid_elements, valid_child_elements" />
</episerver>
Hello,
I'm trying to add the HTML 5 sandbox attributes to an iFrame in the TinyMCE editor, except everytime I update, it removes the attributes. I've read how you can get round this in Episerver 6 but when this workaround http://www.frederikvig.com/2010/10/how-to-add-support-for-iframes-and-other-elements-to-tinymce-in-episerver-cms/ is applied it tends to break the editor in Episerver 7.5. Can anyone provide any help on how to resolve this issue.
Many Thanks
Paul