If you add iframe and the attributes of iframe under the tinymcesettings.config , the iframe tags will work , i havent tested yet , but i did something like this before which worked.
in the customConfig section. (rather than adding into the validElements tag, also means that updating umbraco to a new version, should be easier to spot your modifications)
What kind of HTML are you trying to use in the rich text editor? By disabling tidy you can end up with invalid code and if people copy/paste text from websites, word etc. all that unwanted formatting won't get stripped for sure.
Are you sure what you're trying to achieve can't be done by using a macro that can be inserted into the rich text editor? If it's a specific element you need to insert you could perhaps add it to the "styles" dropdown by adding the element in a rte stylesheet in the "settings" section.
I'm not saying you should not disable tidy, i'm just saying it's not neccesarily the best option :)
Jan... my unserstanding is that tinymce will produce valid xhtml with the default umbraco settings... and tidy is just a catch all and actually in some instances we found that valid xhtml from tinymce is then being made invalid by tidy. (if memory serves was to do with numerics (eg set tinymce to export numerics, tidy then converts back to entities) ie without an entity declaration and other html entities are invalid xml, where as #160; is fine) Now I know this is dealt with in umbraco by forcing the tinymce content into a cdata section in the in-memory xml... but if tinymce is giving valid xhtml anyway and you want to navigate the richtext content via the xml dom as mentioned before, tidy's manipulation can cause contents of the cdata element to then not be valid xhtml.
There is also the paste from word option that should deal with well... pasting from word.
Macros in the content also throw up another issues... the "Aw Snap" when using any version of chrome, depending on if you add it to the end of a paragraph the rendermacro function has issues with adding extra paragrpah tags before/after or both when it comes to the front end view... and I've never been able to get the render macro in the content editor to work :-(
Maybe I've got the wrong end of the stick, but the above comes from my humble experience
PS another option
If you are wanting to paste html snippets that don't need umbraco elements (eg a content pickers etc) you could add in the tinymce support for templates...
Actually I'm focussed on the requirement of having an option for the editors to add as many as videos (iframe tags or others, generated by youtube/vimeo etc) in one variable (BodyText). I know i can have an extra document type with video as variable and then can have it as child nodes and then render them through xslt but it is actually not required by the customer as they want to have something like wordpress , i.e wordpress users just add http://youtube.com/v/videoid and it automatically renders the video on the front end.
I have met the requirement by adding a plugin to the tinymce3 which can now be used to embed html in RTE so somehow it has solved the issue by following the solution given above and having embed html plugin together. But i'm still curious to know a better solution for this.
I thank you guys for explaining things in detail. It is really appreciateable.
TinyMCE manipulates my html tags
Hi,
TinyMCE keeps erasing the IFRAME tags that I need to have in my rich text. This is a legitimate content scenario and security is not a concern.
In Joomla, there is a way to disable the tag manipulation feature in TintMCE.
How do I do that in Umbraco?
Thank you,
If you add iframe and the attributes of iframe under the tinymcesettings.config , the iframe tags will work , i havent tested yet , but i did something like this before which worked.
cheers
config/tinymceconfig.config is the file you are looking for...
maybe the easiest approach is to add
in the customConfig section. (rather than adding into the validElements tag, also means that updating umbraco to a new version, should be easier to spot your modifications)
Thank you Mike and Mr. A for help.
Hi Mike
Its still not working if i have added that config in customConfig
You will also need to set tidy to false in the UmbracoSettings.config file
Cool, Thanks mate
Hi Muhammad
What kind of HTML are you trying to use in the rich text editor? By disabling tidy you can end up with invalid code and if people copy/paste text from websites, word etc. all that unwanted formatting won't get stripped for sure.
Are you sure what you're trying to achieve can't be done by using a macro that can be inserted into the rich text editor? If it's a specific element you need to insert you could perhaps add it to the "styles" dropdown by adding the element in a rte stylesheet in the "settings" section.
I'm not saying you should not disable tidy, i'm just saying it's not neccesarily the best option :)
/Jan
Jan... my unserstanding is that tinymce will produce valid xhtml with the default umbraco settings... and tidy is just a catch all and actually in some instances we found that valid xhtml from tinymce is then being made invalid by tidy. (if memory serves was to do with numerics (eg set tinymce to export numerics, tidy then converts back to entities) ie without an entity declaration and other html entities are invalid xml, where as #160; is fine) Now I know this is dealt with in umbraco by forcing the tinymce content into a cdata section in the in-memory xml... but if tinymce is giving valid xhtml anyway and you want to navigate the richtext content via the xml dom as mentioned before, tidy's manipulation can cause contents of the cdata element to then not be valid xhtml.
There is also the paste from word option that should deal with well... pasting from word.
Macros in the content also throw up another issues... the "Aw Snap" when using any version of chrome, depending on if you add it to the end of a paragraph the rendermacro function has issues with adding extra paragrpah tags before/after or both when it comes to the front end view... and I've never been able to get the render macro in the content editor to work :-(
Maybe I've got the wrong end of the stick, but the above comes from my humble experience
PS another option
If you are wanting to paste html snippets that don't need umbraco elements (eg a content pickers etc) you could add in the tinymce support for templates...
Hi Jan
Thanks for explaining that bit.
Actually I'm focussed on the requirement of having an option for the editors to add as many as videos (iframe tags or others, generated by youtube/vimeo etc) in one variable (BodyText). I know i can have an extra document type with video as variable and then can have it as child nodes and then render them through xslt but it is actually not required by the customer as they want to have something like wordpress , i.e wordpress users just add http://youtube.com/v/videoid and it automatically renders the video on the front end.
I have met the requirement by adding a plugin to the tinymce3 which can now be used to embed html in RTE so somehow it has solved the issue by following the solution given above and having embed html plugin together. But i'm still curious to know a better solution for this.
I thank you guys for explaining things in detail. It is really appreciateable.
Cheers
Muhammad
re: "I have met the requirement by adding a plugin to the tinymce3 which can now be used to embed html in RTE "
Muhammad,
What is the name of the plug-in and can you provide a link to it.
Thanks,
Richard
That plugin's link is: http://our.umbraco.org/projects/wvd-media-tinymce-insert-embed-code
You also need to do 2 things to let tinymce accept iframes followed by re-saving the web.config with just space in it.
1.
config/tinymceconfig.config
add the following in the customConfig section
2.
config/UmbracoSettings.config
set the following as false
is working on a reply...