I've made a couple of templates for my users. The templates are formated with divs.
My problem is when the user needs to make a h1,h2.. element inside the template, the editor automaticly closes my div tag and brakes the template.
Is there a way to prevent this behaviour, I would hate to make my templates with tables just for this reason.
Any help appreciated
Tue, 12/30/2008 - 22:29
#1
Re: template div tags closing unexpectedly
Re: template div tags closing unexpectedly
Here are the templates, very basic stuff just using id's to format the columns in css.
Re: template div tags closing unexpectedly
<div id="basic">input text here</div>
results in this HTML when people use the editor
<div id="basic">input text here</div>
<div>line 1</div>
<div>line 2</div>
Changing the template to
<div id="basic">
<p>input text here</p>
</div>
should do the trick.
Re: template div tags closing unexpectedly
Yes it works perfectly with the p tags
Many thanks, You have saved my day!
Re: template div tags closing unexpectedly
Hmmm? This seemed to work for me once upon a time (i think) but now no longer does.
It causes MANY upexpected results and is quite annoying.
What I get is my annoyingly wierd now.
My temlate (as it appears in source):
When the user highlights or clicks on a line and changee the format to a Heading 1 or Normal or whatever via the Format menu, the code turns into this:
THe div is gone and it put the div's class on all other block elements. Can anyone help? It's driving me and my client nuts!
- Liz
Re: template div tags closing unexpectedly
Oh Never mind....I work it out. ANother case of the IE Monster. Client is using IE and this issue happens in IE only. My default browser is FireFox3, hence it working for me. I was sitting with the client on their IE monster machine using the FCKEditor moments before my post.
If anyone does have an aswer for IE, don't hestitate to reply, but at least I don't feel like ripping out my hair anymore. *grumble grumble IE grumble*