Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1855 closed New Feature (wontfix)

'p' or 'div'

Reported by: datalink Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.5.1
Keywords: Cc:


If there is text without p- or div-element and I click on indentation for example, FCKeditor makes automatically

<div style="margin-left: 20px">text...</div>

I want to work without DIVs in the contentarea of my pages.
Is it possible to make a choice in the config for 'p' or 'div'?

Change History (4)

comment:1 Changed 16 years ago by Wojciech Olchawa

Resolution: invalid
Status: newclosed


This really isn't a bug but an expected behavior. If you choose:

FCKConfig.EnterMode = 'p' ; //or 'div' or 'br'

tags p ,div and br will be automatically inserted in the code. So for example: if you have deleted the tags in the source view and than go back to WYSIWYG mode and to source view again, you will see that the tag is added again.

So, if you want to change the default tags which will be added to the code simply change the value of FCKConfig.EnterMode function.

comment:2 Changed 16 years ago by datalink

Resolution: invalid
Status: closedreopened

Hm, I don't write about the EnterMode. I mean the indent-, outdent-function. If you have pure text (not in a block) and you click on indent, FCKeditor makes source

<div style="margin-left: 20px">text...</div>

I want to set 'p' in the config, that FCKeditor makes source

<p style="margin-left: 20px">text...</p>

Normally FCKeditor makes automatically a paragraphs block around pure text. For testing configure

FCKConfig.EnterMode = 'br' ;
FCKConfig.ShiftEnterMode = 'p' ;

type text in FCKeditor and click on indent.

comment:3 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: reopenedclosed

That's the expected behavior for EnterMode=br. This is a visual requirement because if you have the following:

Line 1<br>
Line 2<br>
Line 3

When indenting "Line 2", you would not expect to have spaces between the lines. So, for that, a <div> "must" be used.

Line 1
<div style="margin-left: 20px">Line 2</div>
Line 3

Using a <p> there would add spaces between the lines.

Actually, we strongly recommend always using EnterMode=p. Other than the general benefits of it, in that mode, possible "block-less" text will use <p> tags instead.

comment:4 Changed 16 years ago by datalink

Ah, OK now I understand.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy