Shop/WebContent/tiny_mce/plugins/preview/editor_plugin_src.js
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* $Id: editor_plugin_src.js 537 2008-01-14 16:38:33Z spocke $
*
* @author Moxiecode
* @copyright Copyright ?2004-2008, Moxiecode Systems AB, All rights reserved.
*/
(function() {
tinymce.create('tinymce.plugins.Preview', {
init : function(ed, url) {
var t = this;
t.editor = ed;
ed.addCommand('mcePreview', t._preview, t);
ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'});
},
getInfo : function() {
return {
longname : 'Preview',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
},
// Private methods
_preview : function() {
var ed = this.editor, win, html, c, pos, pos2, css, i, page = ed.getParam("plugin_preview_pageurl", null), w = ed.getParam("plugin_preview_width", "550"), h = ed.getParam("plugin_preview_height", "600");
// Use a custom preview page
if (page) {
ed.windowManager.open({
file : ed.getParam("plugin_preview_pageurl", null),
width : w,
height : h
}, {
resizable : "yes",
scrollbars : "yes",
inline : 1
});
} else {
win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + w + ",height=" + h);
html = "";
c = ed.getContent();
pos = c.indexOf('<body');
css = ed.getParam("content_css", '').split(',');
tinymce.map(css, function(u) {
return ed.documentBaseURI.toAbsolute(u);
});
if (pos != -1) {
pos = c.indexOf('>', pos);
pos2 = c.lastIndexOf('</body>');
c = c.substring(pos + 1, pos2);
}
后面还有 127 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。