Opened 10 years ago

Last modified 10 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 Jakub Ś)

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)

error_output (201 bytes) - added by Andrey Vaskovskiy 10 years ago.
Correct paste.jpg (93.2 KB) - added by Andrey Vaskovskiy 10 years ago.
Single line.jpg (111.6 KB) - added by Andrey Vaskovskiy 10 years ago.
12-3-2013 12-16-11 PM.avi (2.5 MB) - added by Andrey Vaskovskiy 10 years ago.

Change History (14)

Changed 10 years ago by Andrey Vaskovskiy

Attachment: error_output added

Changed 10 years ago by Andrey Vaskovskiy

Attachment: Correct paste.jpg added

Changed 10 years ago by Andrey Vaskovskiy

Attachment: Single line.jpg added

comment:1 Changed 10 years ago by Andrey Vaskovskiy

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

comment:2 Changed 10 years ago by Piotrek Koszuliński

Status: newpending

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 10 years ago by Andrey Vaskovskiy

Attachment: 12-3-2013 12-16-11 PM.avi added

comment:3 Changed 10 years ago by Andrey Vaskovskiy

It is reproducible with both FF and Chrome on Windows. See attached video.

comment:4 Changed 10 years ago by Piotrek Koszuliński

Status: pendingconfirmed
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 10 years ago by Andrey Vaskovskiy

Thanks, but in version 3.6.4 pasting always worked fine despite buttons in toolbar

comment:6 Changed 10 years ago by Piotrek Koszuliński

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 10 years ago by Piotrek Koszuliński

Version: 4.1

comment:8 Changed 10 years ago by Andrey Vaskovskiy

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 10 years ago by Piotrek Koszuliński

Sure it can be. Read about setting configuration: http://docs.ckeditor.com/#!/guide/dev_configuration

comment:10 Changed 10 years ago by Jakub Ś

Description: modified (diff)
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