1
This commit is contained in:
@@ -136,7 +136,7 @@ MultiEditor.init = function (type, ua, options) {
|
||||
MrichTextUitl.loadMoreEditorProfile();
|
||||
});
|
||||
} else if (type == 'detail') {
|
||||
MultiEditor.loadJSFile(MultiEditor.prefix + '/res/plugin/ueditor4thirdparty/rich.text.util.js?_t=' + new Date().getTime(), function () {
|
||||
MultiEditor.loadJSFile(MultiEditor.prefix + '/res/plugin/ueditor4thirdparty/rich.text.util.js?_t=', function () {
|
||||
MultiEditor.pcLoadProfile(type);
|
||||
})
|
||||
}
|
||||
@@ -159,7 +159,7 @@ MultiEditor.init = function (type, ua, options) {
|
||||
}, 500);
|
||||
} else {
|
||||
MultiEditor.hasLoadRichTextUitl = true;
|
||||
MultiEditor.loadJSFile(prefix + 'rich.text.util.js?_t=' + new Date().getTime(), function () {
|
||||
MultiEditor.loadJSFile(prefix + 'rich.text.util.js?_t=', function () {
|
||||
MultiEditor.pcLoadProfile(type);
|
||||
})
|
||||
}
|
||||
@@ -405,7 +405,7 @@ MultiEditor.getRichText = function (editorid) {
|
||||
* params options 其他参数
|
||||
*/
|
||||
MultiEditor.renderRichtext = function (richtextId, content, ua, options) {
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) || navigator.userAgent.indexOf('harmony') > -1) {
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) || navigator.userAgent.indexOf('harmony') > -1 && navigator.userAgent.indexOf('phone') > -1) {
|
||||
MultiEditor.isPhone = true;
|
||||
}
|
||||
|
||||
@@ -454,6 +454,9 @@ MultiEditor.pcLoadRichText = function (richtextId, content, options) {
|
||||
if(options && typeof options.catalogOptions != 'undefined') {
|
||||
RichTextUitl.catalogOptions = options.catalogOptions
|
||||
}
|
||||
if(options && typeof options.isAutoPlayVideo != 'undefined') {
|
||||
RichTextUitl.isAutoPlayVideo = options.isAutoPlayVideo
|
||||
}
|
||||
<!-- 富文本内容渲染到页面之前进行的操作-->
|
||||
content = RichTextUitl.beforeSetRtfContent(content);
|
||||
document.getElementById(richtextId).innerHTML = content;
|
||||
@@ -482,7 +485,12 @@ MultiEditor.destoryEditor = function (editorid) {
|
||||
|
||||
//编辑器markdown转html
|
||||
MultiEditor.insertMarkdown = function (editorid, text) {
|
||||
UE.getEditor('multi' + editorid).execCommand('inserthtml', RichTextUitl.markDownToHtml(text));
|
||||
if(MultiEditor.isPhone){
|
||||
var html = MrichTextUitl.markDownToHtml(text);
|
||||
MultiEditor.insertHTML(editorid, html);
|
||||
}else{
|
||||
UE.getEditor('multi' + editorid).execCommand('inserthtml', RichTextUitl.markDownToHtml(text));
|
||||
}
|
||||
}
|
||||
|
||||
//修改PC编辑器内容 id为dom查询条件,如#id,text为要修改的内容
|
||||
|
||||
Reference in New Issue
Block a user