#12032 closed Bug (invalid)
Paste from word removing styles
Reported by: | Catalin | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Plugin : Paste from Word | Version: | |
Keywords: | Cc: |
Description
Hi,
The paste from word plugin is removing styles. Although the two config properties (pasteFromWordRemoveFontStyles and pasteFromWordRemoveStyles) are set to false.
Catalin
Attachments (2)
Change History (12)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Keywords: | paste from word remove style removed |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Version: | 4.3.2 |
I believe I can. Please read below links about ACF try to configure it or disable it if you don't plan to limit number of tags insterted into editor:
http://ckeditor.com/blog/Upgrading-to-CKEditor-4.1
http://ckeditor.com/blog/CKEditor-4.1-RC-Released
http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
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
http://nightly.ckeditor.com/14-03-20-07-05/full/samples/datafiltering.html
NOTE:
In all cases, the editor privileges semantics over formatting, so the end results will never look like the original (it will not be 1:1).
CKEditor makes it best to translate the information send from Word through the clipboard and many times it needs to come to an agreement. In those cases we prioritize semantics instead of formatting.
@gcatalin I'm closing this issue as invalid but if you still get problems please provide MS word file and explain what the problem is.
comment:3 Changed 10 years ago by
Hi, i attached a file that we used for testing. We are removing the images so please mind that. We get the text-align style preserved in the outcome text, but the color, font size and family are not there.
comment:4 Changed 10 years ago by
From what i could see in the debug, the text imported is made of a p that contains a span that contains the actual text, and the span also hold the style attribute. But spans are not allowed so the text is transferred to the p, but i guess the style attribute isn't. Is there a workaround for this or is it not possible in the current situation ?
comment:5 Changed 10 years ago by
From what I have checked text from Word looks almost the same as text in Editor.
Styles are imported.
Please disable ACF (allowedContent:true) and make sure that pasteFromWordRemoveFontStyles and pasteFromWordRemoveStyles are set to false.
comment:6 Changed 10 years ago by
Even color ? It doesn't work for me. ACF is disabled, and the two properties are set to false in "config.js". I'll see what i can do. Thanks.
comment:7 Changed 10 years ago by
var editor = CKEDITOR.replace( 'editor1', { allowedContent : true, pasteFromWordRemoveFontStyles : false, pasteFromWordRemoveStyles : false });
I have above in my editor and it works. If you have above options in config.js, cache refresh might be required. Please also note that I'm using this configuration with default CKEditor full package without any third-party plugins.
comment:8 Changed 10 years ago by
Oh, i see. You were pasting in the editor. I was referring to the paste from word plugin. It seems that removing the paste from word plugin, the styles are kept, even though lists have weird bug. I will look into handling that after the paste is done.
Any idea why the paste from word plugin doesn't work with styles ? Or is the plugin not used anymore at all (generally speaking) ?
comment:9 Changed 10 years ago by
Oh, i see. You were pasting in the editor.
No, paste from word is also fired on standard Ctrl+V when MS Word data is discovered. You should not remove this plugin.
If you have non-standard CKEditor build then please make sure that no third-party plugin is causing this.
Please also make sure you have cleared browsers cache (this isn't Ctrl+F5).
I have checked this issue one more time - you can check the result in attached file. This is default editor, full package with settings from last post and it works.
Changed 10 years ago by
Attachment: | Firefox.png added |
---|
comment:10 Changed 10 years ago by
Yes, i figure you were referring to the plugin too, after posting the comment. It does seem to be something related to my build. I will just have to debug. Thank you for your help.
Can anyone help me ?