虽然我在我的tinymce.init中使用了“forced_root_block”,但p标记没有被删除。
下面是我的init函数
<script type="text/javascript" src="https://tinymce.cachefly.net/4.1/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea#fulldis",
mode : "textareas",
editor_selector : "fulldis",
setup: function (editor) { editor.on('change', function () {editor.save(); }); },
forced_root_block : "",
force_br_newlines : true,
force_p_newlines : false,
toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify "
});
</script>
看起来是这样的:
任何关于如何删除“p”的想法,如上面圈出的。
3条答案
按热度按时间9rnv2umw1#
将此行添加到init语句中。
完整的行可以是
0h4hbjxa2#
Use it. TinyMce automatically add "
" tag. You can set this option in tinyMce initialization like this on script ...
Or You can use it....
This should work fine on Chrome also. Which version of TinyMCE are you using?
BTW a dirty hack to solve this is to open tiny_mce_src.js file and look for this
and set it to
Thank You
z3yyvxxp3#
如果只想隐藏标签显示在tinymce状态栏上,那么需要使用这个选项,至少对于v5.x它是有效的:元素路径