tinymce-react icon indicating copy to clipboard operation
tinymce-react copied to clipboard

Double New Lines

Open vishwajit76 opened this issue 3 years ago • 2 comments

When I convert editor content to text format, It takes double lines instead of a single line.

editor.getContent({ format: "text", })

EditorValue

<p>Line 1</p>
<p>Line 2</p>

Is converted into

Line 1

Line 2

It Must Be

Line 1
Line 2

Note: One Extra Line was added Between "Line 1" & "Line 2".

image

vishwajit76 avatar Aug 13 '22 08:08 vishwajit76

Ref: INT-2994

exalate-issue-sync[bot] avatar Aug 13 '22 08:08 exalate-issue-sync[bot]

@vishwajit76 - This is NOT an issue. To achieve the required behaviour. Just do the following - Pass the following into the init object -

newline_behavior: "linebreak"

You would get the required behaviour. Refer to the official docs for v6 - newline_behavior parameter

Here is code-sandbox link with the required setting

In the console tab - You would see the see the text content. Screenshot -

image

jaspritt-hora avatar Aug 16 '22 17:08 jaspritt-hora