Opened 12 years ago

Last modified 12 years ago

#9182 confirmed Bug

Indent does not recognize correct margin when expressed other than px

Reported by: Alvaro Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: HasPatch Cc:

Description

When I have a paragraph with margin-left:3in (for example) and click on increase indent button, ckeditor change margin-left to 43px.

Indent plugin get only the integer part ignoring unit.

To correct I've changed _source\plugins\indent\plugin.js adding CKEDITOR.tools.convertToPx to getStyle calls inside parseInt.

Attachments (2)

plugin.js (15.3 KB) - added by Alvaro 12 years ago.
_source/plugins/indent/plugin.js
9182.patch (2.2 KB) - added by Jakub Ś 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by Alvaro

Attachment: plugin.js added

_source/plugins/indent/plugin.js

Changed 12 years ago by Jakub Ś

Attachment: 9182.patch added

comment:1 Changed 12 years ago by Jakub Ś

Keywords: HasPatch added
Status: newconfirmed
Version: 3.6.33.0

There are config settings responsible for the correct unit:
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.indentClasses
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.indentOffset
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.indentUnit

but as I understand if you have settings made in px you still want to convert any other unit to proper amount of px.

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