Opened 13 years ago

Closed 13 years ago

#8818 closed Bug (invalid)

bbcode plugin ignores newlines

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

Description

Using this example: http://nightly.ckeditor.com/7397/_samples/bbcode.html

If you copy some text from a simple (non-rich) text editor and paste to ckeditor on chrome 17 on linux (but same problem on other os), it drops newlines.

This text: " Here is

a multiline text "

become: "Here isa multiline text" when you read it using getData();

Chrome generate <div></div> where firefox (that works) generate <br />

Change History (1)

comment:1 Changed 13 years ago by Jakub Ś

Keywords: bbcode newline removed
Resolution: invalid
Status: newclosed

This is because you have pasted plain text into WYSIWYG mode and not Source mode.
The rule is simple here: You paste HTML to WYSIWYG (it gets converted to bbcode) and text to Source mode (it gets converted to bbcode).

Let's say that you have pasted the below code. How should it be displayed?

<b>Foo
Bar

Baz

</b>

Of course it should look like:

[b]Foo Bar Baz[/b]

The same thing happens with text.

Please also note that forums that use bbcode allow for creating message in theirs source mode only and theirs wysiwyg mode is only used for preview. Because CKEditor's wysiwyg mode is more interactive it might have brought confusion.

Please also note that differences between browsers in handling text from notepad were covered here: http://dev.ckeditor.com/ticket/7622

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