It parses the content and applies rules, and I believe this is the default action of that product.
Perhaps check out /config/tinyMceConfig.config to see if there is a setting you can tweak to get what you need - specifically the valid elements rules.
It's also a pain at times, by marking entire paragraphs with a single custom format, instead of just the selected text, but tinyMCE support have shown no interest in allowing more control over that feature.
If you are a confident C# developer then you can hook into Umbraco events to manipulate the content when it is saved using the HTML Agility Pack (that comes as part of Umbraco install).
So you'll need to raise the Content Service saving event in an ApplicationEventHandler and then use the HTML Agility Pack to parse and reformat the HTML which would then save it back to Umbraco. Tricky, but possible.
RTE wrap multi <p> tags into <div> single tag
Hi Masters,
I want wrap 2
<p>
tags into<div>
single tag.Inputted:
Expected:
Action: I have customized StyleSheet as below image On Rich Text Editor, I used with this custom style
Result:
Please help me.
Thanks
Tuan Nguyen.
Just wrap the property output in a like this.
Remember to check first if the property has any value with HasProperty
Thanks for the solution, Sebastian.
But I want when Editor typed words and format as image
When Editor click "View Source Code", the result should display correctly.
Actual Result
Expected Result
Thanks.
Umbraco uses tinyMCE for its RTE.
It parses the content and applies rules, and I believe this is the default action of that product.
Perhaps check out /config/tinyMceConfig.config to see if there is a setting you can tweak to get what you need - specifically the valid elements rules.
It's also a pain at times, by marking entire paragraphs with a single custom format, instead of just the selected text, but tinyMCE support have shown no interest in allowing more control over that feature.
If you are a confident C# developer then you can hook into Umbraco events to manipulate the content when it is saved using the HTML Agility Pack (that comes as part of Umbraco install).
So you'll need to raise the Content Service saving event in an ApplicationEventHandler and then use the HTML Agility Pack to parse and reformat the HTML which would then save it back to Umbraco. Tricky, but possible.
Thanks Dan,
I will try your solution in next time, I think this solution is the right way to render source code property on RTE.
Thanks.
Tuan Nguyen.
is working on a reply...