Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16992 closed Bug (invalid)

textarea with plain text and line breaks does not convert to pargraps

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

Description

Steps to reproduce

  1. create textarea with multiple lines : eg "line 1\n line 2\n"
  2. init ckeditor with CKEDITOR.replace
  3. view source - https://jsfiddle.net/rxj8ewca/1/

Expected result

It should be displayed as same as result of function: CKEDITOR.tools.transformPlainTextToHtml some workaround i found - https://jsfiddle.net/rxj8ewca/3/

Actual result

it displays everything in one line..

Other details (browser, OS, CKEditor version, installed plugins)

using standard ckeditor from CDN

Change History (3)

comment:1 Changed 7 years ago by Jakub Ś

Component: Core : ParserGeneral
Resolution: invalid
Status: newclosed
Version: 4.6.2

CKEditor expects encoded HTML inside textarea by default e.g.

<textarea name="editor" id="editor" rows="10" cols="80">
eilute 1&lt;br /&gt;
dar eilute 2
</textarea>

or

<textarea name="editor" id="editor" rows="10" cols="80">
&lt;p&gt;eilute 1&lt;/p&gt;
&lt;p&gt;dar eilute 2&lt;/p&gt;
</textarea>

If you want to use non-standard plain text and want it to keep formatting in the editor, you have used the right method.

comment:2 Changed 7 years ago by Edvardas

is it possible to init CKEDITOR on plain lines with function CKEDITOR.tools.transformPlainTextToHtml like some config parameter?

comment:3 Changed 7 years ago by Jakub Ś

There is no config parameter for it. I'm sorry.

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