UNPKG

ckeditor5-build-strapi-wysiwyg

Version:
818 lines (687 loc) 6.73 MB
(function(d){ const l = d['en'] = d['en'] || {}; l.dictionary=Object.assign( l.dictionary||{}, {"%0 of %1":"%0 of %1","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment","Almost equal to":"Almost equal to",Angle:"Angle","Approximately equal to":"Approximately equal to",Aquamarine:"Aquamarine","Asterisk operator":"Asterisk operator","Austral sign":"Austral sign","back with leftwards arrow above":"back with leftwards arrow above",Background:"Background",Big:"Big","Bitcoin sign":"Bitcoin sign",Black:"Black","Block quote":"Block quote",Blue:"Blue","Blue marker":"Blue marker",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cedi sign":"Cedi sign","Cell properties":"Cell properties","Cent sign":"Cent sign","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Character categories":"Character categories","Choose heading":"Choose heading",Circle:"Circle",Code:"Code","Colon sign":"Colon sign",Color:"Color","Color picker":"Color picker",Column:"Column","Contains as member":"Contains as member","Copyright sign":"Copyright sign","Cruzeiro sign":"Cruzeiro sign","Currency sign":"Currency sign",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Degree sign":"Degree sign","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Division sign":"Division sign","Document colors":"Document colors","Dollar sign":"Dollar sign","Dong sign":"Dong sign",Dotted:"Dotted",Double:"Double","Double dagger":"Double dagger","Double exclamation mark":"Double exclamation mark","Double low-9 quotation mark":"Double low-9 quotation mark","Double question mark":"Double question mark",Downloadable:"Downloadable","downwards arrow to bar":"downwards arrow to bar","downwards dashed arrow":"downwards dashed arrow","downwards double arrow":"downwards double arrow","Drachma sign":"Drachma sign","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Edit source":"Edit source","Editor toolbar":"Editor toolbar","Element of":"Element of","Em dash":"Em dash","Empty set":"Empty set","Empty snippet content":"Empty snippet content","En dash":"En dash","end with leftwards arrow above":"end with leftwards arrow above","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Euro sign":"Euro sign","Euro-currency sign":"Euro-currency sign","Exclamation question mark":"Exclamation question mark","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","For all":"For all","Fraction slash":"Fraction slash","French franc sign":"French franc sign","Full size image":"Full size image","German penny sign":"German penny sign","Greater-than or equal to":"Greater-than or equal to","Greater-than sign":"Greater-than sign",Green:"Green","Green marker":"Green marker","Green pen":"Green pen",Grey:"Grey",Groove:"Groove","Guarani sign":"Guarani sign","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height",Highlight:"Highlight","Horizontal ellipsis":"Horizontal ellipsis","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","Hryvnia sign":"Hryvnia sign","HTML snippet":"HTML snippet",Huge:"Huge","Identical to":"Identical to","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Indian rupee sign":"Indian rupee sign",Infinity:"Infinity",Insert:"Insert","Insert code block":"Insert code block","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert HTML":"Insert HTML","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Integral:"Integral",Intersection:"Intersection","Inverted exclamation mark":"Inverted exclamation mark","Inverted question mark":"Inverted question mark",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Kip sign":"Kip sign","Latin capital letter a with breve":"Latin capital letter a with breve","Latin capital letter a with macron":"Latin capital letter a with macron","Latin capital letter a with ogonek":"Latin capital letter a with ogonek","Latin capital letter c with acute":"Latin capital letter c with acute","Latin capital letter c with caron":"Latin capital letter c with caron","Latin capital letter c with circumflex":"Latin capital letter c with circumflex","Latin capital letter c with dot above":"Latin capital letter c with dot above","Latin capital letter d with caron":"Latin capital letter d with caron","Latin capital letter d with stroke":"Latin capital letter d with stroke","Latin capital letter e with breve":"Latin capital letter e with breve","Latin capital letter e with caron":"Latin capital letter e with caron","Latin capital letter e with dot above":"Latin capital letter e with dot above","Latin capital letter e with macron":"Latin capital letter e with macron","Latin capital letter e with ogonek":"Latin capital letter e with ogonek","Latin capital letter eng":"Latin capital letter eng","Latin capital letter g with breve":"Latin capital letter g with breve","Latin capital letter g with cedilla":"Latin capital letter g with cedilla","Latin capital letter g with circumflex":"Latin capital letter g with circumflex","Latin capital letter g with dot above":"Latin capital letter g with dot above","Latin capital letter h with circumflex":"Latin capital letter h with circumflex","Latin capital letter h with stroke":"Latin capital letter h with stroke","Latin capital letter i with breve":"Latin capital letter i with breve","Latin capital letter i with dot above":"Latin capital letter i with dot above","Latin capital letter i with macron":"Latin capital letter i with macron","Latin capital letter i with ogonek":"Latin capital letter i with ogonek","Latin capital letter i with tilde":"Latin capital letter i with tilde","Latin capital letter j with circumflex":"Latin capital letter j with circumflex","Latin capital letter k with cedilla":"Latin capital letter k with cedilla","Latin capital letter l with acute":"Latin capital letter l with acute","Latin capital letter l with caron":"Latin capital letter l with caron","Latin capital letter l with cedilla":"Latin capital letter l with cedilla","Latin capital letter l with middle dot":"Latin capital letter l with middle dot","Latin capital letter l with stroke":"Latin capital letter l with stroke","Latin capital letter n with acute":"Latin capital letter n with acute","Latin capital letter n with caron":"Latin capital letter n with caron","Latin capital letter n with cedilla":"Latin capital letter n with cedilla","Latin capital letter o with breve":"Latin capital letter o with breve","Latin capital letter o with double acute":"Latin capital letter o with double acute","Latin capital letter o with macron":"Latin capital letter o with macron","Latin capital letter r with acute":"Latin capital letter r with acute","Latin capital letter r with caron":"Latin capital letter r with caron","Latin capital letter r with cedilla":"Latin capital letter r with cedilla","Latin capital letter s with acute":"Latin capital letter s with acute","Latin capital letter s with caron":"Latin capital letter s with caron","Latin capital letter s with cedilla":"Latin capital letter s with cedilla","Latin capital letter s with circumflex":"Latin capital letter s with circumflex","Latin capital letter t with caron":"Latin capital letter t with caron","Latin capital letter t with cedilla":"Latin capital letter t with cedilla","Latin capital letter t with stroke":"Latin capital letter t with stroke","Latin capital letter u with breve":"Latin capital letter u with breve","Latin capital letter u with double acute":"Latin capital letter u with double acute","Latin capital letter u with macron":"Latin capital letter u with macron","Latin capital letter u with ogonek":"Latin capital letter u with ogonek","Latin capital letter u with ring above":"Latin capital letter u with ring above","Latin capital letter u with tilde":"Latin capital letter u with tilde","Latin capital letter w with circumflex":"Latin capital letter w with circumflex","Latin capital letter y with circumflex":"Latin capital letter y with circumflex","Latin capital letter y with diaeresis":"Latin capital letter y with diaeresis","Latin capital letter z with acute":"Latin capital letter z with acute","Latin capital letter z with caron":"Latin capital letter z with caron","Latin capital letter z with dot above":"Latin capital letter z with dot above","Latin capital ligature ij":"Latin capital ligature ij","Latin capital ligature oe":"Latin capital ligature oe","Latin small letter a with breve":"Latin small letter a with breve","Latin small letter a with macron":"Latin small letter a with macron","Latin small letter a with ogonek":"Latin small letter a with ogonek","Latin small letter c with acute":"Latin small letter c with acute","Latin small letter c with caron":"Latin small letter c with caron","Latin small letter c with circumflex":"Latin small letter c with circumflex","Latin small letter c with dot above":"Latin small letter c with dot above","Latin small letter d with caron":"Latin small letter d with caron","Latin small letter d with stroke":"Latin small letter d with stroke","Latin small letter dotless i":"Latin small letter dotless i","Latin small letter e with breve":"Latin small letter e with breve","Latin small letter e with caron":"Latin small letter e with caron","Latin small letter e with dot above":"Latin small letter e with dot above","Latin small letter e with macron":"Latin small letter e with macron","Latin small letter e with ogonek":"Latin small letter e with ogonek","Latin small letter eng":"Latin small letter eng","Latin small letter f with hook":"Latin small letter f with hook","Latin small letter g with breve":"Latin small letter g with breve","Latin small letter g with cedilla":"Latin small letter g with cedilla","Latin small letter g with circumflex":"Latin small letter g with circumflex","Latin small letter g with dot above":"Latin small letter g with dot above","Latin small letter h with circumflex":"Latin small letter h with circumflex","Latin small letter h with stroke":"Latin small letter h with stroke","Latin small letter i with breve":"Latin small letter i with breve","Latin small letter i with macron":"Latin small letter i with macron","Latin small letter i with ogonek":"Latin small letter i with ogonek","Latin small letter i with tilde":"Latin small letter i with tilde","Latin small letter j with circumflex":"Latin small letter j with circumflex","Latin small letter k with cedilla":"Latin small letter k with cedilla","Latin small letter kra":"Latin small letter kra","Latin small letter l with acute":"Latin small letter l with acute","Latin small letter l with caron":"Latin small letter l with caron","Latin small letter l with cedilla":"Latin small letter l with cedilla","Latin small letter l with middle dot":"Latin small letter l with middle dot","Latin small letter l with stroke":"Latin small letter l with stroke","Latin small letter long s":"Latin small letter long s","Latin small letter n preceded by apostrophe":"Latin small letter n preceded by apostrophe","Latin small letter n with acute":"Latin small letter n with acute","Latin small letter n with caron":"Latin small letter n with caron","Latin small letter n with cedilla":"Latin small letter n with cedilla","Latin small letter o with breve":"Latin small letter o with breve","Latin small letter o with double acute":"Latin small letter o with double acute","Latin small letter o with macron":"Latin small letter o with macron","Latin small letter r with acute":"Latin small letter r with acute","Latin small letter r with caron":"Latin small letter r with caron","Latin small letter r with cedilla":"Latin small letter r with cedilla","Latin small letter s with acute":"Latin small letter s with acute","Latin small letter s with caron":"Latin small letter s with caron","Latin small letter s with cedilla":"Latin small letter s with cedilla","Latin small letter s with circumflex":"Latin small letter s with circumflex","Latin small letter t with caron":"Latin small letter t with caron","Latin small letter t with cedilla":"Latin small letter t with cedilla","Latin small letter t with stroke":"Latin small letter t with stroke","Latin small letter u with breve":"Latin small letter u with breve","Latin small letter u with double acute":"Latin small letter u with double acute","Latin small letter u with macron":"Latin small letter u with macron","Latin small letter u with ogonek":"Latin small letter u with ogonek","Latin small letter u with ring above":"Latin small letter u with ring above","Latin small letter u with tilde":"Latin small letter u with tilde","Latin small letter w with circumflex":"Latin small letter w with circumflex","Latin small letter y with circumflex":"Latin small letter y with circumflex","Latin small letter z with acute":"Latin small letter z with acute","Latin small letter z with caron":"Latin small letter z with caron","Latin small letter z with dot above":"Latin small letter z with dot above","Latin small ligature ij":"Latin small ligature ij","Latin small ligature oe":"Latin small ligature oe","Left aligned image":"Left aligned image","Left double quotation mark":"Left double quotation mark","Left single quotation mark":"Left single quotation mark","Left-pointing double angle quotation mark":"Left-pointing double angle quotation mark","leftwards arrow to bar":"leftwards arrow to bar","leftwards dashed arrow":"leftwards dashed arrow","leftwards double arrow":"leftwards double arrow","Less-than or equal to":"Less-than or equal to","Less-than sign":"Less-than sign","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","Lira sign":"Lira sign","List properties":"List properties","Livre tournois sign":"Livre tournois sign","Logical and":"Logical and","Logical or":"Logical or","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman",Macron:"Macron","Manat sign":"Manat sign","Media URL":"Media URL","media widget":"media widget","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells","Mill sign":"Mill sign","Minus sign":"Minus sign","Multiplication sign":"Multiplication sign","N-ary product":"N-ary product","N-ary summation":"N-ary summation",Nabla:"Nabla","Naira sign":"Naira sign","New sheqel sign":"New sheqel sign",Next:"Next","No preview available":"No preview available",None:"None","Nordic mark sign":"Nordic mark sign","Not an element of":"Not an element of","Not equal to":"Not equal to","Not sign":"Not sign","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","on with exclamation mark with left right arrow above":"on with exclamation mark with left right arrow above","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Overline:"Overline",Padding:"Padding",Paragraph:"Paragraph","Paragraph sign":"Paragraph sign","Partial differential":"Partial differential","Paste raw HTML here...":"Paste raw HTML here...","Paste the media URL in the input.":"Paste the media URL in the input.","Per mille sign":"Per mille sign","Per ten thousand sign":"Per ten thousand sign","Peseta sign":"Peseta sign","Peso sign":"Peso sign","Pink marker":"Pink marker","Plain text":"Plain text","Plus-minus sign":"Plus-minus sign","Pound sign":"Pound sign",Previous:"Previous","Proportional to":"Proportional to",Purple:"Purple","Question exclamation mark":"Question exclamation mark",Red:"Red","Red pen":"Red pen",Redo:"Redo","Registered sign":"Registered sign","Remove color":"Remove color","Remove Format":"Remove Format","Remove highlight":"Remove highlight","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Reversed paragraph sign":"Reversed paragraph sign","Rich Text Editor":"Rich Text Editor","Rich Text Editor, %0":"Rich Text Editor, %0",Ridge:"Ridge","Right aligned image":"Right aligned image","Right double quotation mark":"Right double quotation mark","Right single quotation mark":"Right single quotation mark","Right-pointing double angle quotation mark":"Right-pointing double angle quotation mark","rightwards arrow to bar":"rightwards arrow to bar","rightwards dashed arrow":"rightwards dashed arrow","rightwards double arrow":"rightwards double arrow",Row:"Row","Ruble sign":"Ruble sign","Rupee sign":"Rupee sign",Save:"Save","Save changes":"Save changes","Section sign":"Section sign","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image","Single left-pointing angle quotation mark":"Single left-pointing angle quotation mark","Single low-9 quotation mark":"Single low-9 quotation mark","Single right-pointing angle quotation mark":"Single right-pointing angle quotation mark",Small:"Small",Solid:"Solid","soon with rightwards arrow above":"soon with rightwards arrow above",Source:"Source","Special characters":"Special characters","Spesmilo sign":"Spesmilo sign","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Square root":"Square root","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Tenge sign":"Tenge sign","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative","Text highlight toolbar":"Text highlight toolbar","The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".":"The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".","The URL must not be empty.":"The URL must not be empty.","The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".":"The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".","There exists":"There exists","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.","Tilde operator":"Tilde operator",Tiny:"Tiny","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style","top with upwards arrow above":"top with upwards arrow above","Trade mark sign":"Trade mark sign","Tugrik sign":"Tugrik sign","Turkish lira sign":"Turkish lira sign",Turquoise:"Turquoise","Two dot leader":"Two dot leader",Underline:"Underline",Undo:"Undo",Union:"Union",Unlink:"Unlink","up down arrow with base":"up down arrow with base",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","upwards arrow to bar":"upwards arrow to bar","upwards dashed arrow":"upwards dashed arrow","upwards double arrow":"upwards double arrow","Vertical text alignment toolbar":"Vertical text alignment toolbar","Vulgar fraction one half":"Vulgar fraction one half","Vulgar fraction one quarter":"Vulgar fraction one quarter","Vulgar fraction three quarters":"Vulgar fraction three quarters",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Won sign":"Won sign","Wrap text":"Wrap text",Yellow:"Yellow","Yellow marker":"Yellow marker","Yen sign":"Yen sign"} );})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})); /*! * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["ClassicEditor"] = factory(); else root["ClassicEditor"] = factory(); })(self, function() { return /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./node_modules/@ckeditor/ckeditor5-alignment/src/alignment.js": /*!*********************************************************************!*\ !*** ./node_modules/@ckeditor/ckeditor5-alignment/src/alignment.js ***! \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ Alignment) /* harmony export */ }); /* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/core */ "./node_modules/ckeditor5/src/core.js"); /* harmony import */ var _alignmentediting__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./alignmentediting */ "./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentediting.js"); /* harmony import */ var _alignmentui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./alignmentui */ "./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentui.js"); /** * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @module alignment/alignment */ /** * The text alignment plugin. * * For a detailed overview, check the {@glink features/text-alignment Text alignment feature documentation} * and the {@glink api/alignment package page}. * * This is a "glue" plugin which loads the {@link module:alignment/alignmentediting~AlignmentEditing} and * {@link module:alignment/alignmentui~AlignmentUI} plugins. * * @extends module:core/plugin~Plugin */ class Alignment extends ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.Plugin { /** * @inheritDoc */ static get requires() { return [ _alignmentediting__WEBPACK_IMPORTED_MODULE_1__["default"], _alignmentui__WEBPACK_IMPORTED_MODULE_2__["default"] ]; } /** * @inheritDoc */ static get pluginName() { return 'Alignment'; } } /** * The configuration of the {@link module:alignment/alignment~Alignment alignment feature}. * * Read more in {@link module:alignment/alignment~AlignmentConfig}. * * @member {module:alignment/alignment~AlignmentConfig} module:core/editor/editorconfig~EditorConfig#alignment */ /** * The configuration of the {@link module:alignment/alignment~Alignment alignment feature}. * * ClassicEditor * .create( editorElement, { * alignment: { * options: [ 'left', 'right' ] * } * } ) * .then( ... ) * .catch( ... ); * * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}. * * @interface AlignmentConfig */ /** * Available alignment options. * * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`. Other values are ignored. * * **Note:** It is recommended to always use `'left'` or `'right'` as these are default values which the user should * normally be able to choose depending on the * {@glink features/ui-language#setting-the-language-of-the-content language of the editor content}. * * ClassicEditor * .create( editorElement, { * alignment: { * options: [ 'left', 'right' ] * } * } ) * .then( ... ) * .catch( ... ); * * By default the alignment is set inline using the `text-align` CSS property. To further customize the alignment, * you can provide names of classes for each alignment option using the `className` property. * * **Note:** Once you define the `className` property for one option, you need to specify it for all other options. * * ClassicEditor * .create( editorElement, { * alignment: { * options: [ * { name: 'left', className: 'my-align-left' }, * { name: 'right', className: 'my-align-right' } * ] * } * } ) * .then( ... ) * .catch( ... ); * * See the demo of {@glink features/text-alignment#configuring-alignment-options custom alignment options}. * * @member {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} module:alignment/alignment~AlignmentConfig#options */ /***/ }), /***/ "./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentcommand.js": /*!****************************************************************************!*\ !*** ./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentcommand.js ***! \****************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AlignmentCommand) /* harmony export */ }); /* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/core */ "./node_modules/ckeditor5/src/core.js"); /* harmony import */ var ckeditor5_src_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ckeditor5/src/utils */ "./node_modules/ckeditor5/src/utils.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@ckeditor/ckeditor5-alignment/src/utils.js"); /** * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @module alignment/alignmentcommand */ const ALIGNMENT = 'alignment'; /** * The alignment command plugin. * * @extends module:core/command~Command */ class AlignmentCommand extends ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.Command { /** * @inheritDoc */ refresh() { const editor = this.editor; const locale = editor.locale; const firstBlock = (0,ckeditor5_src_utils__WEBPACK_IMPORTED_MODULE_1__.first)( this.editor.model.document.selection.getSelectedBlocks() ); // As first check whether to enable or disable the command as the value will always be false if the command cannot be enabled. this.isEnabled = !!firstBlock && this._canBeAligned( firstBlock ); /** * A value of the current block's alignment. * * @observable * @readonly * @member {String} #value */ if ( this.isEnabled && firstBlock.hasAttribute( 'alignment' ) ) { this.value = firstBlock.getAttribute( 'alignment' ); } else { this.value = locale.contentLanguageDirection === 'rtl' ? 'right' : 'left'; } } /** * Executes the command. Applies the alignment `value` to the selected blocks. * If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute, * the command will remove the attribute from the selected blocks. * * @param {Object} [options] Options for the executed command. * @param {String} [options.value] The value to apply. * @fires execute */ execute( options = {} ) { const editor = this.editor; const locale = editor.locale; const model = editor.model; const doc = model.document; const value = options.value; model.change( writer => { // Get only those blocks from selected that can have alignment set const blocks = Array.from( doc.selection.getSelectedBlocks() ).filter( block => this._canBeAligned( block ) ); const currentAlignment = blocks[ 0 ].getAttribute( 'alignment' ); // Remove alignment attribute if current alignment is: // - default (should not be stored in model as it will bloat model data) // - equal to currently set // - or no value is passed - denotes default alignment. const removeAlignment = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.isDefault)( value, locale ) || currentAlignment === value || !value; if ( removeAlignment ) { removeAlignmentFromSelection( blocks, writer ); } else { setAlignmentOnSelection( blocks, writer, value ); } } ); } /** * Checks whether a block can have alignment set. * * @private * @param {module:engine/model/element~Element} block The block to be checked. * @returns {Boolean} */ _canBeAligned( block ) { return this.editor.model.schema.checkAttribute( block, ALIGNMENT ); } } // Removes the alignment attribute from blocks. // @private function removeAlignmentFromSelection( blocks, writer ) { for ( const block of blocks ) { writer.removeAttribute( ALIGNMENT, block ); } } // Sets the alignment attribute on blocks. // @private function setAlignmentOnSelection( blocks, writer, alignment ) { for ( const block of blocks ) { writer.setAttribute( ALIGNMENT, alignment, block ); } } /***/ }), /***/ "./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentediting.js": /*!****************************************************************************!*\ !*** ./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentediting.js ***! \****************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AlignmentEditing) /* harmony export */ }); /* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/core */ "./node_modules/ckeditor5/src/core.js"); /* harmony import */ var _alignmentcommand__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./alignmentcommand */ "./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentcommand.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@ckeditor/ckeditor5-alignment/src/utils.js"); /** * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @module alignment/alignmentediting */ /** * The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds * the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}. * @extends module:core/plugin~Plugin */ class AlignmentEditing extends ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.Plugin { /** * @inheritDoc */ static get pluginName() { return 'AlignmentEditing'; } /** * @inheritDoc */ constructor( editor ) { super( editor ); editor.config.define( 'alignment', { options: [ ..._utils__WEBPACK_IMPORTED_MODULE_2__.supportedOptions.map( option => ( { name: option } ) ) ] } ); } /** * @inheritDoc */ init() { const editor = this.editor; const locale = editor.locale; const schema = editor.model.schema; const options = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.normalizeAlignmentOptions)( editor.config.get( 'alignment.options' ) ); // Filter out unsupported options and those that are redundant, e.g. `left` in LTR / `right` in RTL mode. const optionsToConvert = options.filter( option => (0,_utils__WEBPACK_IMPORTED_MODULE_2__.isSupported)( option.name ) && !(0,_utils__WEBPACK_IMPORTED_MODULE_2__.isDefault)( option.name, locale ) ); // Once there is at least one `className` defined, we switch to alignment with classes. const shouldUseClasses = optionsToConvert.some( option => !!option.className ); // Allow alignment attribute on all blocks. schema.extend( '$block', { allowAttributes: 'alignment' } ); editor.model.schema.setAttributeProperties( 'alignment', { isFormatting: true } ); if ( shouldUseClasses ) { editor.conversion.attributeToAttribute( buildClassDefinition( optionsToConvert ) ); } else { // Downcast inline styles. editor.conversion.for( 'downcast' ).attributeToAttribute( buildDowncastInlineDefinition( optionsToConvert ) ); } const upcastInlineDefinitions = buildUpcastInlineDefinitions( optionsToConvert ); // Always upcast from inline styles. for ( const definition of upcastInlineDefinitions ) { editor.conversion.for( 'upcast' ).attributeToAttribute( definition ); } const upcastCompatibilityDefinitions = buildUpcastCompatibilityDefinitions( optionsToConvert ); // Always upcast from deprecated `align` attribute. for ( const definition of upcastCompatibilityDefinitions ) { editor.conversion.for( 'upcast' ).attributeToAttribute( definition ); } editor.commands.add( 'alignment', new _alignmentcommand__WEBPACK_IMPORTED_MODULE_1__["default"]( editor ) ); } } // Prepare downcast conversion definition for inline alignment styling. // @private function buildDowncastInlineDefinition( options ) { const definition = { model: { key: 'alignment', values: options.map( option => option.name ) }, view: {} }; for ( const { name } of options ) { definition.view[ name ] = { key: 'style', value: { 'text-align': name } }; } return definition; } // Prepare upcast definitions for inline alignment styles. // @private function buildUpcastInlineDefinitions( options ) { const definitions = []; for ( const { name } of options ) { definitions.push( { view: { key: 'style', value: { 'text-align': name } }, model: { key: 'alignment', value: name } } ); } return definitions; } // Prepare upcast definitions for deprecated `align` attribute. // @private function buildUpcastCompatibilityDefinitions( options ) { const definitions = []; for ( const { name } of options ) { definitions.push( { view: { key: 'align', value: name }, model: { key: 'alignment', value: name } } ); } return definitions; } // Prepare conversion definitions for upcast and downcast alignment with classes. // @private function buildClassDefinition( options ) { const definition = { model: { key: 'alignment', values: options.map( option => option.name ) }, view: {} }; for ( const option of options ) { definition.view[ option.name ] = { key: 'class', value: option.className }; } return definition; } /** * The alignment configuration format descriptor. * * const alignmentFormat = { * name: 'right', * className: 'my-align-right-class' * } * * @typedef {Object} module:alignment/alignmentediting~AlignmentFormat * * @property {'left'|'right'|'center'|'justify'} name One of the alignment names options. * * @property {String} className The CSS class used to represent the style in the view. * Used to override default, inline styling for alignment. */ /***/ }), /***/ "./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentui.js": /*!***********************************************************************!*\ !*** ./node_modules/@ckeditor/ckeditor5-alignment/src/alignmentui.js ***! \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AlignmentUI) /* harmony export */ }); /* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/core */ "./node_modules/ckeditor5/src/core.js"); /* harmony import */ var ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ckeditor5/src/ui */ "./node_modules/ckeditor5/src/ui.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@ckeditor/ckeditor5-alignment/src/utils.js"); /** * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @module alignment/alignmentui */ const iconsMap = new Map( [ [ 'left', ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.icons.alignLeft ], [ 'right', ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.icons.alignRight ], [ 'center', ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.icons.alignCenter ], [ 'justify', ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.icons.alignJustify ] ] ); /** * The default alignment UI plugin. * * It introduces the `'alignment:left'`, `'alignment:right'`, `'alignment:center'` and `'alignment:justify'` buttons * and the `'alignment'` dropdown. * * @extends module:core/plugin~Plugin */ class AlignmentUI extends ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.Plugin { /** * Returns the localized option titles provided by the plugin. * * The following localized titles corresponding with * {@link module:alignment/alignment~AlignmentConfig#options} are available: * * * `'left'`, * * `'right'`, * * `'center'`, * * `'justify'`. * * @readonly * @type {Object.<String,String>} */ get localizedOptionTitles() { const t = this.editor.t; return { 'left': t( 'Align left' ), 'right': t( 'Align right' ), 'center': t( 'Align center' ), 'justify': t( 'Justify' ) }; } /** * @inheritDoc */ static get pluginName() { return 'AlignmentUI'; } /** * @inheritDoc */ init() { const editor = this.editor; const componentFactory = editor.ui.componentFactory; const t = editor.t; const options = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.normalizeAlignmentOptions)( editor.config.get( 'alignment.options' ) ); options .map( option => option.name ) .filter( _utils__WEBPACK_IMPORTED_MODULE_2__.isSupported ) .forEach( option => this._addButton( option ) ); componentFactory.add( 'alignment', locale => { const dropdownView = (0,ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__.createDropdown)( locale ); // Add existing alignment buttons to dropdown's toolbar. const buttons = options.map( option => componentFactory.create( `alignment:${ option.name }` ) ); (0,ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__.addToolbarToDropdown)( dropdownView, buttons ); // Configure dropdown properties an behavior. dropdownView.buttonView.set( { label: t( 'Text alignment' ), tooltip: true } ); dropdownView.toolbarView.isVertical = true; dropdownView.toolbarView.ariaLabel = t( 'Text alignment toolbar' ); dropdownView.extendTemplate( { attributes: { class: 'ck-alignment-dropdown' } } ); // The default icon depends on the direction of the content. const defaultIcon = locale.contentLanguageDirection === 'rtl' ? iconsMap.get( 'right' ) : iconsMap.get( 'left' ); // Change icon to reflect current selection's alignment. dropdownView.buttonView.bind( 'icon' ).toMany( buttons, 'isOn', ( ...areActive ) => { // Get the index of an active button. const index = areActive.findIndex( value => value ); // If none of the commands is active, display either defaultIcon or the first button's icon. if ( index < 0 ) { return defaultIcon; } // Return active button's icon. return buttons[ index ].icon; } ); // Enable button if any of the buttons is enabled. dropdownView.bind( 'isEnabled' ).toMany( buttons, 'isEnabled', ( ...areEnabled ) => areEnabled.some( isEnabled => isEnabled ) ); return dropdownView; } ); } /** * Helper method for initializing the button and linking it with an appropriate command. * * @private * @param {String} option The name of the alignment option for which the button is added. */ _addButton( option ) { const editor = this.editor; editor.ui.componentFactory.add( `alignment:${ option }`, locale => { const command = editor.commands.get( 'alignment' ); const buttonView = new ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__.ButtonView( locale ); buttonView.set( { label: this.localizedOptionTitles[ option ], icon: iconsMap.get( option ), tooltip: true, isToggleable: true } ); // Bind button model to command. buttonView.bind( 'isEnabled' ).to( command ); buttonView.bind( 'isOn' ).to( command, 'value', value => value === option ); // Execute command. this.listenTo( buttonView, 'execute', () => { editor.execute( 'alignment', { value: option } ); editor.editing.view.focus(); } ); return buttonView; } ); } } /***/ }), /***/ "./node_modules/@ckeditor/ckeditor5-alignment/src/utils.js": /*!*****************************************************************!*\ !*** ./node_modules/@ckeditor/ckeditor5-alignment/src/utils.js ***! \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "isDefault": () => (/* binding */ isDefault), /* harmony export */ "isSupported": () => (/* binding */ isSupported), /* harmony export */ "normalizeAlignmentOptions": () => (/* binding */ normalizeAlignmentOptions), /* harmony export */ "supportedOptions": () => (/* binding */ supportedOptions) /* harmony export */ }); /* harmony import */ var ckeditor5_src_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/utils */ "./node_modules/ckeditor5/src/utils.js"); /** * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @module alignment/utils */ /** * The list of supported alignment options: * * * `'left'`, * * `'right'`, * * `'center'`, * * `'justify'` */ const supportedOptions = [ 'left', 'right', 'center', 'justify' ]; /** * Checks whether the passed option is supported by {@link module:alignment/alignmentediting~AlignmentEditing}. * * @param {String} option The option value to check. * @returns {Boolean} */ function isSupported( option ) { return supportedOptions.includes( option ); } /** * Checks whether alignment is the default one considering the direction * of the editor content. * * @param {String} alignment The name of the alignment to check. * @param {module:utils/locale~Locale} locale The {@link module:core/editor/editor~Editor#locale} instance. * @returns {Boolean} */ function isDefault( alignment, locale ) { // Right now only LTR is supported so the 'left' value is always the default one. if ( locale.contentLanguageDirection == 'rtl' ) { return alignment === 'right'; } else { return alignment === 'left'; } } /** * Brings the configuration to the common form, an array of objects. * * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Alignment plugin configuration. * @returns {Array.<module:alignment/alignmentediting~AlignmentFormat>} Normalized object holding the configuration. */ function normalizeAlignmentOptions( configuredOptions ) { const normalizedOptions = configuredOptions .map( option => { let result; if ( typeof option == 'string' ) { result = { name: option }; } else { result = option; } return result; } ) // Remove all unknown options. .filter( option => { const isNameValid = !!supportedOptions.includes( option.name ); if ( !isNameValid ) { /** * The `name` in one of the `alignment.options` is not recognized. * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`. * * @error alignment-config-name-not-recognized * @param {Object} option Options with unknown value of the `name` property. */ (0,ckeditor5_src_utils__WEBPACK_IMPORTED_MODULE_0__.logWarning)( 'alignment-config-name-not-recognized', { option } ); } return isNameValid; } ); const classNameCount = normalizedOptions.filter( option => !!option.className ).length; // We either use classes for all styling options or for none. if ( classNameCount && classNameCount < normalizedOptions.length ) { /** * The `className` property has to be defined for all options once at least one option declares `className`. * * @error alignment-config-classnames-are-missing * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Contents of `alignment.options`. */ throw new ckeditor5_src_utils__WEBPACK_IMPORTED_MODULE_0__.CKEditorError( 'alignment-config-classnames-are-missing', { configuredOptions } ); } // Validate resulting config. normalizedOptions.forEach( ( option, index, allOptions ) => { const succeedingOptions = allOptions.slice( index + 1 ); const nameAlreadyExists = succeedingOptions.some( item => item.name == option.name ); if ( nameAlreadyExists ) { /** * The same `name` in one of the `alignment.options` was already declared. * Each `name` representing one alignment option can be set exactly once. * * @error alignment-config-name-already-defined * @param {Object} option First option that declares given `name`. * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Contents of `alignment.options`. */ throw new ckeditor5_src_utils__WEBPACK_IMPORTED_MODULE_0__.CKEditorError( 'alignment-config-name-already-defined', { option, configuredOptions } ); } // The `className` property is present. Check for duplicates then. if ( option.className ) { const classNameAlreadyExists = succeedingOptions.some( item => item.className == option.className ); if ( classNameAlreadyExists ) { /** * The same `className` in one of the `alignment.options` was already declared. * * @error alignment-config-classname-already-defined * @param {Object} option First option that declares given `className`. * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions * Contents of `alignment.options`. */ throw new ckeditor5_src_utils__WEBPACK_IMPORTED_MODULE_0__.CKEditorError( 'alignment-config-classname-already-defined', { option, configuredOptions } ); } } } ); return normalizedOptions; } /***/ }), /***/ "./node_modules/@ckeditor/ckeditor5-autoformat/src/autoformat.js": /*!***********************************************************************!*\ !*** ./node_modules/@ckeditor/ckeditor5-autoformat/src/autoformat.js ***! \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ Autoformat) /* harmony export */ }); /* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/core */ "./node_modules/ckeditor5/src/core.js"); /* harmony import */ var ckeditor5_src_typing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ckeditor5/src/typing */ "./node_modules/ckeditor5/src/typing.js"); /* harmony import */ var _blockautoformatediting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blockautoformatediting */ "./node_modules/@ckeditor/ckeditor5-autoformat/src/blockautoformatediting.js"); /* harmony import */ var _inlineautoformatediting__WEBPACK_IMPORTED_MODULE_3_