my client just needs two style; small and large text. they are showing in the richtext editor drop down and when i highlight text, select a style like 'large', the richtext editor applies the style. but then once i hit save the text reverts back to its previous style! any reason why this might be the case?
Another explaination could be that the Rich Text editor does not allow by default to apply a "style" attribute on all tags. If the text you select contains such a tag, the style will not be saved.
I'm having a similar problem. My style shows up in the dropdown, but when I select it, the dropdown reverts back to the top "Styles" entry and applies nothing. The rule being applied is:
p .LogoCollage { text-align: center; }
Update: I removed the "p" element from the rule, and it seems to work, although quirkily.
Another explaination could be that the Rich Text editor does not allow by default to apply a "style" attribute on all tags. If the text you select contains such a tag, the style will not be saved.
Cheers,
Michael.
Is there somewhere that I can find what tags don't work?
Either I did something wrong, or that wasn't the solution. I found a list of the full XHTML rule set on the TinyMCE site and that didn't even make the difference.
My stylesheet property has the alias set to: blockquote.callOut
If I highlight text, and choose the Call Out property it does nothing.
If I remove "blockquote" from the alias it adds class="callOut" to the existing container (a "p" tag).
If I make the alias "blockquote .callOut" it does the same as "blockquote.callOut"
If I make the alias simply "blockquote" it adds the blockquote tag.
It seems to me that the "add an html tag with a class" part of the stylesheet property just isn't working. Can you confirm that you should be able to add an alias that contains both a tag and a class and it will add both to the HTML?
Banging against the same issue, as perfectly described by Doug. Reading the docs, my understanding is that I should be able to create a style with alias "h2.something" and obtain <h2 class="something">...</h2> but that does not work.
If the alias starts with a dot, then it is a class and it is applied to the currently selected block (if any) or to a new span
If the alias does not start with a dot, then it is a block type (eg <div>) and the current block changes for that type (eg <p> becomes <h2>).
In the latter case, the alias should _not_ contain a dot as that is not handled by Umbraco. So no, at the moment it is _not_ possible to both set a block type and a class at the same time / with one unique style.
I like the ability to set up specific styles for the editors. However you have to get it right the first time. Any updates to the name or alias don't seem to save reliably. Changes are not reflected in the richtext editor style dropdown. Even after deleting a style property, it still shows up in the richtext editor style dropdown. This seems to have been a bug for a very long time. Are there others that are having this problem? Is there a way around this?
I have created a h2 style that shows in the drop down. (not a class - no preceding dot). My client wants to be able to type in some text and change it to a heading, but you have to highlight the text and apply the style at least 3 times before it acknowledges what you want to do. In most cases, it just seems to remove the space (seems to be a break tag) under the highlighted text.
adding styles through umbraco richtext editor not working
Ive been following these instuctions to allow styles to be added through the richtext editor:
http://our.umbraco.org/wiki/how-tos/customizing-the-wysiwyg-rich-text-editor-(tinymce)/add-styles-to-the-drop-down-menu-for-editors-to-use
my client just needs two style; small and large text. they are showing in the richtext editor drop down and when i highlight text, select a style like 'large', the richtext editor applies the style. but then once i hit save the text reverts back to its previous style! any reason why this might be the case?
Hi Phil
How have you declared the styles in the stylesheet you use for the rich text editor?
I'm thinking what does it look like, for these "entries" you have made for the stylesheet? (Name, alias, style) in the Umbraco stylesheet editor.
Are you by any chance trying to insert <small> and <big> elements, with these styles?
/Jan
Hi Phil,
Another explaination could be that the Rich Text editor does not allow by default to apply a "style" attribute on all tags. If the text you select contains such a tag, the style will not be saved.
Cheers,
Michael.
I'm having a similar problem. My style shows up in the dropdown, but when I select it, the dropdown reverts back to the top "Styles" entry and applies nothing. The rule being applied is:
Update: I removed the "p" element from the rule, and it seems to work, although quirkily.
Is there somewhere that I can find what tags don't work?
Hi Michael
You can see the valid tags in the tinymceconfig.config file - hope this helps.
/Jan
Either I did something wrong, or that wasn't the solution. I found a list of the full XHTML rule set on the TinyMCE site and that didn't even make the difference.
My stylesheet property has the alias set to: blockquote.callOut
If I highlight text, and choose the Call Out property it does nothing.
If I remove "blockquote" from the alias it adds class="callOut" to the existing container (a "p" tag).
If I make the alias "blockquote .callOut" it does the same as "blockquote.callOut"
If I make the alias simply "blockquote" it adds the blockquote tag.
It seems to me that the "add an html tag with a class" part of the stylesheet property just isn't working. Can you confirm that you should be able to add an alias that contains both a tag and a class and it will add both to the HTML?
Banging against the same issue, as perfectly described by Doug. Reading the docs, my understanding is that I should be able to create a style with alias "h2.something" and obtain <h2 class="something">...</h2> but that does not work.
Responding to myself... checked the code and:
If the alias starts with a dot, then it is a class and it is applied to the currently selected block (if any) or to a new span
If the alias does not start with a dot, then it is a block type (eg <div>) and the current block changes for that type (eg <p> becomes <h2>).
In the latter case, the alias should _not_ contain a dot as that is not handled by Umbraco. So no, at the moment it is _not_ possible to both set a block type and a class at the same time / with one unique style.
Reference: plugins/umbracocss/editor_plugin_src.js
And that would be feature request http://issues.umbraco.org/issue/U4-1736
I like the ability to set up specific styles for the editors. However you have to get it right the first time. Any updates to the name or alias don't seem to save reliably. Changes are not reflected in the richtext editor style dropdown. Even after deleting a style property, it still shows up in the richtext editor style dropdown. This seems to have been a bug for a very long time. Are there others that are having this problem? Is there a way around this?
I'm having a similar issue.
I have created a h2 style that shows in the drop down. (not a class - no preceding dot). My client wants to be able to type in some text and change it to a heading, but you have to highlight the text and apply the style at least 3 times before it acknowledges what you want to do. In most cases, it just seems to remove the space (seems to be a break tag) under the highlighted text.
is working on a reply...