From c63493c899de714b05b0521bb38aab60d19030ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 20 Jan 2017 00:55:51 +0100 Subject: Validation initiale --- sources/core/creators/inline.js | 157 +++++++++++ sources/core/creators/themedui.js | 541 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 698 insertions(+) create mode 100644 sources/core/creators/inline.js create mode 100644 sources/core/creators/themedui.js (limited to 'sources/core/creators') diff --git a/sources/core/creators/inline.js b/sources/core/creators/inline.js new file mode 100644 index 0000000..adb402f --- /dev/null +++ b/sources/core/creators/inline.js @@ -0,0 +1,157 @@ +/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +( function() { + /** @class CKEDITOR */ + + /** + * Turns a DOM element with the `contenteditable` attribute set to `true` into a + * CKEditor instance. Check {@link CKEDITOR.dtd#$editable} for a list of + * allowed element names. + * + * **Note:** If the DOM element for which inline editing is being enabled does not have + * the `contenteditable` attribute set to `true`, the editor will start in read-only mode. + * + *
...
+ * ... + * CKEDITOR.inline( 'content' ); + * + * It is also possible to create an inline editor from the ` + * ... + * CKEDITOR.replace( 'myfield' ); + * + * var textarea = document.body.appendChild( document.createElement( 'textarea' ) ); + * CKEDITOR.replace( textarea ); + * + * @param {Object/String} element The DOM element (textarea), its ID, or name. + * @param {Object} [config] The specific configuration to apply to this + * editor instance. Configuration set here will override the global CKEditor settings + * (see {@link CKEDITOR.config}). + * @returns {CKEDITOR.editor} The editor instance created. + */ + CKEDITOR.replace = function( element, config ) { + return createInstance( element, config, null, CKEDITOR.ELEMENT_MODE_REPLACE ); + }; + + /** + * Creates a new editor instance at the end of a specific DOM element. + * + * + * + * + * + * CKEditor + * + * + * + * + *
+ * + * + * + * + * @param {Object/String} element The DOM element, its ID, or name. + * @param {Object} [config] The specific configuration to apply to this + * editor instance. Configuration set here will override the global CKEditor settings + * (see {@link CKEDITOR.config}). + * @param {String} [data] Since 3.3. Initial value for the instance. + * @returns {CKEDITOR.editor} The editor instance created. + */ + CKEDITOR.appendTo = function( element, config, data ) { + return createInstance( element, config, data, CKEDITOR.ELEMENT_MODE_APPENDTO ); + }; + + /** + * Replaces all ` + * + * + * + * + * + * + * @param {String} [className] The `