Opened 11 years ago
Closed 11 years ago
#10684 closed Bug (invalid)
Paste from Word leaves margin attribute
Reported by: | santaclaus21 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Pasting | Version: | |
Keywords: | Cc: |
Description
So, I'm trying to use "Paste from Word" for copy html from web browser directly (leatest chrome).
I have used:
config.pasteFromWordRemoveFontStyles = true; config.pasteFromWordRemoveStyles = true;
but,
first: sometimes in html source I can see font size (!) with long fraction and px - even if source had defined it in "em".
second: code contains margin definition (eg. "<p style="margin-left:10px;">[...]</p>")
conclusion: I need only to copy clear html code, with strong, underline etc. without ANY STYLES and CLASS. Paste from Word gives not exactly what I need, "Paste as plain text" also (no strong, italic and underline)..
Any help? :)
Change History (1)
comment:1 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 4.2 |
This isn't bug in 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
You could use regex to filter and create new HTML. Property event.data.dataValue holds pasted HTML you can modify it assign new value to it.