Page 1 of 1

[SOLVED] DIV inside TinyMCE - or horizontal lines in content

Posted: Tue Nov 24, 2009 8:55 pm
by janvl
Hi all,

I wanted to put a horizontal ruler inside content.
Since is reserved for accessability I copied the code in the stylesheet:

div.horlin {
  height: 2px;
  padding: 1em;
  border-bottom: 2px solid #DDD;
  margin: 1em;
}

and added in NON-wysiwyg


If I save this I can se the line, BUT . . .If I try to edit the page again the code
"" is no longer visible
making it hard to get a good layout.

How does one solve this?

Well I made a user defined tag called "horiline" put the following php-code in it
echo "";

and use {horiline} which works perfect.

Thanks,
Jan

Re: [SOLVED] DIV inside TinyMCE - or horizontal lines in content

Posted: Tue Dec 01, 2009 9:11 am
by Fraserm
I know you solved your own issue and that's great, but I would have done it a bit different, purely to make it nicer for an average user to achieve...

Create the 'horline' class in a stylesheet and link that to TinyMCE with a simple meaningful name like 'horizontal separator', so that your users can take a new line where they need the separator and simply select the line from the style list.

In doing that you'd just span an empty paragraph with your 'horline' class and maybe that's not a good idea, but it does work.

Re: [SOLVED] DIV inside TinyMCE - or horizontal lines in content

Posted: Tue Dec 01, 2009 6:46 pm
by Dr.CSS
Tiny ate it because it was empty, you may have wanted to try   but ...

Re: [SOLVED] DIV inside TinyMCE - or horizontal lines in content

Posted: Sat Dec 05, 2009 11:42 pm
by janvl
Hi Fraserm

I will try that, later. The customer is already using the user defined tag.

Thanks anyway.

Jan

Re: [SOLVED] DIV inside TinyMCE - or horizontal lines in con

Posted: Wed Apr 13, 2011 1:18 pm
by applejack
Re: Tiny ate it because it was empty.

I am sure that before it didn't. Is there a way of stoping it doing so?