yuesu/Editors/tiny_mce3.5/themes/advanced/editor_template_src.js
(开头部分) 43KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* editor_template_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function(tinymce) {
var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
var applyDefaultFont = function (body, settings) {
var fontSize = settings.theme_advanced_default_font_size;
var fontFamily = settings.theme_advanced_default_font_family;
if (fontSize) {
body.style.fontSize = fontSize;
}
if (fontFamily) {
body.style.fontFamily = fontFamily;
}
};
var hasDefaultFontSizeOrFamily = function (settings) {
var fontSize = settings.theme_advanced_default_font_size;
var fontFamily = settings.theme_advanced_default_font_family;
return !!(fontSize || fontFamily);
};
// Generates a preview for a format
function getPreviewCss(ed, fmt) {
var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
previewStyles = ed.settings.preview_styles;
// No preview forced
if (previewStyles === false)
return '';
// Default preview
if (!previewStyles)
previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color';
// Removes any variables since these can't be previewed
function removeVars(val) {
return val.replace(/%(\w+)/g, '');
};
// Create block/inline element to use for preview
name = fmt.block || fmt.inline || 'span';
previewElm = dom.create(name);
// Add format styles to preview element
each(fmt.styles, function(value, name) {
value = removeVars(value);
if (value)
后面还有 1462 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
