百度Ueditor富文字編輯器上傳圖片
阿新 • • 發佈:2019-01-04
<script type="text/javascript">
window.UEDITOR_HOME_URL = '/resource/ueditor';
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
editor = UE.getEditor('container',{
toolbars:[['Source', 'Undo', 'Redo', 'Bold', 'pasteplain',
'selectall','preview','time','date', 'simpleupload'
]],
//關閉elementPath
elementPathEnabled:false,
//純文字貼上
pasteplain: true,
initialFrameHeight: 100,
initialFrameWidth: 470,
minFrameHeight: 100,
initialContent: '',
wordCount: true
});
UE.Editor.prototype.getActionUrl = function(action) {
if (action == 'uploadimage') {
return '/file/upload_image';
} else {
return this._bkGetActionUrl.call(this, action);
}
}
</script>
window.UEDITOR_HOME_URL = '/resource/ueditor';
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
editor = UE.getEditor('container',{
toolbars:[['Source', 'Undo', 'Redo', 'Bold', 'pasteplain',
'selectall','preview','time','date', 'simpleupload'
]],
//關閉elementPath
elementPathEnabled:false,
//純文字貼上
pasteplain: true,
initialFrameHeight: 100,
initialFrameWidth: 470,
minFrameHeight: 100,
initialContent: '',
wordCount: true
});
UE.Editor.prototype.getActionUrl = function(action) {
if (action == 'uploadimage') {
return '/file/upload_image';
} else {
return this._bkGetActionUrl.call(this, action);
}
}
</script>