In Tiny Mce Editor I need to write a style which will
1.> Apply on a part of the line.
2.> Will wrap the selected part in ... tag.
The style em {em} is being applied on the whole paragraph. Which doesnt fullfill 1st createria.
Same I need to do with the q tag. I nned to select some part of line and put it inside "..... " quotation. If I write q{q} it is applied on the whole paragraph instead of selected part of paragraph.
Can you not do this in the tiny mce by selected the text and then selecting the style from the dropdown menu? You used to be able to? I am probably muissing something here :)
Styles in the Rich Text editor are limited - you can either define a style on a generic tag (H1, H2, P etc.) or as a named class which will wrap whatever you have highlighted in a span with the class name applied.
Thanks I too figure out the same thing that you have given as solution. As when I were writing styles for h1 and earlier style with tag h1 and since h1 is a block css element it was being applied on whole paragraph, so I wrote a class for it with the class name h1, and it is being applied on the selected part as span tag. So I am using ... .
Your answer will help me to justify the way I used for the solution. :)
Style in Tiny Mce
Hi Everyone,
In Tiny Mce Editor I need to write a style which will 1.> Apply on a part of the line. 2.> Will wrap the selected part in ... tag.
The style em {em} is being applied on the whole paragraph. Which doesnt fullfill 1st createria.
Same I need to do with the q tag. I nned to select some part of line and put it inside "..... " quotation. If I write q{q} it is applied on the whole paragraph instead of selected part of paragraph.
Thanks
Abhishek
The only thing I read is "I need" instead of asking a question. It might help if you ask a real question and describe what you've already tried.
Can you not do this in the tiny mce by selected the text and then selecting the style from the dropdown menu? You used to be able to? I am probably muissing something here :)
Styles in the Rich Text editor are limited - you can either define a style on a generic tag (H1, H2, P etc.) or as a named class which will wrap whatever you have highlighted in a span with the class name applied.
Examples:
If I have a class named
.quote
I can do this:Then when I apply the style to a selected word or words (highlighted below) in a paragraph like so:
The quick fox
jumped over the
lazy dogthe html becomes
and should in theory be rendered something like this:
You can also create styles that change the element of a block of text by specifying the element as the selector like so:
If you then click on a paragraph and choose the "Heading 1" style from the drop down the paragraph will be converted to a H2 with the default styling.
It's worth noting that not all tags can be converted or have classes applied -
img
tags for example are ignored.Hopefully this helps clarify things...
Hi Robert Foster,
Thanks I too figure out the same thing that you have given as solution. As when I were writing styles for h1 and earlier style with tag h1 and since h1 is a block css element it was being applied on whole paragraph, so I wrote a class for it with the class name h1, and it is being applied on the selected part as span tag. So I am using ... . Your answer will help me to justify the way I used for the solution. :)
Thanks,
Abhishek Kumar
is working on a reply...