X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=public%2Fassets%2Fplugins%2Fckeditor%2Fsamples%2Fjs%2Fsample.js;h=80f1c2b89d944fadcfdcaf4e05179c1efa2709af;hb=6fdab3092eb5921e04b504e7c4b8d9a83a249fb1;hp=21cf97b1d15eba55453695dfc1435efe57d7d4dc;hpb=92637af87fcc7d9b13774acc187fd2e85d866a5e;p=motion.git diff --git a/public/assets/plugins/ckeditor/samples/js/sample.js b/public/assets/plugins/ckeditor/samples/js/sample.js index 21cf97b..80f1c2b 100644 --- a/public/assets/plugins/ckeditor/samples/js/sample.js +++ b/public/assets/plugins/ckeditor/samples/js/sample.js @@ -1,53 +1,53 @@ -/** - * Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md or http://ckeditor.com/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=http://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' ); - } -} )(); - +/** + * Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/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=http://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' ); + } +} )(); +