Opened 5 years ago

Closed 4 years ago

#12771 closed Bug (invalid)

config.enterMode = CKEDITOR.ENTER_BR causes auto indent failure

Reported by: Ryan Daley Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Steps to reproduce:

  1. Use config.enterMode = CKEDITOR.ENTER_BR;
  2. Use Enter at an indent level (in editor subsequent line will appear at indent level as expected) but generated markup will result in non-auto indented output.

e.g. in editor everything LOOKS good:

Non Indented text

Indent Level 1

Auto Indented Level 1

Indent Level 2

Auto Indented Level 2

Auto Indented Level 2 again

Auto Indented Level 2 yet again

Resultant appearance of content however with <BR> produced markup:

Non Indented text

Indent Level 1

Auto Indented Level 1

Indent Level 2

Auto Indented Level 2

Auto Indented Level 2 again

Auto Indented Level 2 yet again

Because Markup will have <br> when enter is pressed and not get indents:

<div style="text-indent: 40px;">Indent Level 1<br>Auto Indented Level 1</div>

<div style="text-indent: 80px;">Indent Level 2<br>Auto Indented Level 2<br>Auto Indented Level 2 again<br>Auto Indented Level 2 yet again</div>

Browser and OS - Any

Screenshot - Illustrated above

Sample data - See above

Test case file - None

So the <br> tags within the indent div cause their following text to lose their indent from the div.

Change History (1)

comment:1 Changed 4 years ago by Jakub Ś

Keywords: Indent enterMode ENTER_BR removed
Resolution: invalid
Status: newclosed
Version: 4.4.5

By default the indent plugin uses margin-left and not text-indent. The first one works as expected while the other doesn't.

I'm not sure if you are making some style transformation when passing HTML to output but it looks that way. If I paste your sample code with text-indent it won't work in editor as well so it makes sense that in editor you use margin-left and in output text-indent.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy