Closed djbicycle closed 3 years ago
@djbicycle First, put a newline character between the text you want to newline.
const editor = new Editor({
// ...
initialEditType: 'wysiwyg',
placeholder: 'line1 \n line2'
});
Then, you need to customize it. You can add a style to the CSS selector as follows.
.tui-editor-contents-placeholder::before {
white-space: pre;
}
@djbicycle First, put a newline character between the text you want to newline.
const editor = new Editor({ // ... initialEditType: 'wysiwyg', placeholder: 'line1 \n line2' });
Then, you need to customize it. You can add a style to the CSS selector as follows.
.tui-editor-contents-placeholder::before { white-space: pre; }
It works, thank you!
Summary
I know there is a option for placeholder in editor, but I cannot find a way to set link break in the content of the placeholder. I tried for a line break, but it doesn't work. Is there any way to do that?
Version
@toast-ui/editor: 2.4.0 @toast-ui/vue-editor: 2.4.0
Additional Content
I tried for a line break, but it doesn't work
<editor :initialValue="value" ref="refEditor" :options="editorOptions" initialEditType="wysiwyg" />
editorOptions: { placeholder: "line1 line2" },