javascript 如何阻止 tinymce 将 <!DOCTYPE html><html><head></head><body> 添加到我输入的所有内容中?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17829239/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I stop tinymce from adding <!DOCTYPE html><html><head></head><body> to everything I enter?
提问by Alan2
I am using TinyMCE as the editor for a field in my database. When I use it and add the text "abc" then this is what gets stored in the database:
我使用 TinyMCE 作为数据库中某个字段的编辑器。当我使用它并添加文本“abc”时,这就是存储在数据库中的内容:
<!DOCTYPE html><html><head></head><body><p>abc</p></body></html>
How can I stop TinyMCE from adding everything around the <p>
tags?
如何阻止 TinyMCE 添加<p>
标签周围的所有内容?
回答by liyakat
maybe this can help , it's when i have add the plugin : fullpage
, add the properties button
也许这会有所帮助,当我添加插件时:fullpage
添加属性button
or hold of a plugin called FullPage.js
for TinyMCE.
或者持有一个叫FullPage.js
TinyMCE的插件。
hope this will help you.
希望这会帮助你。
回答by jaya
remove fullpage from plugin plugins: [ "advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "table contextmenu directionality emoticons template textcolor paste textcolor colorpicker textpattern" ],
从插件插件中删除整页:[“advlist 自动链接自动保存链接图像列表 charmap 打印预览 hr 锚分页符拼写检查”,“搜索替换 wordcount 视觉块visualchars 代码全屏插入日期时间媒体不间断”,“表格上下文菜单方向性表情模板 textcolor 粘贴 textcolor colorpicker textpattern”],