selector: "textarea#content",
language: "vi",
theme: "advanced",
skin: "ugceditor",
skin_variant: "m3_1.02",
plugins: "media,paste",
width: 715,
height: 650,
theme_advanced_buttons1: "bold,italic,underline,
theme_advanced_buttons2: "",
theme_advanced_buttons3: "",
theme_advanced_toolbar_
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_
theme_advanced_path: false,
theme_advanced_resize_
theme_advanced_resizing_max_
theme_advanced_resizing_min_
theme_advanced_resizing_min_
paste_auto_cleanup_on_paste: true,
paste_remove_spans: true,
paste_remove_styles: true,
relative_urls : false,
tab_focus: ":prev,:next",
entity_encoding: "raw",
media_strict: false,
forced_root_block: 'div',
content_css: a + "/skins/ugceditor/content-1.
debug: false,
insertPhotos: {},
force_br_newlines: true,
force_p_newlines: false,
setup: function (b) {
// b.addButton("zemotions", {
// title: "Chèn biểu tượng",
// "class": "mce_emotions",
// onclick: blog.Emotion
// });
// b.addButton("zimage", {
// title: "Chèn hình ảnh",
// "class": "mce_image",
// onclick: blog.UploadImageNormal2
// });
// b.addButton("zmusic", {
// title: "Chèn nhạc",
// "class": "mce_music",
// onclick: blog.SearchMusic2
// });
b.addButton("zcode", {
title: "Sửa HTML Source",
"class": "mce_code",
onclick: function () {
this.windowManager.open({
url: a + "/source_editor.htm",
width: parseInt(b.getParam("theme_
height: parseInt(b.getParam("theme_
inline: true,
resizable: true,
maximizable: true
}, {
theme_url: a
})
}
});
b.onGetContent.add(function (c, d) {
if (d.source_view) {
d.content = d.content.replace(/<img([^>]*)
tinyMCE.settings.insertPhotos[
return '<span id="imgContent_' + k + '" class="imgContent"' + j + h + g + e + "></span>"
})
}
});
b.onBeforeSetContent.add(
if (d.source_view) {
d.content = d.content.replace(/<span\sid="
var f = tinyMCE.settings.insertPhotos[
if (f) {
return '<img id="imgContent_' + h + '" class="imgContent" src="' + f + '"' + g + " />"
}
return e
})
}
});
b.onSaveContent.add(function (c, d) {
d.content = d.content.replace(/<img([^>]*)
});
b.onPostRender.add(function (c) {
c.dom.bind(c.getBody(), "focus", blog.showToolbar)
})
},
paste_preprocess : function(pl, o) {
// Content string containing the HTML from the clipboard
var htmlObject = document.createElement('div');
htmlObject.innerHTML = o.content;
var a = htmlObject.
for(var i=0;i<a.length;i++){
console.log(a[i].innerHTML);
}
// o.content = "-: CLEANED :-\n" + o.content;
},
paste_postprocess : function(pl, o) {
// Content DOM node containing the DOM structure of the clipboard
// alert(o.node.innerHTML);
// o.node.innerHTML = o.node.innerHTML + "\n-: CLEANED :-";
}
})
});
Không có nhận xét nào:
Đăng nhận xét