Opened 11 years ago
Last modified 11 years ago
#11240 confirmed Bug
Basic formatting of a content of <pre> tag stripped by ACF is not preserved
Reported by: | Andrey Vaskovskiy | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.1 |
Keywords: | Cc: |
Description (last modified by )
Whenever I paste text with LINUX line breaks from clipboard into CKEDITOR with a toolbar that contains a 'Fotmat' button the text is processed correctly with line breaks, but if there's no 'Fotmat' button in toolbar - then the text is inserted in a single line.
Is it possible to configure CKEDITOR to process the text correctly in both cases without adding 'Fotmat' button in toolbar. (See attached files)
Reproducible in Version 4, and on CKEDTIOR demo page
http://ckeditor.com/demo#standard - correct insert http://ckeditor.com/demo#widgets - inserted as single line
Edit:
In this case this so called text copied from browsers is in fact html where top tag is <pre>
tag.
Because no pre is reported to ACF, filter removes pre tags but that is all it does.
ACF doesn't do anything to convert new line characters to e.g. <br />
or <p>
.
Attachments (4)
Change History (14)
Changed 11 years ago by
Attachment: | error_output added |
---|
Changed 11 years ago by
Attachment: | Correct paste.jpg added |
---|
Changed 11 years ago by
Attachment: | Single line.jpg added |
---|
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Status: | new → pending |
---|
I cannot reproduce it with your file neither on FF nor on Chrome. Checked with gedit and sublime on Ubuntu 12.04.
Which browser did you test?
Changed 11 years ago by
Attachment: | 12-3-2013 12-16-11 PM.avi added |
---|
comment:3 Changed 11 years ago by
It is reproducible with both FF and Chrome on Windows. See attached video.
comment:4 Changed 11 years ago by
Status: | pending → confirmed |
---|---|
Summary: | Paste text with LINUX line breaks (\n) → Basic formatting of a content of <pre> tag stripped by ACF is not preserved |
I see that you copied the content from browser, not from text editor. Browser renders a <pre> tag internally when opening a file. You can inspect that with dev tools.
So, when you copy text directly from browser, it's not a plain text - it's a <pre> tag with some content. But the editor without a format combo does not support <pre> tag, so it's stripped and text is not preformatted any more.
This can be considered a bug, but it's very specific and rare (copying text file from browser + lack of format combo), so it's unlikely that we'll work on this soon.
comment:5 Changed 11 years ago by
Thanks, but in version 3.6.4 pasting always worked fine despite buttons in toolbar
comment:6 Changed 11 years ago by
Yes, because ACF was introduced in CKEditor 4.1. If you switch ACF off you'll have pretty much the same result.
comment:7 Changed 11 years ago by
Version: | → 4.1 |
---|
comment:8 Changed 11 years ago by
Thank you Reinmar, as I understand the ACF can be turned off only by setting CKEDITOR.config.allowedContent to 'true', and it will affect all the editors on page. Can it be changed per editor instance ?
comment:9 Changed 11 years ago by
Sure it can be. Read about setting configuration: http://docs.ckeditor.com/#!/guide/dev_configuration
comment:10 Changed 11 years ago by
Description: | modified (diff) |
---|
Just download error_output attachmment and paste text into CKEDITOR demo samples to reproduce: http://ckeditor.com/demo#standard - correct insert http://ckeditor.com/demo#widgets - inserted as single line