Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#5152 closed Bug (fixed)

Indentation using classes is buggy

Reported by: alfonsoml Owned by: alfonsoml
Priority: Normal Milestone: CKEditor 3.3
Component: Core : Styles Version: 3.3.1
Keywords: Review+ Cc: pwilk

Description

Seems that it's not possible to indent that way a third level, and removing the indent only works if there's a single level.

Tested with

indentClasses : ['Indent1', 'Indent2', 'Indent3'],

and

.Indent1
{
	margin-left: 40px;
}

.Indent2
{
	margin-left: 80px;
}

.Indent3
{
	margin-left: 120px;
}

Attachments (1)

5152.patch (1.2 KB) - added by alfonsoml 7 years ago.
Proposed patch

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by alfonsoml

Proposed patch

comment:1 Changed 7 years ago by alfonsoml

  • Keywords Review? added
  • Owner set to alfonsoml
  • Status changed from new to assigned

comment:2 Changed 7 years ago by fredck

  • Milestone set to CKEditor 3.3

comment:3 Changed 7 years ago by alfonsoml

  • Cc pwilk added

#5249 has been marked as dup

comment:4 Changed 7 years ago by garry.yao

  • Keywords Review+ added; Review? removed

comment:5 follow-up: Changed 7 years ago by alfonsoml

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [5211]

comment:6 in reply to: ↑ 5 Changed 6 years ago by jorgeoa

  • Version changed from 3.1 to 3.3.1

Replying to alfonsoml:

Fixed with [5211]

Hi,

In version 3.3.1 [5548] the indentation using classes bug "came back".

The code proposed by alfonsoml:

block.$.className = CKEDITOR.tools.ltrim( className + ' ' + editor.config.indentClasses[ indentStep - 1 ] );

was replaced with the buggy code:

element.addClass( editor.config.indentClasses[ indentStep - 1 ] ); 

Using the alfonso's patch works well:

element.$.className = CKEDITOR.tools.ltrim( className + ' ' + editor.config.indentClasses[ indentStep - 1 ] );

The bug also exists in 3.3.2 and 3.4 beta

comment:7 Changed 6 years ago by fredck

@jorgeoa, please open a new ticket for it as this one is already closed.

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