From 1275e68efa680e55fd29a377c9c58c59bb7f235e Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 10 Jul 2018 22:01:22 +0800 Subject: =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/ckeditor/samples/js/sample.js | 53 -------------------------------------- html/ckeditor/samples/js/sf.js | 17 ------------ 2 files changed, 70 deletions(-) delete mode 100644 html/ckeditor/samples/js/sample.js delete mode 100644 html/ckeditor/samples/js/sf.js (limited to 'html/ckeditor/samples/js') diff --git a/html/ckeditor/samples/js/sample.js b/html/ckeditor/samples/js/sample.js deleted file mode 100644 index 7e7a52b..0000000 --- a/html/ckeditor/samples/js/sample.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license - */ - -/* exported initSample */ - -if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) - CKEDITOR.tools.enableHtml5Elements( document ); - -// The trick to keep the editor in the sample quite small -// unless user specified own height. -CKEDITOR.config.height = 150; -CKEDITOR.config.width = 'auto'; - -var initSample = ( function() { - var wysiwygareaAvailable = isWysiwygareaAvailable(), - isBBCodeBuiltIn = !!CKEDITOR.plugins.get( 'bbcode' ); - - return function() { - var editorElement = CKEDITOR.document.getById( 'editor' ); - - // :((( - if ( isBBCodeBuiltIn ) { - editorElement.setHtml( - 'Hello world!\n\n' + - 'I\'m an instance of [url=https://ckeditor.com]CKEditor[/url].' - ); - } - - // Depending on the wysiwygare plugin availability initialize classic or inline editor. - if ( wysiwygareaAvailable ) { - CKEDITOR.replace( 'editor' ); - } else { - editorElement.setAttribute( 'contenteditable', 'true' ); - CKEDITOR.inline( 'editor' ); - - // TODO we can consider displaying some info box that - // without wysiwygarea the classic editor may not work. - } - }; - - function isWysiwygareaAvailable() { - // If in development mode, then the wysiwygarea must be available. - // Split REV into two strings so builder does not replace it :D. - if ( CKEDITOR.revision == ( '%RE' + 'V%' ) ) { - return true; - } - - return !!CKEDITOR.plugins.get( 'wysiwygarea' ); - } -} )(); - diff --git a/html/ckeditor/samples/js/sf.js b/html/ckeditor/samples/js/sf.js deleted file mode 100644 index 904af3d..0000000 --- a/html/ckeditor/samples/js/sf.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license -*/ -var SF=function(){function d(a){return(a=a.attributes?a.attributes.getNamedItem("class"):null)?a.value.split(" "):[]}function c(a){var e=document.createAttribute("class");e.value=a.join(" ");return e}var b={attachListener:function(a,e,b){if(a.addEventListener)a.addEventListener(e,b,!1);else if(a.attachEvent)a.attachEvent("on"+e,function(){b.apply(a,arguments)});else throw Error("Could not attach event.");}};b.indexOf=function(){var a=Array.prototype.indexOf;return"function"===a?function(e,b){return a.call(e, -b)}:function(a,b){for(var c=a.length,d=0;d