简体   繁体   中英

How to add a new line to textAngular WYSIWYG editor

I want to add a new line to textAngular WYSIWYG editor.

I'm using \\n, but its not working

<text-angular ng-model="htmlContent" name="demo-editor" placeholder="sample text \n testttt"></text-angular>

在此处输入图片说明

Or

<text-angular ng-model="htmlContent" name="demo-editor" placeholder="sample text <br/> testttt"></text-angular>

在此处输入图片说明

First of all, you have to add this html class to your css

.placeholder-text::before {
  white-space: pre;
}

Then you can set the text with '\\a'.

<text-angular ng-model="htmlContent" name="demo-editor" placeholder="sample text \a testttt"></text-angular>

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM