Opened 9 years ago

Closed 9 years ago

#14378 closed Bug (invalid)

The style changes to italics in ckeditor.

Reported by: Dwayne Eubanks Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc: sarath.krishnan-t@…

Description

Steps to reproduce

1.If a text is copied from word and we dont clean it and there is a span attribute lang="EN" then the style changes to italics in ckeditor.

Expected result

The expected result is if there is a span attribute lang = EN then the style changes to italics.

Actual result

Other details (browser, OS, CKEditor version, installed plugins)

FYI – if we clean it loses the formatting so we should not clean it

Attachments (3)

config.zip (148.5 KB) - added by Dwayne Eubanks 9 years ago.
Steps.docx (230.7 KB) - added by Dwayne Eubanks 9 years ago.
Triage Text.docx (15.5 KB) - added by Dwayne Eubanks 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by Jakub Ś

Status: newpending
Summary: If a text is copied from word and we dont clean it and there is a span attribute lang="EN" then the style changes to italics in ckeditor.The style changes to italics in ckeditor.
Version: 4.5.6
  1. Please attach sample MS Word file which is causing problems for you.
  2. Could you attach screen shot showing this problem?
  3. Could you explain in more detail, what does it mean that you don't clean text copied from word? Have you set some configuration option(s) in CKEditor so as to not clean the text?
  4. Could you attach your build-config.js, config.js and HTML page where you use CKEditor?

Changed 9 years ago by Dwayne Eubanks

Attachment: config.zip added

Changed 9 years ago by Dwayne Eubanks

Attachment: Steps.docx added

Changed 9 years ago by Dwayne Eubanks

Attachment: Triage Text.docx added

comment:2 Changed 9 years ago by Dwayne Eubanks

Added three attachements from Sarath Krishnan. Sarath.Krishnan-t@…

comment:3 Changed 9 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

I would strongly recommend to clean pasted MS word file and enable ACF. If you are losing formatting you can configure ACF so that it leaves what you want to have in your editor. Currently you are having junk HTML which may cause some unexpected problems. I personally think it is better to spend some time on ACF configuration and have more control over content.

To learn more about ACF, please see:
http://docs.ckeditor.com/#!/guide/dev_acf
http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
http://docs.ckeditor.com/#!/guide/dev_disallowed_content
http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addTransformations
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-extraAllowedContent


To fix your current issue, please remove below rule from contents.css:

span[lang] {
    font-style: italic;
}

Please remember that this is a file where you can put styles for content area and it is best in these styles match your target page styles.


Another link that might be helpful: http://docs.ckeditor.com/

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