summaryrefslogtreecommitdiff
path: root/cgi-bin/html/ckeditor/samples/js/sample.js
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-11 22:04:43 +0800
committerchai <chaifix@163.com>2018-07-11 22:04:43 +0800
commitd351e45604f192df6ef710d476a8e529fefa73bf (patch)
tree4ca90a281ecd7ec89f1b010092aa0f5aeec06910 /cgi-bin/html/ckeditor/samples/js/sample.js
parent1275e68efa680e55fd29a377c9c58c59bb7f235e (diff)
update
Diffstat (limited to 'cgi-bin/html/ckeditor/samples/js/sample.js')
-rw-r--r--cgi-bin/html/ckeditor/samples/js/sample.js53
1 files changed, 0 insertions, 53 deletions
diff --git a/cgi-bin/html/ckeditor/samples/js/sample.js b/cgi-bin/html/ckeditor/samples/js/sample.js
deleted file mode 100644
index 7e7a52b..0000000
--- a/cgi-bin/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' );
- }
-} )();
-