web/assets/libs/ckeditor/4.6.7/plugins/image2/dialogs/image2.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* @fileOverview Image plugin based on Widgets API
*/
'use strict';
CKEDITOR.dialog.add( 'image2', function( editor ) {
// RegExp: 123, 123px, empty string ""
var regexGetSizeOrEmpty = /(^\s*(\d+)(px)?\s*$)|^$/i,
lockButtonId = CKEDITOR.tools.getNextId(),
resetButtonId = CKEDITOR.tools.getNextId(),
lang = editor.lang.image2,
commonLang = editor.lang.common,
lockResetStyle = 'margin-top:18px;width:40px;height:20px;',
lockResetHtml = new CKEDITOR.template(
'<div>' +
'<a href="javascript:void(0)" tabindex="-1" title="' + lang.lockRatio + '" class="cke_btn_locked" id="{lockButtonId}" role="checkbox">' +
'<span class="cke_icon"></span>' +
'<span class="cke_label">' + lang.lockRatio + '</span>' +
'</a>' +
'<a href="javascript:void(0)" tabindex="-1" title="' + lang.resetSize + '" class="cke_btn_reset" id="{resetButtonId}" role="button">' +
'<span class="cke_label">' + lang.resetSize + '</span>' +
'</a>' +
'</div>' ).output( {
lockButtonId: lockButtonId,
resetButtonId: resetButtonId
} ),
helpers = CKEDITOR.plugins.image2,
// Editor instance configuration.
config = editor.config,
// Content restrictions defined by the widget which
// impact on dialog structure and presence of fields.
features = editor.widgets.registered.image.features,
// Functions inherited from image2 plugin.
getNatural = helpers.getNatural,
// Global variables referring to the dialog's context.
doc, widget, image,
// Global variable referring to this dialog's image pre-loader.
preLoader,
// Global variables holding the original size of the image.
domWidth, domHeight,
// Global variables related to image pre-loading.
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。