Hi
I have searched the forum but didn't found anything about this.
If you follow this steps.
1. Go to the demo and go to source and enter
2. Go back and hit Enter after the text test.
3. Go to the ource and the code is
Shouldn't the could be?
I have searched the forum but didn't found anything about this.
If you follow this steps.
1. Go to the demo and go to source and enter
<div>test</div>
2. Go back and hit Enter after the text test.
3. Go to the ource and the code is
<div>test</div> <div> </div>
Shouldn't the could be?
<div><p>test</p> <p> </p> </div>
Re: Div-problem
However, when you manually in the code add block elements between the <div> </div>, like this:
<div class="redborder">
<h1> a head inserted in the code itself </h1>
<p> a paragraph inserted in the code itself </p>
</div>
after that, the div section will act in the editor as expected. Other blocks can be added in the div section, and also the div contextual menu appears with the right mouse button.
However, I do not want my users to dig into the html code, which seems the only way to get the wanted result. I created a workaround by creating a template, this underestimated but very useful option in fckeditor. An example to add in the fcktemplates.xml:
<Template title="my own div element">
<Description>Describe your div element here</Description>
<Html>
<![CDATA[<div class="redborder">
<p>Some text (this template refers to an own css class making a red border)</p>
<p>To be certain, an extra p block. I think one block should do the trick to let the div function properly.</p>
</div>]]>
</Html>
</Template>
(speaking about templates, the default behaviour that the current content of a page is deleted when choosing a template, can be altered in fckconfig,js:
FCKConfig.TemplateReplaceAll = false ;
Never understood why the default setting is true.
Sorry for switching off topic, but at least it works for your users.
About the div behaviour, in future versions, improvements are welcome.
Harry