|
百度UEditor文档默认编辑器模式黏贴会带有样式,所以想将默认模式换成纯文本贴图模式,今天看了UEditor文档重新修改一下配置文件pasteplain为即可true。
原生UEditor编辑器修改ueditor.config.js文件
- var ue = UE.getEditor('container', {
- toolbars: [
- ['fullscreen', 'source', 'undo', 'redo', 'bold']
- ],
- autoHeightEnabled: true,
- autoFloatEnabled: true,
- pasteplain: true});
复制代码 我本人用的zbolg系统,需要修改ueditor插件里面的ueditor.config.php文件
- $array_config = array(
- 'UEDITOR_HOME_URL' => 'URL',
- 'HOST_URL' => 'bloghost',
- 'serverUrl' => 'URL + "php/controller.php"',
- 'toolbars' => "[ " .
- "[ 'source', '|', 'undo', 'redo', '|', 'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript','forecolor', 'backcolor', '|', " .
- "'insertorderedlist', 'insertunorderedlist','indent', 'justifyleft', 'justifycenter', 'justifyright','|', 'removeformat','formatmatch','autotypeset', 'pasteplain'], " .
- "['paragraph', 'fontfamily', 'fontsize','|', 'emotion','link','insertimage','scrawl','insertvideo', 'attachment','spechars', 'map','|', "
- . ($zbp->option['ZC_SYNTAXHIGHLIGHTER_ENABLE'] ? "'insertcode'," : '')
- . "'blockquote', 'wordimage','inserttable', 'horizontal','fullscreen']]",
- 'shortcutMenu' => "['fontfamily', 'fontsize', 'bold', 'italic', 'underline', 'forecolor', 'backcolor']",
- 'maximumWords' => 1000000000,
- 'wordCountMsg' => '"当前已输入 {#count} 个字符" ',
- 'initialContent' => '"<p></p>"',
- 'initialStyle' => '"body{font-size:14px;font-family:微软雅黑,宋体,Arial,Helvetica,sans-serif;}"',
- 'wordCount' => 'true',
- 'elementPathEnabled' => 'true',
- 'initialFrameHeight' => '300',
- 'imageMaxSize' => $zbp->option['ZC_UPLOAD_FILESIZE'] * 1024 * 1024,
- 'fileMaxSize' => $zbp->option['ZC_UPLOAD_FILESIZE'] * 1024 * 1024,
- 'toolbarTopOffset' => '200',
- 'sourceEditor' => '\'' . ($zbp->option['ZC_CODEMIRROR_ENABLE'] ? 'codemirror' : 'textarea') . '\'',
- 'theme' => '"default"',
- 'themePath' => 'URL +"themes/"',
- 'lang' => '\'' . $lang . '\'',
- 'langPath' => 'URL+"lang/"',
- 'codeMirrorJsUrl' => 'URL+ "third-party/codemirror/codemirror.js"',
- 'codeMirrorCssUrl' => 'URL+ "third-party/codemirror/codemirror.css"',
- "maxUpFileSize" => $zbp->option['ZC_UPLOAD_FILESIZE'],
- "allowDivTransToP" => 'false',
- "catchRemoteImageEnable" => "false",
- "pasteplain" => "true",
- );
复制代码 百度UEditor编辑器文档前端配置地址:http://fex.baidu.com/ueditor/#start-config
|
|