{"version":3,"sources":["jsdelivr-header.js","/npm/@ckeditor/ckeditor5-paragraph@48.1.1/dist/index.js","/npm/@ckeditor/ckeditor5-paragraph@48.1.1/src/paragraphcommand.ts","/npm/@ckeditor/ckeditor5-paragraph@48.1.1/src/insertparagraphcommand.ts","/npm/@ckeditor/ckeditor5-paragraph@48.1.1/src/paragraph.ts","/npm/@ckeditor/ckeditor5-paragraph@48.1.1/src/paragraphbuttonui.ts"],"names":[],"mappings":"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","file":"/npm/@ckeditor/ckeditor5-paragraph@48.1.1/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/@ckeditor/ckeditor5-paragraph@48.1.1/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { IconParagraph } from '@ckeditor/ckeditor5-icons/dist/index.js';\n\n/**\n * The paragraph command.\n */ class ParagraphCommand extends Command {\n    constructor(editor){\n        super(editor);\n        // Since this command may pass selection in execution block, it should be checked directly.\n        this._isEnabledBasedOnSelection = false;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const document = model.document;\n        const block = first(document.selection.getSelectedBlocks());\n        this.value = !!block && block.is('element', 'paragraph');\n        this.isEnabled = !!block && checkCanBecomeParagraph(block, model.schema);\n    }\n    /**\n\t * Executes the command. All the blocks (see {@link module:engine/model/schema~ModelSchema}) in the selection\n\t * will be turned to paragraphs.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.selection The selection that the command should be applied to. By default,\n\t * if not provided, the command is applied to the {@link module:engine/model/document~ModelDocument#selection}.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        const selection = options.selection || document.selection;\n        // Don't execute command if selection is in non-editable place.\n        if (!model.canEditAt(selection)) {\n            return;\n        }\n        model.change((writer)=>{\n            const blocks = selection.getSelectedBlocks();\n            for (const block of blocks){\n                if (!block.is('element', 'paragraph') && checkCanBecomeParagraph(block, model.schema)) {\n                    writer.rename(block, 'paragraph');\n                }\n            }\n        });\n    }\n}\n/**\n * Checks whether the given block can be replaced by a paragraph.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n */ function checkCanBecomeParagraph(block, schema) {\n    return schema.checkChild(block.parent, 'paragraph') && !schema.isObject(block);\n}\n\n/**\n * The insert paragraph command. It inserts a new paragraph at a specific\n * {@link module:engine/model/position~ModelPosition document position}.\n *\n * ```ts\n * // Insert a new paragraph before an element in the document.\n * editor.execute( 'insertParagraph', {\n *   position: editor.model.createPositionBefore( element )\n * } );\n * ```\n *\n * If a paragraph is disallowed in the context of the specific position, the command\n * will attempt to split position ancestors to find a place where it is possible\n * to insert a paragraph.\n *\n * **Note**: This command moves the selection to the inserted paragraph.\n */ class InsertParagraphCommand extends Command {\n    constructor(editor){\n        super(editor);\n        // Since this command passes position in execution block instead of selection, it should be checked directly.\n        this._isEnabledBasedOnSelection = false;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.position The model position at which the new paragraph will be inserted.\n\t * @param options.attributes Attributes keys and values to set on a inserted paragraph.\n\t * @fires execute\n\t */ execute(options) {\n        const model = this.editor.model;\n        const attributes = options.attributes;\n        let position = options.position;\n        // Don't execute command if position is in non-editable place.\n        if (!model.canEditAt(position)) {\n            return null;\n        }\n        return model.change((writer)=>{\n            position = this._findPositionToInsertParagraph(position, writer);\n            if (!position) {\n                return null;\n            }\n            const paragraph = writer.createElement('paragraph');\n            if (attributes) {\n                model.schema.setAllowedAttributes(paragraph, attributes, writer);\n            }\n            model.insertContent(paragraph, position);\n            writer.setSelection(paragraph, 'in');\n            return writer.createPositionAt(paragraph, 0);\n        });\n    }\n    /**\n\t * Returns the best position to insert a new paragraph.\n\t */ _findPositionToInsertParagraph(position, writer) {\n        const model = this.editor.model;\n        if (model.schema.checkChild(position, 'paragraph')) {\n            return position;\n        }\n        const allowedParent = model.schema.findAllowedParent(position, 'paragraph');\n        // It could be there's no ancestor limit that would allow paragraph.\n        // In theory, \"paragraph\" could be disallowed even in the \"$root\".\n        if (!allowedParent) {\n            return null;\n        }\n        const positionParent = position.parent;\n        const isTextAllowed = model.schema.checkChild(positionParent, '$text');\n        // At empty $block or at the end of $block.\n        // <paragraph>[]</paragraph> ---> <paragraph></paragraph><paragraph>[]</paragraph>\n        // <paragraph>foo[]</paragraph> ---> <paragraph>foo</paragraph><paragraph>[]</paragraph>\n        if (positionParent.isEmpty || isTextAllowed && position.isAtEnd) {\n            return model.createPositionAfter(positionParent);\n        }\n        // At the start of $block with text.\n        // <paragraph>[]foo</paragraph> ---> <paragraph>[]</paragraph><paragraph>foo</paragraph>\n        if (!positionParent.isEmpty && isTextAllowed && position.isAtStart) {\n            return model.createPositionBefore(positionParent);\n        }\n        return writer.split(position, allowedParent).position;\n    }\n}\n\n/**\n * The paragraph feature for the editor.\n *\n * It introduces the `<paragraph>` element in the model which renders as a `<p>` element in the DOM and data.\n *\n * It also brings two editors commands:\n *\n * * The {@link module:paragraph/paragraphcommand~ParagraphCommand `'paragraph'`} command that converts all\n * blocks in the model selection into paragraphs.\n * * The {@link module:paragraph/insertparagraphcommand~InsertParagraphCommand `'insertParagraph'`} command\n * that inserts a new paragraph at a specified location in the model.\n */ class Paragraph extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Paragraph';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n        return true;\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        editor.commands.add('paragraph', new ParagraphCommand(editor));\n        editor.commands.add('insertParagraph', new InsertParagraphCommand(editor));\n        // Schema.\n        model.schema.register('paragraph', {\n            inheritAllFrom: '$block'\n        });\n        editor.conversion.elementToElement({\n            model: 'paragraph',\n            view: 'p'\n        });\n        // Conversion for paragraph-like elements which has not been converted by any plugin.\n        editor.conversion.for('upcast').elementToElement({\n            model: (viewElement, { writer })=>{\n                if (!Paragraph.paragraphLikeElements.has(viewElement.name)) {\n                    return null;\n                }\n                // Do not auto-paragraph empty elements.\n                if (viewElement.isEmpty) {\n                    return null;\n                }\n                return writer.createElement('paragraph');\n            },\n            view: /.+/,\n            converterPriority: 'low'\n        });\n    }\n    /**\n\t * A list of element names which should be treated by the autoparagraphing algorithms as\n\t * paragraph-like. This means that e.g. the following content:\n\t *\n\t * ```html\n\t * <h1>Foo</h1>\n\t * <table>\n\t *   <tr>\n\t *     <td>X</td>\n\t *     <td>\n\t *       <ul>\n\t *         <li>Y</li>\n\t *         <li>Z</li>\n\t *       </ul>\n\t *     </td>\n\t *   </tr>\n\t * </table>\n\t * ```\n\t *\n\t * contains five paragraph-like elements: `<h1>`, two `<td>`s and two `<li>`s.\n\t * Hence, if none of the features is going to convert those elements the above content will be automatically handled\n\t * by the paragraph feature and converted to:\n\t *\n\t * ```html\n\t * <p>Foo</p>\n\t * <p>X</p>\n\t * <p>Y</p>\n\t * <p>Z</p>\n\t * ```\n\t *\n\t * Note: The `<td>` containing two `<li>` elements was ignored as the innermost paragraph-like elements\n\t * have a priority upon conversion.\n\t */ static paragraphLikeElements = new Set([\n        'blockquote',\n        'dd',\n        'div',\n        'dt',\n        'h1',\n        'h2',\n        'h3',\n        'h4',\n        'h5',\n        'h6',\n        'li',\n        'p',\n        'td',\n        'th'\n    ]);\n}\n\n/**\n * This plugin defines the `'paragraph'` button. It can be used together with\n * {@link module:heading/headingbuttonsui~HeadingButtonsUI} to replace the standard heading dropdown.\n *\n * This plugin is not loaded automatically by the {@link module:paragraph/paragraph~Paragraph} plugin. It must\n * be added manually.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n *     toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */ class ParagraphButtonUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Paragraph\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        editor.ui.componentFactory.add('paragraph', (locale)=>{\n            const view = new ButtonView(locale);\n            const command = editor.commands.get('paragraph');\n            view.label = t('Paragraph');\n            view.icon = IconParagraph;\n            view.tooltip = true;\n            view.isToggleable = true;\n            view.bind('isEnabled').to(command);\n            view.bind('isOn').to(command, 'value');\n            view.on('execute', ()=>{\n                editor.execute('paragraph');\n            });\n            return view;\n        });\n    }\n}\n\nexport { InsertParagraphCommand, Paragraph, ParagraphButtonUI, ParagraphCommand };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module paragraph/paragraphcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\nimport type { ModelSchema, ModelSelection, ModelDocumentSelection, ModelElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The paragraph command.\n */\nexport class ParagraphCommand extends Command {\n\tpublic constructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Since this command may pass selection in execution block, it should be checked directly.\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\n\t/**\n\t * The value of the command. Indicates whether the selection start is placed in a paragraph.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst block = first( document.selection.getSelectedBlocks() );\n\n\t\tthis.value = !!block && block.is( 'element', 'paragraph' );\n\t\tthis.isEnabled = !!block && checkCanBecomeParagraph( block, model.schema );\n\t}\n\n\t/**\n\t * Executes the command. All the blocks (see {@link module:engine/model/schema~ModelSchema}) in the selection\n\t * will be turned to paragraphs.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.selection The selection that the command should be applied to. By default,\n\t * if not provided, the command is applied to the {@link module:engine/model/document~ModelDocument#selection}.\n\t */\n\tpublic override execute( options: {\n\t\tselection?: ModelSelection | ModelDocumentSelection;\n\t} = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\tconst selection = options.selection || document.selection;\n\n\t\t// Don't execute command if selection is in non-editable place.\n\t\tif ( !model.canEditAt( selection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst blocks = selection.getSelectedBlocks();\n\n\t\t\tfor ( const block of blocks ) {\n\t\t\t\tif ( !block.is( 'element', 'paragraph' ) && checkCanBecomeParagraph( block, model.schema ) ) {\n\t\t\t\t\twriter.rename( block, 'paragraph' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Checks whether the given block can be replaced by a paragraph.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n */\nfunction checkCanBecomeParagraph( block: ModelElement, schema: ModelSchema ): boolean {\n\treturn schema.checkChild( block.parent as ModelElement, 'paragraph' ) && !schema.isObject( block );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module paragraph/insertparagraphcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement, ModelPosition, ModelWriter } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The insert paragraph command. It inserts a new paragraph at a specific\n * {@link module:engine/model/position~ModelPosition document position}.\n *\n * ```ts\n * // Insert a new paragraph before an element in the document.\n * editor.execute( 'insertParagraph', {\n *   position: editor.model.createPositionBefore( element )\n * } );\n * ```\n *\n * If a paragraph is disallowed in the context of the specific position, the command\n * will attempt to split position ancestors to find a place where it is possible\n * to insert a paragraph.\n *\n * **Note**: This command moves the selection to the inserted paragraph.\n */\nexport class InsertParagraphCommand extends Command {\n\tpublic constructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Since this command passes position in execution block instead of selection, it should be checked directly.\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.position The model position at which the new paragraph will be inserted.\n\t * @param options.attributes Attributes keys and values to set on a inserted paragraph.\n\t * @fires execute\n\t */\n\tpublic override execute( options: {\n\t\tposition: ModelPosition;\n\t\tattributes?: Record<string, unknown>;\n\t} ): ModelPosition | null {\n\t\tconst model = this.editor.model;\n\t\tconst attributes = options.attributes;\n\n\t\tlet position: ModelPosition | null = options.position;\n\n\t\t// Don't execute command if position is in non-editable place.\n\t\tif ( !model.canEditAt( position ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn model.change( writer => {\n\t\t\tposition = this._findPositionToInsertParagraph( position!, writer );\n\n\t\t\tif ( !position ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst paragraph = writer.createElement( 'paragraph' );\n\n\t\t\tif ( attributes ) {\n\t\t\t\tmodel.schema.setAllowedAttributes( paragraph, attributes, writer );\n\t\t\t}\n\n\t\t\tmodel.insertContent( paragraph, position );\n\t\t\twriter.setSelection( paragraph, 'in' );\n\n\t\t\treturn writer.createPositionAt( paragraph, 0 );\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the best position to insert a new paragraph.\n\t */\n\tprivate _findPositionToInsertParagraph( position: ModelPosition, writer: ModelWriter ): ModelPosition | null {\n\t\tconst model = this.editor.model;\n\n\t\tif ( model.schema.checkChild( position, 'paragraph' ) ) {\n\t\t\treturn position;\n\t\t}\n\n\t\tconst allowedParent = model.schema.findAllowedParent( position, 'paragraph' );\n\n\t\t// It could be there's no ancestor limit that would allow paragraph.\n\t\t// In theory, \"paragraph\" could be disallowed even in the \"$root\".\n\t\tif ( !allowedParent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst positionParent = position.parent as ModelElement;\n\t\tconst isTextAllowed = model.schema.checkChild( positionParent, '$text' );\n\n\t\t// At empty $block or at the end of $block.\n\t\t// <paragraph>[]</paragraph> ---> <paragraph></paragraph><paragraph>[]</paragraph>\n\t\t// <paragraph>foo[]</paragraph> ---> <paragraph>foo</paragraph><paragraph>[]</paragraph>\n\t\tif ( positionParent.isEmpty || isTextAllowed && position.isAtEnd ) {\n\t\t\treturn model.createPositionAfter( positionParent );\n\t\t}\n\n\t\t// At the start of $block with text.\n\t\t// <paragraph>[]foo</paragraph> ---> <paragraph>[]</paragraph><paragraph>foo</paragraph>\n\t\tif ( !positionParent.isEmpty && isTextAllowed && position.isAtStart ) {\n\t\t\treturn model.createPositionBefore( positionParent );\n\t\t}\n\n\t\treturn writer.split( position, allowedParent ).position;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module paragraph/paragraph\n */\n\nimport { ParagraphCommand } from './paragraphcommand.js';\nimport { InsertParagraphCommand } from './insertparagraphcommand.js';\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\n/**\n * The paragraph feature for the editor.\n *\n * It introduces the `<paragraph>` element in the model which renders as a `<p>` element in the DOM and data.\n *\n * It also brings two editors commands:\n *\n * * The {@link module:paragraph/paragraphcommand~ParagraphCommand `'paragraph'`} command that converts all\n * blocks in the model selection into paragraphs.\n * * The {@link module:paragraph/insertparagraphcommand~InsertParagraphCommand `'insertParagraph'`} command\n * that inserts a new paragraph at a specified location in the model.\n */\nexport class Paragraph extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Paragraph' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\teditor.commands.add( 'paragraph', new ParagraphCommand( editor ) );\n\t\teditor.commands.add( 'insertParagraph', new InsertParagraphCommand( editor ) );\n\n\t\t// Schema.\n\t\tmodel.schema.register( 'paragraph', { inheritAllFrom: '$block' } );\n\n\t\teditor.conversion.elementToElement( { model: 'paragraph', view: 'p' } );\n\n\t\t// Conversion for paragraph-like elements which has not been converted by any plugin.\n\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t\t\tmodel: ( viewElement, { writer } ) => {\n\t\t\t\tif ( !Paragraph.paragraphLikeElements.has( viewElement.name ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Do not auto-paragraph empty elements.\n\t\t\t\tif ( viewElement.isEmpty ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn writer.createElement( 'paragraph' );\n\t\t\t},\n\t\t\tview: /.+/,\n\t\t\tconverterPriority: 'low'\n\t\t} );\n\t}\n\n\t/**\n\t * A list of element names which should be treated by the autoparagraphing algorithms as\n\t * paragraph-like. This means that e.g. the following content:\n\t *\n\t * ```html\n\t * <h1>Foo</h1>\n\t * <table>\n\t *   <tr>\n\t *     <td>X</td>\n\t *     <td>\n\t *       <ul>\n\t *         <li>Y</li>\n\t *         <li>Z</li>\n\t *       </ul>\n\t *     </td>\n\t *   </tr>\n\t * </table>\n\t * ```\n\t *\n\t * contains five paragraph-like elements: `<h1>`, two `<td>`s and two `<li>`s.\n\t * Hence, if none of the features is going to convert those elements the above content will be automatically handled\n\t * by the paragraph feature and converted to:\n\t *\n\t * ```html\n\t * <p>Foo</p>\n\t * <p>X</p>\n\t * <p>Y</p>\n\t * <p>Z</p>\n\t * ```\n\t *\n\t * Note: The `<td>` containing two `<li>` elements was ignored as the innermost paragraph-like elements\n\t * have a priority upon conversion.\n\t */\n\tpublic static paragraphLikeElements = new Set( [\n\t\t'blockquote',\n\t\t'dd',\n\t\t'div',\n\t\t'dt',\n\t\t'h1',\n\t\t'h2',\n\t\t'h3',\n\t\t'h4',\n\t\t'h5',\n\t\t'h6',\n\t\t'li',\n\t\t'p',\n\t\t'td',\n\t\t'th'\n\t] );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module paragraph/paragraphbuttonui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui';\nimport { IconParagraph } from '@ckeditor/ckeditor5-icons';\n\nimport { Paragraph } from './paragraph.js';\nimport { type ParagraphCommand } from './paragraphcommand.js';\n\n/**\n * This plugin defines the `'paragraph'` button. It can be used together with\n * {@link module:heading/headingbuttonsui~HeadingButtonsUI} to replace the standard heading dropdown.\n *\n * This plugin is not loaded automatically by the {@link module:paragraph/paragraph~Paragraph} plugin. It must\n * be added manually.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n *     toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */\nexport class ParagraphButtonUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ Paragraph ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'paragraph', locale => {\n\t\t\tconst view = new ButtonView( locale );\n\t\t\tconst command: ParagraphCommand = editor.commands.get( 'paragraph' )!;\n\n\t\t\tview.label = t( 'Paragraph' );\n\t\t\tview.icon = IconParagraph;\n\t\t\tview.tooltip = true;\n\t\t\tview.isToggleable = true;\n\t\t\tview.bind( 'isEnabled' ).to( command );\n\t\t\tview.bind( 'isOn' ).to( command, 'value' );\n\n\t\t\tview.on( 'execute', () => {\n\t\t\t\teditor.execute( 'paragraph' );\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n}\n"]}