web/assets/libs/ckeditor/4.6.7/plugins/iframe/dialogs/iframe.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
( function() {
// Map 'true' and 'false' values to match W3C's specifications
// http://www.w3.org/TR/REC-html40/present/frames.html#h-16.5
var checkboxValues = {
scrolling: { 'true': 'yes', 'false': 'no' },
frameborder: { 'true': '1', 'false': '0' }
};
function loadValue( iframeNode ) {
var isCheckbox = this instanceof CKEDITOR.ui.dialog.checkbox;
if ( iframeNode.hasAttribute( this.id ) ) {
var value = iframeNode.getAttribute( this.id );
if ( isCheckbox )
this.setValue( checkboxValues[ this.id ][ 'true' ] == value.toLowerCase() );
else
this.setValue( value );
}
}
function commitValue( iframeNode ) {
var isRemove = this.getValue() === '',
isCheckbox = this instanceof CKEDITOR.ui.dialog.checkbox,
value = this.getValue();
if ( isRemove )
iframeNode.removeAttribute( this.att || this.id );
else if ( isCheckbox )
iframeNode.setAttribute( this.id, checkboxValues[ this.id ][ value ] );
else
iframeNode.setAttribute( this.att || this.id, value );
}
CKEDITOR.dialog.add( 'iframe', function( editor ) {
var iframeLang = editor.lang.iframe,
commonLang = editor.lang.common,
dialogadvtab = editor.plugins.dialogadvtab;
return {
title: iframeLang.title,
minWidth: 350,
minHeight: 260,
onShow: function() {
// Clear previously saved elements.
this.fakeImage = this.iframeNode = null;
var fakeImage = this.getSelectedElement();
if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'iframe' ) {
this.fakeImage = fakeImage;
var iframeNode = editor.restoreRealElement( fakeImage );
this.iframeNode = iframeNode;
this.setupContent( iframeNode );
}
},
onOk: function() {
var iframeNode;
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。