简体   繁体   中英

Display empty <p> with TextAngular at render

Is there an easy way to keep empty <p> visible in wysiwyg when using TextAngular?

If the string is <h1>test</h1><p></p><p></p><h2>subtitle</h2> , when the page render and the content is passed to TextAngular, the HTML source code has all tags, but the wysiwyg doesn't show them.

Did I miss something? Thanks

Edit: here is a fiddle to demonstrate

It's not an elegant solution, but you can parse your html string and add &nbsp; to your empty tags.

this.html = "<h1>Test</h1><p>&nbsp;</p><p>&nbsp;</p><h2>Test</h2>";

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