Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14753 closed Bug (invalid)

paste from word not working in chrome

Reported by: vaskar paul Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Paste from word is working properly in chrome, but it is working properly in firefox and IE. In Firefox the colors are coming as it is in the word file but in chrome the colors are disappearing, but the other formatting like bold, strickthrough are working in all browser. The issue is only with the color of the text that I am coping from the word file.

Please suggest what should I do to resolve the issue.

Attachments (1)

paste from word in ck editor.docx (361.6 KB) - added by vaskar paul 3 years ago.
screenshots

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by vaskar paul

screenshots

comment:1 Changed 3 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 4.5.10 (GitHub - master)

There are some problems with pasting from MS Word starting from CKEditor 4.5.0 but from what I have checked in your case it is enough to set both below properties to false and pasting works in both browsers
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveStyles http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles

Please note that it may be required to clear browser's cache as well (this is not Ctrl+F5)

comment:2 Changed 3 years ago by vaskar paul

I have already did the same according to your suggestion. Please check the config that I am using. Also Please suggest if I need to make any change in it to resolve the issue.

CKEDITOR.editorConfig = function( config ) {

config.language = 'es'; config.uiColor = '#F7B42C'; config.height = 300;

config.allowedContent = true; config.extraAllowedContent = 'table{background,background-color}';

config.colorButton_enableMore = false; config.colorButton_colors = 'CF5D4E,454545,FFF,CCC,DDD,CCEAEE,66AB16'; config.colorButton_enableAutomatic = false;

/config.colorButton_foreStyle = {

element: 'span', styles: { color: '#(color)' }

};

config.colorButton_backStyle = {

element: 'span', styles: { 'background-color': '#(color)' }

};/

config.toolbarCanCollapse = true; config.pasteFromWordPromptCleanup = true; config.pasteFromWordRemoveFontStyles = false; config.pasteFromWordNumberedHeadingToList = true; config.pasteFromWordRemoveStyles = false;

};

comment:3 in reply to:  1 Changed 3 years ago by vaskar paul

Replying to j.swiderski:

There are some problems with pasting from MS Word starting from CKEditor 4.5.0 but from what I have checked in your case it is enough to set both below properties to false and pasting works in both browsers
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveStyles http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles

Please note that it may be required to clear browser's cache as well (this is not Ctrl+F5)

comment:4 Changed 3 years ago by Jakub Ś

First of all, I'm sorry for late reply.

About problems with config:

  1. config.allowedContent = true; config.extraAllowedContent = 'table{background,background-color}'; This doesn't make sense as you first disable ACF and the add new rules to it. Once ACF is disabled there is no need to add new rules as it will have no effect.
  2. config.colorButton_foreStyle & config.colorButton_backStyle are default values. There is no need to repeat default configuration values in config file.

About the problem:
I can't confirm the text color issue. In my case (CKEditor 4.5.10 full package) text color is pasted as expected provided that both properties mentioned in comment:1 are set to false.
There is a problem with pasting background color but this has already been mentioned here http://dev.ckeditor.com/ticket/9991#comment:8 and will be resolved in CKEditor 4.6 when new paste from word filter will be introduced.

I'm not sure why you can't see text color in your editor but colors are perfectly visible in default one thus I can't really confirm this problem.

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