简体   繁体   English

在编辑器 trumbowyg 中,将 div 标签替换为 p 标签

[英]In editor trumbowyg , replace div tag with p tag

trumbowyg rich text editor adds p tag on each line break, need to replace p tag with div tag. trumbowyg 富文本编辑器在每个换行符处添加 p 标签,需要用 div 标签替换 p 标签。

setting property 'semantic': false on initialization does not seem to be working设置属性“语义”:初始化时为 false 似乎不起作用

<trumbowyg [initialContent]="resolutionTemplateContent" [options]="options1">
</trumbowyg>

options1 = { removeformatPasted: true,
    semantic : false }

You need to tamper with cleanpaste.js file.您需要篡改 cleanpaste.js 文件。 In that file all the html tag replacement is done in cleanIt function.在该文件中,所有 html 标记替换都在cleanIt函数中完成。 There you can stop the replace在那里你可以停止替换

tag with tag带标签的标签

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 添加一个<p>标记到</p><div>在 Angular</div><div id="text_translate"><p> 这是我的 html 代码:</p><pre> &lt;div id="gameboard"&gt; &lt;/div&gt;</pre><p> 这是我在 .ts 文件中的代码</p><pre>document.getElementById('gameboard')?.append('&lt;p&gt;Hello&lt;/p&gt;')</pre><p> 使用此代码,我想将&lt;p&gt;标签添加到我的&lt;div id="gameboard"&gt; 。 单击按钮时,应执行此代码的所有内容。 但不知何故什么也没发生</p></div> - Adding a <p> tag to a <div> in Angular 如何用简单的DIV标签替换指令标签 - How to replace the directive Tag with a simple DIV tag <a>在中间添加标签</a><p>标签</p> - Add <a> tag in between <p> tag 我如何在 Angular 6+ 中替换<p-dataTable>和<p-column>用图标标记一个值? - How can i replace in Angular 6+ inside a <p-dataTable> and <p-column> tag a value with an icon? 如何在模板中绑定标签p? - How to bind the tag p in template? 如何将innerHtml放入ap标签 - How to fit innerHtml into a p tag 如何在 Angular 中将 html 标签添加到 Quill 文本编辑器的内容 div? - How can I add html tag to the content div of Quill text editor in Angular? HTML <div> 带有格式的标签 - HTML <div> tag with formatting 在 ap 标签中循环一个字符串数组 - Loop an array of string in a p tag 仅显示 3 行<p>标签包含几个<p></p> - Show only 3 lines in <p> tag which contains several <p></p>
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM