Ticket #1855 (closed New Feature: wontfix)

Opened 2 years ago

Last modified 2 years ago

'p' or 'div'

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

Description

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

Changed 2 years ago by w.olchawa

  • status changed from new to closed
  • resolution set to invalid

Hi!

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.

Changed 2 years ago by datalink

  • status changed from closed to reopened
  • resolution invalid deleted

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.

Changed 2 years ago by fredck

  • status changed from reopened to closed
  • resolution set to wontfix

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.

Changed 2 years ago by datalink

Ah, OK now I understand.

Note: See TracTickets for help on using tickets.