![](/img/trans.png)
[英]Rails Redactor Gem, rich text editor adding annoying 'br' tags
[英]Automatic adding of p tags and br tags in editor
我想添加到
<script type="text/javascript">
document.write("<h1>This is a heading</h1>");
document.write("<p>This is a paragraph</p>");
</script>
WordPress的编辑器。我已经在编辑器的HTML模式下添加了它,但它被更改为
<p>
<script type="text/javascript">// <![CDATA[
document.write("
<h1>This is a heading</h1>
<p>");
document.write("
<p>This is a paragraph</p>
<p>");
// ]]></script>
</p>
我尝试在脚本代码之间插入,但无法正常工作。 我已经尝试了几个插件,例如原始html和内联javascript,但仍然无济于事。
你尝试过这个吗?
remove_filter( 'the_content', 'wpautop' );
谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.