Do you want to make all of the text enteren in the RTE field a <h2> ? In that case would'nt it be better to create a textring or textring multiple property?
If you just want to be able to mark up parts of the text in the RTE field with a <h2> tag then you should just go to the settings section and create a style called "rte" under the "stylesheets" folder - then right click the rte stylesheet to add a heading. Make sure it says "h2" in the alias field - without the quotes.
Then in the developer section expand the datatypes folder and go to the "rich text editor" datatype and associate the rte stylesheet. Also make sure that the "styles" dropdown box is checked.
The RTE is being used for the text of a leader paragraph which is going to be 2 or 3 paragraphs of larger text that is followed by normal paragraphs (p). I thought it would be good to utilise the the WYSIWIG of the RTE for this purpose as long as I could get it to generate H2 for each new paragraph instead of the default p.
Its not the end of the world so I think I will have to go with a div called leader in the template and put p inside of that so I can format div.leader p in the css.
Ok, in that case I think I would just go for a textstring multiple.
But if you still need to use the RTE field you can easily strip all the html by using the umbraco.library:StripHtml() extension and then just wrap the content in <h2></h2>
I think your idea of wrapping the <p> tags in a div with an ID or class that you can style to be bigger/bolder/whatever was my first though of what I would do. This would probably be the quickest solution at least, but would also more closely preserve the semantic intention of a "heading" to be exactly that, rather than being used as a synopsis or abstract like you were already suggesting.
Restrict to H2 only in Rich Text Editor
Hi
I want to be able to allow only h2 markup in the rich text editor. The html usually defaults to a p if no style is selected.
Is there any way to do this ie I want the WYSIWIG editing but the underlying html should default to H2 elements.
Anyone know if this is possible?
Thanks
Julian
Hi Julian
Do you want to make all of the text enteren in the RTE field a <h2> ? In that case would'nt it be better to create a textring or textring multiple property?
If you just want to be able to mark up parts of the text in the RTE field with a <h2> tag then you should just go to the settings section and create a style called "rte" under the "stylesheets" folder - then right click the rte stylesheet to add a heading. Make sure it says "h2" in the alias field - without the quotes.
Then in the developer section expand the datatypes folder and go to the "rich text editor" datatype and associate the rte stylesheet. Also make sure that the "styles" dropdown box is checked.
Hope this helps.
/Jan
Thanks Jan
Althogh I know how to do all of this stuff.
The RTE is being used for the text of a leader paragraph which is going to be 2 or 3 paragraphs of larger text that is followed by normal paragraphs (p). I thought it would be good to utilise the the WYSIWIG of the RTE for this purpose as long as I could get it to generate H2 for each new paragraph instead of the default p.
Its not the end of the world so I think I will have to go with a div called leader in the template and put p inside of that so I can format div.leader p in the css.
Thanks again
Jules
Hi Jules
Ok, in that case I think I would just go for a textstring multiple.
But if you still need to use the RTE field you can easily strip all the html by using the umbraco.library:StripHtml() extension and then just wrap the content in <h2></h2>
/Jan
Hi Julian,
I think your idea of wrapping the <p> tags in a div with an ID or class that you can style to be bigger/bolder/whatever was my first though of what I would do. This would probably be the quickest solution at least, but would also more closely preserve the semantic intention of a "heading" to be exactly that, rather than being used as a synopsis or abstract like you were already suggesting.
Best of luck!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.