|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 649 Location: Preston, UK
|
Guys,
Using the tinymce is there a button that can be added to insert / edit a div in rich text editor? At the moment i am adding them using html button then adding the div.
Regards
Ismail
Level 2 certified. If it aint broke dont fix.
|
|
 Rank: Newbie
Joined: 8/28/2007 Posts: 11 Location: Ealing, London
|
Hi Ismail,
There is a fairly simple way using TinyMCS.
First of all in umbraco / settings / stylings - locate the tinyMCE stylesheet.
Right click and create a new child of the tinyMCE stylesheet. Call it whatever you want, but make sure the alias is "div"
Assign a particualr edit-only color if you want - helps you see when you're in a specific element without changing front end code.
Save it and go to a rich text element.
Select a block of text, and then choos your new style from the "Styles" dropdown. It will enclose your selected text in the div tag :)
Save and heck your front end HTML
Happy coding
n
• loving umbraco • london
|
|
 Rank: Devotee
Joined: 8/31/2007 Posts: 82 Location: London, UK
|
Hi, I'm trying to do something very similar. But... Neil Tootell wrote: First of all in umbraco / settings / stylings - locate the tinyMCE stylesheet. Assign a particualr edit-only color if you want - helps you see when you're in a specific element without changing front end code.
I don't have a tinyMCE stylesheet, so I created an empty one called TinyMCE, and made a "div" style as a child of that. However when I go to the content and click the --styles-- dropdown of the rich text editor, there's nothing there. Is there something wrong with my tinyMCE set up?
|
|
 Rank: Devotee
Joined: 8/31/2007 Posts: 82 Location: London, UK
|
... oh and how can I create the edit-only style that you mention? Is it a css class?
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 649 Location: Preston, UK
|
Guys, With a bit of dirty hacking I have manged to get a div editor from sourceforge working for tinymce. More info hereRegards Ismail
Level 2 certified. If it aint broke dont fix.
|
|
Rank: Aficionado
Joined: 10/2/2007 Posts: 165 Location: Czech Republic
|
You don't see your new style in dropdown, becource you don't set TinyMce to use your new stylesheet.
Try Developer > DataTypes > RichTextEditor and check checbox with your new style in Related stylesheets
Hope this help
Petr Snobelt
|
|
 Rank: Devotee
Joined: 8/31/2007 Posts: 82 Location: London, UK
|
Ah! That's it! Many thanks.
|
|
|
Guest |