diff --git a/.changelog/.gitkeep b/.changelog/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/.circleci/config.yml b/.circleci/config.yml index e35484fb960..fb73cea88a5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,7 +38,8 @@ commands: jobs: generate_configuration: - machine: true + docker: + - image: cimg/node:22.12.0 resource_class: medium parameters: isNightly: diff --git a/.circleci/template.yml b/.circleci/template.yml index 903faa19f6c..ee49c7d1ef1 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -4,6 +4,9 @@ # To modify commands to execute on CI review this file, and the script that generates it. version: 2.1 +orbs: + browser-tools: circleci/browser-tools@2.1.2 + # List of parameters must be synchronized between configuration files. parameters: isNightly: @@ -40,14 +43,6 @@ commands: circleci step halt fi - prepare_environment_command: - description: "Prepare environment (RAM, browsers, hosts, etc.)" - steps: - # CircleCI does not use the latest Chrome. Hence, we must install it manually. - - run: - name: Install the latest Chrome - command: yarn ckeditor5-dev-ci-install-latest-chrome - install_ssh_keys_command: description: "Install SSH keys" steps: @@ -67,9 +62,14 @@ commands: checkout_command: description: "Clone the CKEditor 5 repository with limited depth and branches" steps: + - run: + name: Add GitHub to known_hosts + command: | + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts - run: name: Checkout code (single branch) - command: git clone --single-branch --depth 10 --branch "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" . + command: git clone --single-branch --depth 1 --branch "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" . # In the PRs that come from forked repositories, we do not share secret variables. # Hence, some of the scripts will not be executed. See: https://github.com/ckeditor/ckeditor5/issues/7745. @@ -101,13 +101,14 @@ commands: jobs: cke5_manual: - machine: true + docker: + - image: cimg/node:22.12.0-browsers resource_class: large steps: - checkout_command - halt_if_short_flow - bootstrap_repository_command - - prepare_environment_command + - browser-tools/install_chrome - install_newest_emoji - run: name: Prepare DLL builds in CKEditor 5 @@ -117,12 +118,12 @@ jobs: command: bash scripts/check-manual-tests.sh -r ckeditor5 -f ckeditor5 cke5_validators: - machine: true + docker: + - image: cimg/node:22.12.0 resource_class: medium steps: - checkout_command - bootstrap_repository_command - - prepare_environment_command - run: when: always name: Validate versions of CKEditor 5 dependencies @@ -161,14 +162,14 @@ jobs: command: yarn run validate-module-re-exports cke5_coverage: - machine: true + docker: + - image: cimg/node:22.12.0 resource_class: medium steps: - community_verification_command - checkout_command - halt_if_short_flow - bootstrap_repository_command - - prepare_environment_command - attach_workspace: at: .out - run: @@ -185,7 +186,8 @@ jobs: command: npx coveralls -v < .out/combined_lcov.info cke5_trigger_release_process: - machine: true + docker: + - image: cimg/node:22.12.0 resource_class: medium steps: - community_verification_command @@ -213,7 +215,8 @@ jobs: command: yarn ckeditor5-dev-ci-trigger-circle-build cke5_trigger_uber_ci: - machine: true + docker: + - image: cimg/node:22.12.0 resource_class: medium steps: - community_verification_command @@ -224,13 +227,13 @@ jobs: command: yarn ckeditor5-dev-ci-trigger-circle-build release_prepare: - machine: true + docker: + - image: cimg/node:22.12.0 resource_class: large steps: - checkout_command - halt_if_short_flow - bootstrap_repository_command - - prepare_environment_command - run: name: Check if packages are ready to be released command: npm run release:prepare-packages -- --compile-only --verbose @@ -242,7 +245,8 @@ jobs: command: yarn run check-dependencies notify_ci_failure: - machine: true + docker: + - image: cimg/node:22.12.0 resource_class: medium parameters: hideAuthor: @@ -261,7 +265,8 @@ jobs: no_output_timeout: 2h stale_bot: - machine: true + docker: + - image: cimg/node:22.12.0 resource_class: medium steps: - checkout_command diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f097f7b2c01..598b6e3f58f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,9 +1,34 @@ -### Suggested merge commit message ([convention](https://ckeditor.com/docs/ckeditor5/latest/framework/contributing/git-commit-message-convention.html)) + + +### 🚀 Summary + +*A brief summary of what this PR changes.* + +--- + +### 📌 Related issues + + + +* Closes #000 --- -### Additional information +### 💡 Additional information -_For example – encountered issues, assumptions you had to make, other affected tickets, etc._ +*Optional: Notes on decisions, edge cases, or anything helpful for reviewers.* diff --git a/.gitignore b/.gitignore index 4cda3017018..0947d4a18d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # All "dot directories". .*/** +!.changelog/** !.github/** !.husky/** !.circleci/** diff --git a/docs/_snippets/examples/balloon-block-editor.js b/docs/_snippets/examples/balloon-block-editor.js index cbe66412be0..d9190707c30 100644 --- a/docs/_snippets/examples/balloon-block-editor.js +++ b/docs/_snippets/examples/balloon-block-editor.js @@ -6,7 +6,8 @@ import { CS_CONFIG, BalloonBlockEditor, - getViewportTopOffsetConfig + getViewportTopOffsetConfig, + setViewportTopOffsetDynamically } from '@snippets/index.js'; BalloonBlockEditor @@ -23,6 +24,8 @@ BalloonBlockEditor } ) .then( editor => { window.editor = editor; + + setViewportTopOffsetDynamically( editor ); } ) .catch( err => { console.error( err ); diff --git a/docs/_snippets/examples/balloon-editor.js b/docs/_snippets/examples/balloon-editor.js index 502005818b9..b3e557b90d0 100644 --- a/docs/_snippets/examples/balloon-editor.js +++ b/docs/_snippets/examples/balloon-editor.js @@ -6,7 +6,8 @@ import { CS_CONFIG, BalloonEditor, - getViewportTopOffsetConfig + getViewportTopOffsetConfig, + setViewportTopOffsetDynamically } from '@snippets/index.js'; BalloonEditor @@ -23,6 +24,8 @@ BalloonEditor } ) .then( editor => { window.editor = editor; + + setViewportTopOffsetDynamically( editor ); } ) .catch( err => { console.error( err ); diff --git a/docs/_snippets/examples/classic-editor-short.js b/docs/_snippets/examples/classic-editor-short.js index fe061609f4c..bd742484018 100644 --- a/docs/_snippets/examples/classic-editor-short.js +++ b/docs/_snippets/examples/classic-editor-short.js @@ -3,7 +3,12 @@ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ -import { CS_CONFIG, ClassicEditor, getViewportTopOffsetConfig } from '@snippets/index.js'; +import { + CS_CONFIG, + ClassicEditor, + getViewportTopOffsetConfig, + setViewportTopOffsetDynamically +} from '@snippets/index.js'; ClassicEditor .create( document.querySelector( '#snippet-classic-editor-short' ), { @@ -16,6 +21,8 @@ ClassicEditor } ) .then( editor => { window.editor = editor; + + setViewportTopOffsetDynamically( editor ); } ) .catch( err => { console.error( err ); diff --git a/docs/_snippets/examples/classic-editor.js b/docs/_snippets/examples/classic-editor.js index 3b20935c104..6a2b8ecb2aa 100644 --- a/docs/_snippets/examples/classic-editor.js +++ b/docs/_snippets/examples/classic-editor.js @@ -6,7 +6,8 @@ import { CS_CONFIG, ClassicEditor, - getViewportTopOffsetConfig + getViewportTopOffsetConfig, + setViewportTopOffsetDynamically } from '@snippets/index.js'; ClassicEditor @@ -29,6 +30,8 @@ ClassicEditor } ) .then( editor => { window.editor = editor; + + setViewportTopOffsetDynamically( editor ); } ) .catch( err => { console.error( err ); diff --git a/docs/_snippets/examples/document-editor.html b/docs/_snippets/examples/document-editor.html index c520c3b0cb6..231611bd36d 100644 --- a/docs/_snippets/examples/document-editor.html +++ b/docs/_snippets/examples/document-editor.html @@ -76,7 +76,7 @@

Welcome letter

.document-editor__toolbar { /* Make sure the toolbar container is always above the editable. */ - z-index: 1; + z-index: 2; /* Create the illusion of the toolbar floating over the editable. */ box-shadow: 0 0 5px hsla( 0,0%,0%,.2 ); diff --git a/docs/_snippets/examples/document-editor.js b/docs/_snippets/examples/document-editor.js index d1dc763ff9a..6072a3eb521 100644 --- a/docs/_snippets/examples/document-editor.js +++ b/docs/_snippets/examples/document-editor.js @@ -7,7 +7,8 @@ import { TableColumnResize } from 'ckeditor5'; import { CS_CONFIG, DecoupledEditor, - getViewportTopOffsetConfig + getViewportTopOffsetConfig, + setViewportTopOffsetDynamically } from '@snippets/index.js'; DecoupledEditor @@ -37,6 +38,8 @@ DecoupledEditor ?.appendChild( editor.ui.view.toolbar.element ); window.editor = editor; + + setViewportTopOffsetDynamically( editor ); } ) .catch( err => { console.error( err ); diff --git a/docs/_snippets/examples/inline-editor.js b/docs/_snippets/examples/inline-editor.js index 0dbe82779ab..224158facae 100644 --- a/docs/_snippets/examples/inline-editor.js +++ b/docs/_snippets/examples/inline-editor.js @@ -3,7 +3,12 @@ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ -import { CS_CONFIG, InlineEditor, getViewportTopOffsetConfig } from '@snippets/index.js'; +import { + CS_CONFIG, + InlineEditor, + getViewportTopOffsetConfig, + setViewportTopOffsetDynamically +} from '@snippets/index.js'; const inlineInjectElements = document.querySelectorAll( '#snippet-inline-editor [data-inline-inject]' ); @@ -61,6 +66,8 @@ Array.from( inlineInjectElements ).forEach( inlineElement => { .create( inlineElement, config ) .then( editor => { window.editor = editor; + + setViewportTopOffsetDynamically( editor ); } ) .catch( err => { console.error( err ); diff --git a/docs/_snippets/features/feature-digest.html b/docs/_snippets/features/feature-digest.html deleted file mode 100644 index 7e78f59daac..00000000000 --- a/docs/_snippets/features/feature-digest.html +++ /dev/null @@ -1,55 +0,0 @@ - diff --git a/docs/_snippets/features/read-only-hide-toolbar.html b/docs/_snippets/features/read-only-hide-toolbar.html index 5d8023e9615..721f3d304a6 100644 --- a/docs/_snippets/features/read-only-hide-toolbar.html +++ b/docs/_snippets/features/read-only-hide-toolbar.html @@ -1,7 +1,3 @@ -

- -

-

The sales data for Q4 for the Click’n’go product line

@@ -31,4 +27,4 @@

The sales data for Q4 for the Click’n’go produc -

\ No newline at end of file + diff --git a/docs/_snippets/features/read-only.html b/docs/_snippets/features/read-only.html index a023d3fa217..084ad65b724 100644 --- a/docs/_snippets/features/read-only.html +++ b/docs/_snippets/features/read-only.html @@ -1,7 +1,3 @@ -

- -

-

The sales data for Q3 for the Click’n’go product line

diff --git a/docs/_snippets/features/read-only.js b/docs/_snippets/features/read-only.js index a8226dd6c72..ae0f36a0431 100644 --- a/docs/_snippets/features/read-only.js +++ b/docs/_snippets/features/read-only.js @@ -85,10 +85,3 @@ ReadOnlyEditor .catch( err => { console.error( err.stack ); } ); - -// Demo styles. -const link = document.createElement( 'link' ); -link.rel = 'stylesheet'; -link.href = '../assets/read-only-export-pdf.css'; - -document.head.appendChild( link ); diff --git a/docs/_snippets/features/update-placeholder.html b/docs/_snippets/features/update-placeholder.html index dcc11035552..fa829ab2e34 100644 --- a/docs/_snippets/features/update-placeholder.html +++ b/docs/_snippets/features/update-placeholder.html @@ -1,4 +1,3 @@

- diff --git a/docs/_snippets/features/update-placeholder.js b/docs/_snippets/features/update-placeholder.js index 8343cffb9bc..57383e68ce0 100644 --- a/docs/_snippets/features/update-placeholder.js +++ b/docs/_snippets/features/update-placeholder.js @@ -31,11 +31,12 @@ PlaceholderEditor placeholder: 'Type some content here!' } ) .then( editor => { - const button = document.getElementById( 'update-placeholder-button' ); window.editor = editor; - - button.addEventListener( 'click', () => { - editor.editing.view.document.getRoot( 'main' ).placeholder = 'New placeholder'; + window.umberto.afterReady( () => { + const button = document.getElementById( 'update-placeholder-button' ); + button.addEventListener( 'click', () => { + editor.editing.view.document.getRoot( 'main' ).placeholder = 'Updated placeholder'; + } ); } ); } ) .catch( err => { diff --git a/docs/_snippets/framework/development-tools/inspector.html b/docs/_snippets/framework/development-tools/inspector.html index 214780aac19..d361a94f39c 100644 --- a/docs/_snippets/framework/development-tools/inspector.html +++ b/docs/_snippets/framework/development-tools/inspector.html @@ -12,5 +12,3 @@

CKEditor 5 inspector demo

  • More features coming soon!
  • - - diff --git a/docs/_snippets/framework/tutorials/using-react-in-widget.html b/docs/_snippets/framework/tutorials/using-react-in-widget.html index f918c28938c..1b8c943b1e8 100644 --- a/docs/_snippets/framework/tutorials/using-react-in-widget.html +++ b/docs/_snippets/framework/tutorials/using-react-in-widget.html @@ -12,9 +12,9 @@ .app textarea { width: 100%; height: 300px; - font-family: 'Courier New', Courier, monospace; + font-family: var(--font-family-monospace); box-sizing: border-box; - font-size: 14px; + font-size: var(--font-size-sm); } /* --- Product offer editor styles ----------------------------------------------------- */ @@ -38,32 +38,32 @@ } .app .product-preview .product-preview__name { - padding: 10px; - background: hsl(0, 0%, 100%); + padding: var(--spacing-3); + background: var(--color-common-white); font-weight: bold; position: absolute; - bottom: 0; - left: 0; - right: 0; + bottom: var(--spacing-0); + left: var(--spacing-0); + right: var(--spacing-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - line-height: 1.5em; + line-height: var(--line-height-base); } .app .product-preview .product-preview__price { position: absolute; - top: 0; - right: 0; + top: var(--spacing-0); + right: var(--spacing-0); display: block; - background: hsl(346, 100%, 56%); - padding: 6px 10px; - min-width: 50px; + background: var(--color-error-500); + padding: var(--spacing-2) var(--spacing-3); + min-width: var(--spacing-12); text-align: center; - color: hsl(0, 0%, 100%); + color: var(--color-common-white); text-transform: uppercase; - font-size: .8em; - line-height: 1.5em; + font-size: var(--font-size-xs); + line-height: var(--line-height-base); } .app .product-preview .product-preview__add { @@ -73,18 +73,18 @@ /* --- Product list styles --------------------------------------------------- */ .app .app__product-list { - margin-left: 20px; - padding: 0 20px; - border-left: 1px solid hsl(0, 0%, 87%); + margin-left: var(--spacing-5); + padding: var(--spacing-0) var(--spacing-5); + border-left: 1px solid var(--color-gray-300); } .app .app__product-list ul { display: grid; grid-template-columns: 1fr; - grid-gap: 10px; + grid-gap: var(--spacing-3); list-style-type: none; - margin: 1.5em 0; - padding: 0; + margin: var(--spacing-6) var(--spacing-0); + padding: var(--spacing-0); } .app .app__product-list .product-preview { @@ -102,8 +102,8 @@ .app .app__product-list .product-preview .product-preview__add { display: none; position: absolute; - width: 40px; - height: 40px; + width: var(--spacing-10); + height: var(--spacing-10); top: 45%; left: 50%; @@ -113,31 +113,31 @@ font-weight: bold; text-align: center; border-radius: 100px; - background: hsl(0, 0%, 100%); + background: var(--color-common-white); transform: translate(-50%, -50%); box-shadow: 2px 2px 2px hsla(0, 0%, 0%, .3); } .app .app__product-list .product-preview .product-preview__add span { - font-size: 25px; + font-size: var(--font-size-xl); vertical-align: middle; - color: hsl(0, 0%, 24%); - line-height: 40px; + color: var(--color-gray-primary); + line-height: var(--line-height-base); display: inline-block; } .app .app__product-list .product-preview .product-preview__name { - font-size: 10px; + font-size: var(--font-size-xs); } .app .app__product-list .product-preview .product-preview__price { - font-size: 10px; + font-size: var(--font-size-xs); } /* --- In-editor product widget styles --------------------------------------------------- */ .app .ck-content .product { - margin: 1em; + margin: var(--spacing-4); animation: slideUp 0.3s ease; } diff --git a/docs/_snippets/framework/ui/ui-balloon.html b/docs/_snippets/framework/ui/ui-balloon.html index 61ad2ddf9a5..d68c71d1c3f 100644 --- a/docs/_snippets/framework/ui/ui-balloon.html +++ b/docs/_snippets/framework/ui/ui-balloon.html @@ -1,6 +1,8 @@
    A balloon with a button inside.
    diff --git a/docs/_snippets/getting-started/unlock-feature.html b/docs/_snippets/getting-started/unlock-feature.html new file mode 100644 index 00000000000..dd82a7a8041 --- /dev/null +++ b/docs/_snippets/getting-started/unlock-feature.html @@ -0,0 +1,31 @@ +
    +

    Unlock this feature with selected CKEditor Plans

    + +

    Try all premium features – no credit card needed.

    + +

    + + Sign up for a free trial + + + + Select the Plan + +

    + + + + + + + + + + + +
    diff --git a/docs/_snippets/features/feature-digest.js b/docs/_snippets/getting-started/unlock-feature.js similarity index 100% rename from docs/_snippets/features/feature-digest.js rename to docs/_snippets/getting-started/unlock-feature.js diff --git a/docs/_snippets/getting-started/use-builder.html b/docs/_snippets/getting-started/use-builder.html index 5d366b4efcc..899a6fbcc66 100644 --- a/docs/_snippets/getting-started/use-builder.html +++ b/docs/_snippets/getting-started/use-builder.html @@ -1,72 +1,36 @@ -
    -

    CKEditor 5 Builder

    - -

    - In our interactive Builder you can quickly get a taste of CKEditor 5. It offers an easy-to-use user interface to help you configure, preview, and download the editor suited to your needs. You can easily select: -

    - -
    diff --git a/docs/_snippets/index.js b/docs/_snippets/index.js index b3702883957..fc3d169ac5c 100644 --- a/docs/_snippets/index.js +++ b/docs/_snippets/index.js @@ -11,6 +11,7 @@ export { attachTourBalloon, findToolbarItem, getViewportTopOffsetConfig, + setViewportTopOffsetDynamically, createTabs } from './shared-helpers.js'; diff --git a/docs/_snippets/installation/getting-and-setting-data/manualsave.html b/docs/_snippets/installation/getting-and-setting-data/manualsave.html index 1395c232685..aeb4900c2f9 100644 --- a/docs/_snippets/installation/getting-and-setting-data/manualsave.html +++ b/docs/_snippets/installation/getting-and-setting-data/manualsave.html @@ -1,8 +1,8 @@ -
    +

    Change the content of this editor, then save it on the server.

    -
    +
    HTTP server lag (ms):
    @@ -13,108 +13,94 @@
    -

    Server data:

    - -
    <p>Change the content of this editor, then save it on the server.</p>
    - diff --git a/docs/_snippets/installation/getting-and-setting-data/manualsave.js b/docs/_snippets/installation/getting-and-setting-data/manualsave.js index 8195f2eb5a2..f0632d2d2c3 100644 --- a/docs/_snippets/installation/getting-and-setting-data/manualsave.js +++ b/docs/_snippets/installation/getting-and-setting-data/manualsave.js @@ -16,25 +16,29 @@ document.querySelector( '#snippet-manualsave-lag' ).addEventListener( 'change', HTTP_SERVER_LAG = evt.target.value; } ); -AutosaveEditor - .create( document.querySelector( '#snippet-manualsave' ), { - cloudServices: CS_CONFIG, - ui: { - viewportOffset: { - top: getViewportTopOffsetConfig() +document.addEventListener( 'DOMContentLoaded', () => { + AutosaveEditor + .create( document.querySelector( '#snippet-manualsave' ), { + cloudServices: CS_CONFIG, + ui: { + viewportOffset: { + top: getViewportTopOffsetConfig() + } } - } - } ) - .then( editor => { - window.editor = editor; - - handleStatusChanges( editor ); - handleSaveButton( editor ); - handleBeforeunload( editor ); - } ) - .catch( err => { - console.error( err.stack ); - } ); + } ) + .then( editor => { + window.editor = editor; + + updateServerDataConsole( editor.getData() ); + + handleStatusChanges( editor ); + handleSaveButton( editor ); + handleBeforeunload( editor ); + } ) + .catch( err => { + console.error( err.stack ); + } ); +} ); // Handle clicking the "Save" button. function handleSaveButton( editor ) { @@ -48,8 +52,8 @@ function handleSaveButton( editor ) { evt.preventDefault(); // Fake HTTP server's lag. - setTimeout( () => { - updateServerDataConsole( data ); + setTimeout( async () => { + await updateServerDataConsole( data ); pendingActions.remove( action ); @@ -99,18 +103,8 @@ function updateStatus( editor ) { } } -let consoleUpdates = 0; - -function updateServerDataConsole( msg ) { +async function updateServerDataConsole( msg ) { const console = document.querySelector( '#snippet-manualsave-console' ); - consoleUpdates++; - console.classList.add( 'updated' ); - console.textContent = msg; - - setTimeout( () => { - if ( --consoleUpdates == 0 ) { - console.classList.remove( 'updated' ); - } - }, 500 ); + await window.umberto.afterReady( () => console.codeBlock.setCode( msg ) ); } diff --git a/docs/_snippets/mini-inspector.css b/docs/_snippets/mini-inspector.css index 70c51190b22..0ddf479f31e 100644 --- a/docs/_snippets/mini-inspector.css +++ b/docs/_snippets/mini-inspector.css @@ -13,6 +13,9 @@ /* Match the look of the diagrams */ border-radius: 5px; + + /* Override main styles. */ + box-shadow: none !important; } .ck-inspector.ck-mini-inspector .ck-inspector-code { @@ -23,7 +26,7 @@ --ck-inspector-code-font-family: Monaco, Menlo, Consolas, "Roboto Mono", "Courier New", "Ubuntu Mono", monospace; } -.ck-inspector .ck-inspector-tree { +.ck-inspector.ck-mini-inspector .ck-inspector-tree { overflow: hidden; } diff --git a/docs/_snippets/shared-helpers.js b/docs/_snippets/shared-helpers.js index f9d4690407b..5ab67c96d41 100644 --- a/docs/_snippets/shared-helpers.js +++ b/docs/_snippets/shared-helpers.js @@ -24,22 +24,10 @@ * editor * } ); * - * // Specifying options of tippy.js, e.g. to customize the placement of the balloon. - * // See https://atomiks.github.io/tippyjs/v6/all-props/ for all options. - * attachTourBalloon( { - * target: findToolbarItem( editor.ui.view.toolbar, 5 ), - * text: 'Tour text to help users discover the feature.', - * editor, - * tippyOptions: { - * placement: 'bottom-start' - * } - * } ); - * * @param {Object} options Balloon options. * @param {HTMLElement} options.target A DOM node the balloon will point to. * @param {String} options.text The description to be shown in the tooltip. * @param {module:core/editor/editor~Editor} options.editor The editor instance. - * @param {Object} [options.tippyOptions] Additional [configuration of tippy.js](https://atomiks.github.io/tippyjs/v6/all-props/). */ export function attachTourBalloon( { target, text, editor, tippyOptions } ) { if ( !target ) { @@ -54,30 +42,26 @@ export function attachTourBalloon( { target, text, editor, tippyOptions } ) { return; } - const content = ` -
    ${ text }
    - - `; - - const options = Object.assign( {}, { - placement: 'bottom', - trigger: 'manual', - hideOnClick: false, - allowHTML: true, - maxWidth: 280, - showOnCreate: true, - interactive: true, - theme: 'light-border', - zIndex: 1, - appendTo: () => document.body - }, tippyOptions ); - - const tooltip = window.umberto.createTooltip( target, content, options ); + const tooltip = window.umberto.Tooltip.create( { + text, + trigger: target, + mode: 'click', + variant: 'dark', + icon: 'bulb', + disableOnMobile: false, + showCloseButton: true, + showAfterMount: true, + hideOnOutsideClick: false, + destroyOnHide: true, + ...tippyOptions?.placement && { + position: tippyOptions.placement + } + } ); for ( const root of editor.editing.view.document.roots ) { root.once( 'change:isFocused', ( evt, name, isFocused ) => { if ( isFocused ) { - tooltip.hide(); + tooltip.destroy(); } } ); } @@ -128,6 +112,24 @@ export function getViewportTopOffsetConfig() { return parseInt( window.getComputedStyle( documentElement ).getPropertyValue( '--ck-snippet-viewport-top-offset' ) ); } +/** + * Function that sets the `editor.ui.viewportOffset.top` dynamically based on the media query. + * The media query breakpoint is set to `960px` and the value is taken from the `--ck-snippet-viewport-top-offset` CSS variable. + * + * @private + * @param {module:core/editor/editor~Editor} editor + */ +export function setViewportTopOffsetDynamically( editor ) { + const mediaQueryList = window.matchMedia( '(max-width: 960px)' ); + const documentElement = document.documentElement; + + mediaQueryList.onchange = () => { + const value = parseInt( window.getComputedStyle( documentElement ).getPropertyValue( '--ck-snippet-viewport-top-offset' ) ); + + editor.ui.viewportOffset.top = value; + }; +} + /** * Activates tabs in the given container. * diff --git a/docs/_snippets/updating/plugins-mapping/plugins-mapping.html b/docs/_snippets/updating/plugins-mapping/plugins-mapping.html deleted file mode 100644 index 7cfb0ba107d..00000000000 --- a/docs/_snippets/updating/plugins-mapping/plugins-mapping.html +++ /dev/null @@ -1,958 +0,0 @@ -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CKEditor 4CKEditor 5
    -

    a11yhelp

    -
    -

    N/A

    -
    -

    about

    -
    -

    N/A

    -
    -

    ajax

    -
    -

    N/A

    -
    -

    autocomplete

    -
    -

    Partially covered by Mentions

    -
    -

    autoembed

    -
    -

    Auto media embed

    -
    -

    autogrow

    -
    -

    Core (see Classic editor and setting its height)

    -
    -

    autolink

    -
    -

    Autolink

    -
    -

    balloonpanel

    -
    -

    Balloon panel view

    -
    -

    balloontoolbar

    -
    -

    Contextual balloon

    -
    -

    basicstyles

    -
    -

    Basic styles

    -
    -

    bbcode

    -
    -

    N/A

    -
    -

    bidi

    -
    -

    Partially available via configuration and the Language plugin

    -
    -

    blockquote

    -
    -

    Block quote

    -
    -

    button

    -
    -

    Button view

    -
    -

    ckfinder

    -
    -

    CKFinder

    -
    -

    clipboard

    -
    -

    Clipboard

    -
    -

    cloudservices

    -
    -

    Cloud Services

    -
    -

    codesnippet

    -
    -

    Partially covered by Code blocks

    -
    -

    codesnippetgeshi

    -
    -

    N/A

    -
    -

    colorbutton

    -
    -

    Font color and Font background color

    -
    -

    colordialog

    -
    -

    N/A

    -
    -

    contextmenu

    -
    -

    N/A

    -
    -

    copyformatting

    -
    -

    Format painter

    -
    -

    devtools

    -
    -

    N/A

    -
    -

    dialog

    -
    -

    N/A

    -
    -

    dialogadvtab

    -
    -

    N/A

    -
    -

    dialogui

    -
    -

    N/A

    -
    -

    div

    -
    -

    Partially covered by General HTML Support

    -
    -

    divarea

    -
    -

    Core (Classic editor)

    -
    -

    docprops

    -
    -

    N/A

    -
    -

    easyimage

    -
    -

    Easy Image

    -
    -

    editorplaceholder

    -
    -

    Editor placeholder

    -
    -

    elementspath

    -
    -

    N/A

    -
    -

    embed

    -
    -

    Media embed

    -
    -

    embedbase

    -
    -

    Media embed configuration

    -
    -

    embedsemantic

    -
    -

    Media embed configuration

    -
    -

    emoji

    -
    -

    Emoji

    -
    -

    enterkey

    -
    -

    Enter (except for the ENTER_DIV option)

    -
    -

    entities

    -
    -

    N/A

    -
    -

    fakeobjects

    -
    Custom widgets
    -

    filebrowser

    -
    -

    See image upload

    -
    -

    filetools

    -
    -

    See image upload

    -
    -

    find

    -
    -

    Find and replace

    -
    -

    flash

    -
    -

    N/A

    -
    -

    floatingspace

    -
    -

    Inline editor

    -
    -

    floatpanel

    -
    -

    Partially covered by the createDropdown() utility

    -
    -

    font

    -
    -

    Font size and Font family

    -
    -

    format

    -
    -

    Partially covered by the Heading and Paragraph features

    -
    -

    forms

    -
    -

    N/A

    -
    -

    horizontalrule

    -
    -

    Horizontal line

    -
    -

    htmlwriter

    -
    -

    A custom HTML writer can be implemented using the HtmlWriter interface

    -
    -

    iframe

    -
    -

    HTML embed

    -
    -

    iframedialog

    -
    -

    N/A

    -
    -

    image

    -
    -

    Image

    -
    -

    image2

    -
    -

    Image

    -
    -

    imagebase

    -
    -

    Image

    -
    -

    indent

    -
    -

    Indent

    -
    -

    indentblock

    -
    -

    Introduced by IndentBlock, exposed by Indent

    -
    -

    indentlist

    -
    -

    Introduced by ListEditing, exposed by Indent

    -
    -

    justify

    -
    -

    Text alignment

    -
    -

    language

    -
    -

    Text part language

    -
    -

    lineutils

    -
    -

    Partially covered by Widget type around

    -
    -

    link

    -
    -

    Link

    -
    -

    list

    -
    -

    List

    -
    -

    listblock

    -
    -

    Dropdowns and the addListToDropdown() utility

    -
    -

    liststyle

    -
    -

    List properties

    -
    -

    magicline

    -
    -

    Widget type around

    -
    -

    mathjax

    -
    -

    MathType

    -
    -

    maximize

    -
    -

    Fullscreen mode

    -
    -

    mentions

    -
    -

    Mentions

    -
    -

    menu

    -
    -

    Dropdowns

    -
    -

    menubutton

    -
    -

    Dropdowns

    -
    -

    newpage

    -
    -

    N/A

    -
    -

    notification

    -
    -

    Notification (provides only the engine, without UI)

    -
    -

    notificationaggregator

    -
    -

    N/A

    -
    -

    pagebreak

    -
    -

    Page break

    -
    -

    panel

    -

    UI library

    -

    panelbutton

    -

    UI library

    -

    pastefromgdocs

    -
    -

    Paste from Google Docs

    -
    -

    pastefromlibreoffice

    -
    -

    N/A

    -
    -

    pastefromword

    -
    -

    Paste from Office

    -
    -

    pastetext

    -
    -

    Paste plain text

    -
    -

    pastetools

    -
    -

    N/A

    -
    -

    placeholder

    -
    -

    Custom implementation

    -
    -

    popup

    -
    -

    N/A

    -
    -

    preview

    -
    -

    N/A

    -
    -

    print

    -
    -

    N/A

    -
    -

    removeformat

    -
    -

    Remove format

    -
    -

    resize

    -
    -

    N/A

    -
    -

    richcombo

    -
    -

    DropdownView

    -
    -

    save

    -
    -

    See Saving data

    -
    -

    selectall

    -
    -

    Select all

    -
    -

    sharedspace

    -
    -

    Custom implementation - see multi-root editor

    -
    -

    showblocks

    -
    -

    Show blocks

    -
    -

    showborders

    -
    -

    Table properties

    -
    -

    smiley

    -
    -

    Emoji

    -
    -

    sourcearea

    -
    -

    Source code editing

    -
    -

    sourcedialog

    -
    -

    Enhanced source code editing

    -
    -

    specialchar

    -
    -

    Special characters

    -
    -

    stylescombo

    -
    -

    Style

    -
    -

    stylesheetparser

    -
    -

    N/A

    -
    -

    tab

    -
    -

    See Keyboard support

    -
    -

    table

    -
    -

    Table

    -
    -

    tableresize

    -
    -

    Table column resize

    -
    -

    tableselection

    -
    -

    Table selection

    -
    -

    tabletools

    -
    -

    Table properties

    -
    -

    templates

    -
    -

    Template

    -
    -

    textmatch

    -
    -

    N/A

    -
    -

    textwatcher

    -
    -

    Text watcher

    -
    -

    toolbar

    -
    -

    Editor toolbar

    -
    -

    uicolor

    -
    -

    See Theme customization

    -
    -

    undo

    -
    -

    Undo

    -
    -

    uploadfile

    -
    -

    See image upload

    -
    -

    uploadimage

    -
    -

    See image upload

    -
    -

    uploadwidget

    -
    -

    See image upload

    -
    -

    widget

    -
    -

    Widget

    -
    -

    widgetselection

    -
    -

    Widget

    -
    -

    wysiwygarea

    -
    -

    Core (Classic editor - there is no iframe-based editor implementation in CKEditor 5)

    -
    -

    xml

    -
    -

    XML data processor

    -
    -
    diff --git a/docs/_snippets/updating/plugins-mapping/plugins-mapping.js b/docs/_snippets/updating/plugins-mapping/plugins-mapping.js deleted file mode 100644 index babe05aeea0..00000000000 --- a/docs/_snippets/updating/plugins-mapping/plugins-mapping.js +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options - */ diff --git a/docs/api/index.md b/docs/api/index.md index 8f943117c0d..4656aa54461 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -6,7 +6,7 @@ meta-title: CKEditor 5 API | CKEditor 5 Documentation # API documentation - Use the **navigation tree on the left****main menu button in the upper-left corner** to navigate through CKEditor API. + Use the **navigation tree on the left****main menu button in the upper-left corner** to navigate through CKEditor API. ## Popular API pages diff --git a/docs/assets/buildwarningbanner.js b/docs/assets/buildwarningbanner.js deleted file mode 100644 index 1bde5a2fa14..00000000000 --- a/docs/assets/buildwarningbanner.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options - */ - -// Display a warning banner when browsing nightly documentation build or legacy guides. Source parameter for maintenance of 404 redirs. -if ( window.location.host === 'ckeditor5.github.io' ) { - const stableUrl = window.location.href.replace( 'https://ckeditor5.github.io/docs/nightly', 'https://ckeditor.com/docs' ); - - window.umberto.showWarningBanner( - `Nightly documentation ahead. Switch to the stable editor documentation.` - ); -} else if ( window.location.href.includes( '/legacy/' ) ) { - window.umberto.showWarningBanner( 'You are reading the legacy documentation.' ); -} diff --git a/docs/assets/global.css b/docs/assets/global.css index d4ef514c4f9..7ea60ccc68e 100644 --- a/docs/assets/global.css +++ b/docs/assets/global.css @@ -6,17 +6,22 @@ :root { /* This custom property is read by the JS and passed to editor configurations as config.ui.viewportOffset.top. */ - --ck-snippet-viewport-top-offset: 100 + --ck-snippet-viewport-top-offset: 109.56; } @media (max-width: 960px) { :root { /* The mobile layout of Umberto is different and the toolbar offset must be smaller (https://github.com/ckeditor/ckeditor5/issues/1348). */ - --ck-snippet-viewport-top-offset: 55; + --ck-snippet-viewport-top-offset: 64; } } +/* https://github.com/cksource/ckeditor5-internal/issues/3223 */ +.ck-body-wrapper .ck.ck-powered-by-balloon.ck-balloon-panel.ck-balloon-panel_visible { + display: none; +} + .ck.ck-editor { margin: 1.5em 0; } @@ -29,242 +34,6 @@ margin-top: 0; } -/* - * Override Umberto styles to avoid content jumping when the fake selection container shows up. - * To work properly, this must match 1:1 the styles brought by Umberto. - * https://github.com/ckeditor/ckeditor5/issues/9825 - */ -.ck.ck-content > p, -.ck.ck-content > ul, -.ck.ck-content > ol, -.ck.ck-content > blockquote, -.ck.ck-content > pre { - margin-bottom: var(--ck-spacing-large); -} - -/* Override default Umberto styles because they apply margins to media embed widgets with iframe -previews breaking their structure. */ -.ck.ck-content iframe { - margin: initial; -} - -/* Reset h1's styling – https://github.com/ckeditor/ckeditor5-heading/issues/86 */ -.ck.ck-content h1 { - display: block; - margin-bottom: .5em; -} - -/* By default Umberto uses a trick with non breaking spaces around to fix space rendering. -It breaks CKEditor 5 (see how

    []

    looks). */ -.ck.ck-content code:before, -.ck.ck-content code:after { - content: '' !important; - letter-spacing: 0 !important; - display: none !important; /* Firefox is very stubborn. */ -} - -/* Restore default browser styles for and . */ -.ck.ck-content sub { - vertical-align: sub; - font-size: smaller; -} - -.ck.ck-content sup { - vertical-align: super; - font-size: smaller; -} - -.demo-row { - width: 100%; - display: flex; -} - -.demo-row__half { - width: 50%; -} - -.demo-row__half:first-of-type { - padding-right: .5rem; -} - -.demo-row__half:last-of-type { - padding-left: .5rem; -} - -.demo-row__third { - width: 33.3333%; -} - -.demo-row__third > div { - padding: 2.5rem; - border: 1px solid hsla(0, 0%, 0%, 0.15); -} - -.demo-row__third:nth-of-type(2) { - padding-left: 1rem; - padding-right: 1rem; -} - -.demo-row h3 { - margin: 0; -} - -/* stylelint-disable-next-line */ -.demo-row p { - margin-bottom: 0; -} - -/* warning notification */ - -.main__notification.notice { - position: fixed; - max-width: 650px; - border: 1px solid hsl(0, 0%, 89%); - border-left-color: hsl(38.8, 92.3%, 69.4%); - border-left-width: 3px; - box-shadow: 0 2px 6px hsla(0, 0%, 0%, 0.18); - /* override .notice class' margins and paddings */ - padding: 20px 40px 20px 20px; - margin: 0; - /* elevate the warning above the editor's toolbars */ - z-index: 99999999; - animation: fadeIn .3s ease-in-out forwards; -} - -/* class chaining for style overriding */ -.formatted .main__notification-title { - font-weight: bold; - font-size: 16px; - padding: 0; - margin: 0; -} - -/* See https://github.com/ckeditor/ckeditor5/issues/494 */ -/* See https://github.com/ckeditor/ckeditor5/issues/16935 */ -.formatted .ck.ck-list { - margin: 0; -} - -.main__notification-body { - margin-top: 10px; -} - -/* stylelint-disable-next-line */ -.main__notification-body p { - margin-bottom: 0.3em; -} - -.main__notification-body p:last-child { - margin-bottom: 0; -} - -.main__notification-close { - position: absolute; - top: 0; - right: 0; - padding: 10px; - /* reset default button styling */ - background: none; - border: none; - box-shadow: none; - line-height: 1; - transition: background 150ms ease; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - cursor: pointer; -} - -.main__notification-close:hover { - background: hsl(0, 0%, 93%); -} - -.main__notification-close:active:focus { - outline: none; -} - -@keyframes fadeIn { - from { - opacity: 0; - } - - to { - opacity: 1; - } -} - -.ck.ck-editor__editable.ck-show-blocks ul, -.ck.ck-editor__editable.ck-show-blocks ol { - padding-inline-start: 40px; -} - -.ck.ck-editor__editable.ck-show-blocks[dir=ltr] ul, -.ck.ck-editor__editable.ck-show-blocks[dir=ltr] ol { - margin-left: 0; -} - -.ck.ck-editor__editable.ck-show-blocks[dir=rtl] ul, -.ck.ck-editor__editable.ck-show-blocks[dir=rtl] ol { - margin-right: 0; -} - -/* examples/builds/inline-editor.html */ -.live-snippet .image-style-left, .live-snippet .image-style-right { - float: left; - height: auto; - width: 50%; - margin-top: .5rem; - margin-right: 2.5rem; -} - -.live-snippet .image-style-right { - float: right; - margin-right: 0; - margin-left: 2.5rem; -} - -/* Umberto stylesheet is centering `` inside a `

    `, let's overwrite it with higher CSS Specificity. - * See: https://github.com/ckeditor/ckeditor5/issues/2080. - */ -.live-snippet p img { - display: initial; - margin: initial; - box-sizing: initial; -} - -.live-snippet .image img { - margin: 0 auto; -} - -/* https://github.com/ckeditor/ckeditor5/issues/899 */ -.live-snippet .ck-dropdown .ck.ck-list { - margin: 0; -} - -/* https://github.com/ckeditor/ckeditor5/pull/1060 */ -.live-snippet .ck.ck-content .table table { - margin: 0; - display: table; -} - -/* https://github.com/ckeditor/ckeditor5/issues/7310 */ -.live-snippet .ck.ck-content .table td, -.live-snippet .ck.ck-content .table th { - vertical-align: middle; -} - -/* https://github.com/ckeditor/ckeditor5/issues/1282 */ -.live-snippet .ck.ck-content .table p:first-child { - padding-top: 0; -} - -/* https://github.com/ckeditor/ckeditor5/issues/1282 */ -.live-snippet .ck.ck-content .table p:last-child, -.live-snippet .ck.ck-content .table ul:last-child, -.live-snippet .ck.ck-content .table ol:last-child { - margin-bottom: 0; -} - #snippet-inline-editor .ck-content { margin-bottom: 1rem; padding: 2rem; @@ -278,7 +47,8 @@ https://github.com/ckeditor/ckeditor5/issues/1545 */ border: 1px solid hsla(0, 0%, 0%, 0.15); } -#snippet-inline-editor h2, #snippet-inline-editor h3 { +#snippet-inline-editor h2, +#snippet-inline-editor h3 { margin-top: 0; padding-top: 0; border-bottom: 0; @@ -289,7 +59,6 @@ https://github.com/ckeditor/ckeditor5/issues/1545 */ } #snippet-inline-editor header.ck-content h2 { - margin-bottom: 0; font-size: 2.1rem; } @@ -297,55 +66,3 @@ https://github.com/ckeditor/ckeditor5/issues/1545 */ color: hsla(212, 79%, 9%, 0.59); font-size: 1.6rem; } - -/* examples/builds/document-editor.html */ - -.live-snippet .document-editor { - margin: 1.5em 0; -} - -/* https://github.com/ckeditor/ckeditor5/issues/10731 */ -.live-snippet .ck-source-editing-area textarea { - width: 100%; - overflow: auto; -} - -/* https://github.com/cksource/ckeditor5-internal/issues/3223 */ -.ck-body-wrapper .ck.ck-powered-by-balloon.ck-balloon-panel.ck-balloon-panel_visible { - display: none; -} - -/* ------------- TOUR BALLOON ------------- */ - -.tippy-content { - padding: 8px 6px; -} - -.tippy-content .tippy-content__message { - display: flex; - align-items: center; - min-height: 36px; - margin-right: 28px; - padding-left: 44px; - line-height: 1.5; - - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIzOHB4IiBoZWlnaHQ9IjM3cHgiIHZpZXdCb3g9IjAgMCAzOCAzNyIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5oaW50PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9IkFydGJvYXJkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOTg5LjAwMDAwMCwgLTQzNS4wMDAwMDApIj4gICAgICAgICAgICA8ZyBpZD0icG9wdXAtaW52ZXJ0ZWQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDk3My41MDAwMDAsIDQwOC4wMDAwMDApIj4gICAgICAgICAgICAgICAgPGcgaWQ9ImhpbnQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE2LjAwMDAwMCwgMjcuMDAwMDAwKSI+ICAgICAgICAgICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsLW9wYWNpdHk9IjAuMTE5NTkxMzQ2IiBmaWxsPSIjRkZGRkZGIiBjeD0iMTguOTMwMjMyNiIgY3k9IjE4LjUiIHI9IjE4LjUiPjwvY2lyY2xlPiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE4Ljg5MTEyMDUsMzAuMjkyMzI1NyBDMTkuNDg4NTg4MSwzMC4yOTIzMjU3IDE5Ljk3MjkzMTIsMjkuODA3OTgyNiAxOS45NzI5MzEyLDI5LjIxMDUxNSBDMTkuOTcyOTMxMiwyOC42MTMwNDc1IDE5LjQ4ODU4ODEsMjkuMDE5MDMyNCAxOC44OTExMjA1LDI5LjAxOTAzMjQgQzE4LjI5MzY1MjksMjkuMDE5MDMyNCAxNy44MDkzMDk4LDI4LjYxMzA0NzUgMTcuODA5MzA5OCwyOS4yMTA1MTUgQzE3LjgwOTMwOTgsMjkuODA3OTgyNiAxOC4yOTM2NTI5LDMwLjI5MjMyNTcgMTguODkxMTIwNSwzMC4yOTIzMjU3IFoiIGlkPSJPdmFsIiBmaWxsPSIjMDAwMDAwIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTUuNjA1NzA4MiwyNS4xNDkwNDg2IEwyMi4xNzY1MzI4LDI1LjE0OTA0ODYgTDIyLjA3MTIzNDEsMjcuMzUxMzMxNyBDMjIuMDIwMjU0NiwyOC40MTc1NDg5IDIxLjE0MDk1MTYsMjkuMjU1ODE0IDIwLjA3MzUxNjMsMjkuMjU1ODE0IEwxNy43MDg3MjQ3LDI5LjI1NTgxNCBDMTYuNjQxMjg5NCwyOS4yNTU4MTQgMTUuNzYxOTg2NCwyOC40MTc1NDg5IDE1LjcxMTAwNjksMjcuMzUxMzMxNyBMMTUuNjA1NzA4MiwyNS4xNDkwNDg2IEwxNS42MDU3MDgyLDI1LjE0OTA0ODYgWiIgaWQ9IkNvbWJpbmVkLVNoYXBlIiBmaWxsPSIjQUJBQkFCIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTguODkxMTIwNSw5Ljg5NTM0ODg0IEMyMi41MjAwODY3LDkuODk1MzQ4ODQgMjUuNDYxOTQ1LDEyLjc4MDYzMyAyNS40NjE5NDUsMTYuMzM5ODExNCBDMjUuNDYxOTQ1LDE3LjQ5NTAyMTkgMjUuMTUyMDI4NiwxOC41NzkyMzk2IDI0LjYwOTI5MiwxOS41MTY4NTA5IEMyNC41OTEzODY5LDE5LjU5MjczMDIgMjQuNTQ5NzEyNSwxOS42NzI1MzE2IDI0LjQ4MjgxNjUsMTkuNzU1NjE1MiBMMjQuMzYyNTAzNywxOS45MDk3MTk2IEMyNC4yMzYwOTQyLDIwLjA5NTcwODYgMjQuMTAwMDg4MiwyMC4yNzQ4ODY4IDIzLjk1NTE3OTYsMjAuNDQ2NTczNyBDMjMuMTEwMjA1LDIxLjYwNzczNDggMjIuNTE3Nzk5NCwyMi43NDUwNTg1IDIyLjE3NjUzMjgsMjMuODU4MzUxIEwyMi4xNzY1MzI4LDI1LjI5MDM0MjggTDE1LjYwNTcwODIsMjUuMjkwMzQyOCBMMTUuNjA1NzA4MiwyMy44NTgzNTEgQzE1LjI0NTI3MzIsMjIuNzYyNDIyNCAxNC42NjgyMDA5LDIxLjY0MzIwNjQgMTMuODc0NDkxMywyMC41MDA3MDI4IEMxMi45MDQzMjA5LDE5LjM3NzY3MzEgMTIuMzIwMjk2LDE3LjkyNTYzMzggMTIuMzIwMjk2LDE2LjMzOTgxMTQgQzEyLjMyMDI5NiwxMi43ODA2MzMgMTUuMjYyMTU0Myw5Ljg5NTM0ODg0IDE4Ljg5MTEyMDUsOS44OTUzNDg4NCBaIE0xOC40ODA0NDQsMTEuMTI3Mzc4NCBDMTUuNzU4NzE5MywxMS4xMjczNzg0IDEzLjU1MjMyNTYsMTMuMzMzNzcyMiAxMy41NTIzMjU2LDE2LjA1NTQ5NjggQzEzLjU1MjMyNTYsMTYuMjQyMjEzNyAxMy41NjI3MDk1LDE2LjQyNjUwNTIgMTMuNTgyOTMxNCwxNi42MDc4MjU1IEwxMy42MjA1NzQ0LDE2Ljg3NzUwOTIgTDE0LjQ1NTk4NTQsMTYuODc3NjIwOCBDMTQuNDAyMDEyOCwxNi42MTE5OTQ1IDE0LjM3MzY3ODYsMTYuMzM3MDU0NSAxNC4zNzM2Nzg2LDE2LjA1NTQ5NjggQzE0LjM3MzY3ODYsMTMuODUyMTk1OSAxNi4xMDg3NzQ3LDEyLjA1NDE0ODQgMTguMjg3MTE5NiwxMS45NTMyMDE1IEwxOC40ODA0NDQsMTEuOTQ4NzMxNSBMMTguNDgwNDQ0LDExLjEyNzM3ODQgWiIgaWQ9IlNoYXBlIiBmaWxsPSIjRjhDMjcyIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iR3JvdXAtNSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNy43NDQxODYsIDE1LjUyNzQ4NCkiIHN0cm9rZT0iI0Y4QzI3MiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gICAgICAgICAgICAgICAgICAgICAgICA8bGluZSB4MT0iMS42MDM1OTQwOCIgeTE9IjEuNjAzNTk0MDgiIHgyPSIxLjYwMzU5NDA4IiB5Mj0iLTAuNTQ3NTY4NzEiIGlkPSJQYXRoLTItQ29weSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMS42MDM1OTQsIDAuNTI4MDEzKSByb3RhdGUoOTAuMDAwMDAwKSB0cmFuc2xhdGUoLTEuNjAzNTk0LCAtMC41MjgwMTMpICI+PC9saW5lPiAgICAgICAgICAgICAgICAgICAgICAgIDxsaW5lIHgxPSIyMC4yNjAwNDIzIiB5MT0iMS42MDM1OTQwOCIgeDI9IjIwLjI2MDA0MjMiIHkyPSItMC41NDc1Njg3MSIgaWQ9IlBhdGgtMi1Db3B5LTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIwLjI2MDA0MiwgMC41MjgwMTMpIHJvdGF0ZSg5MC4wMDAwMDApIHRyYW5zbGF0ZSgtMjAuMjYwMDQyLCAtMC41MjgwMTMpICI+PC9saW5lPiAgICAgICAgICAgICAgICAgICAgPC9nPiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLTUtQ29weSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTguNTk5MTg0LCAxNi40NDUyMTMpIHJvdGF0ZSgtMzAuMDAwMDAwKSB0cmFuc2xhdGUoLTE4LjU5OTE4NCwgLTE2LjQ0NTIxMykgdHJhbnNsYXRlKDcuODQzMzcwLCAxNS41ODQ3NDgpIiBzdHJva2U9IiNGOEMyNzIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+ICAgICAgICAgICAgICAgICAgICAgICAgPGxpbmUgeDE9IjEuNjAzNTk0MDgiIHkxPSIxLjYwMzU5NDA4IiB4Mj0iMS42MDM1OTQwOCIgeTI9Ii0wLjU0NzU2ODcxIiBpZD0iUGF0aC0yLUNvcHkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuNjAzNTk0LCAwLjUyODAxMykgcm90YXRlKDkwLjAwMDAwMCkgdHJhbnNsYXRlKC0xLjYwMzU5NCwgLTAuNTI4MDEzKSAiPjwvbGluZT4gICAgICAgICAgICAgICAgICAgICAgICA8bGluZSB4MT0iMjAuMjYwMDQyMyIgeTE9IjEuNjAzNTk0MDgiIHgyPSIyMC4yNjAwNDIzIiB5Mj0iLTAuNTQ3NTY4NzEiIGlkPSJQYXRoLTItQ29weS0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMC4yNjAwNDIsIDAuNTI4MDEzKSByb3RhdGUoOTAuMDAwMDAwKSB0cmFuc2xhdGUoLTIwLjI2MDA0MiwgLTAuNTI4MDEzKSAiPjwvbGluZT4gICAgICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC01LUNvcHktMyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjMuNDg1MzgyLCA4LjE4MDQzOCkgcm90YXRlKC02MC4wMDAwMDApIHRyYW5zbGF0ZSgtMjMuNDg1MzgyLCAtOC4xODA0MzgpIHRyYW5zbGF0ZSgyMi4xOTQ2ODUsIDcuMzE5OTczKSIgc3Ryb2tlPSIjRjhDMjcyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPiAgICAgICAgICAgICAgICAgICAgICAgIDxsaW5lIHgxPSIxLjI1MTU4NTYyIiB5MT0iMS42MDM1OTQwOCIgeDI9IjEuMjUxNTg1NjIiIHkyPSItMC41NDc1Njg3MSIgaWQ9IlBhdGgtMi1Db3B5LTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuMjUxNTg2LCAwLjUyODAxMykgcm90YXRlKDkwLjAwMDAwMCkgdHJhbnNsYXRlKC0xLjI1MTU4NiwgLTAuNTI4MDEzKSAiPjwvbGluZT4gICAgICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC01LUNvcHktNCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTQuMDk4NDkwLCA4LjAyMzk5MCkgcm90YXRlKC0xMjAuMDAwMDAwKSB0cmFuc2xhdGUoLTE0LjA5ODQ5MCwgLTguMDIzOTkwKSB0cmFuc2xhdGUoMTIuODA3NzkzLCA3LjE2MzUyNSkiIHN0cm9rZT0iI0Y4QzI3MiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gICAgICAgICAgICAgICAgICAgICAgICA8bGluZSB4MT0iMS4yNTE1ODU2MiIgeTE9IjEuNjAzNTk0MDgiIHgyPSIxLjI1MTU4NTYyIiB5Mj0iLTAuNTQ3NTY4NzEiIGlkPSJQYXRoLTItQ29weS0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxLjI1MTU4NiwgMC41MjgwMTMpIHJvdGF0ZSg5MC4wMDAwMDApIHRyYW5zbGF0ZSgtMS4yNTE1ODYsIC0wLjUyODAxMykgIj48L2xpbmU+ICAgICAgICAgICAgICAgICAgICA8L2c+ICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iR3JvdXAtNS1Db3B5LTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE4Ljg3MDE2MCwgMTYuMTc0MjM3KSByb3RhdGUoLTE1MC4wMDAwMDApIHRyYW5zbGF0ZSgtMTguODcwMTYwLCAtMTYuMTc0MjM3KSB0cmFuc2xhdGUoOC4xMTQzNDYsIDE1LjMxMzc3MikiIHN0cm9rZT0iI0Y4QzI3MiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gICAgICAgICAgICAgICAgICAgICAgICA8bGluZSB4MT0iMS42MDM1OTQwOCIgeTE9IjEuNjAzNTk0MDgiIHgyPSIxLjYwMzU5NDA4IiB5Mj0iLTAuNTQ3NTY4NzEiIGlkPSJQYXRoLTItQ29weSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMS42MDM1OTQsIDAuNTI4MDEzKSByb3RhdGUoOTAuMDAwMDAwKSB0cmFuc2xhdGUoLTEuNjAzNTk0LCAtMC41MjgwMTMpICI+PC9saW5lPiAgICAgICAgICAgICAgICAgICAgICAgIDxsaW5lIHgxPSIyMC4yNjAwNDIzIiB5MT0iMS42MDM1OTQwOCIgeDI9IjIwLjI2MDA0MjMiIHkyPSItMC41NDc1Njg3MSIgaWQ9IlBhdGgtMi1Db3B5LTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIwLjI2MDA0MiwgMC41MjgwMTMpIHJvdGF0ZSg5MC4wMDAwMDApIHRyYW5zbGF0ZSgtMjAuMjYwMDQyLCAtMC41MjgwMTMpICI+PC9saW5lPiAgICAgICAgICAgICAgICAgICAgPC9nPiAgICAgICAgICAgICAgICAgICAgPGxpbmUgeDE9IjE5LjAwODQ1NjciIHkxPSI4LjA1NzA4MjQ1IiB4Mj0iMTkuMDA4NDU2NyIgeTI9IjUuOTA1OTE5NjYiIGlkPSJQYXRoLTIiIHN0cm9rZT0iI0Y4QzI3MiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L2xpbmU+ICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=); - background-position: top left; - background-repeat: no-repeat; -} - -.tippy-content .tippy-content__close-button { - color: var(--ck-color-text); - position: absolute; - top: 0; - right: 0; -} - -.tippy-content .tippy-content__close-button::after { - content: '✖'; -} - -.tippy-content .ck.ck-button.tippy-content__close-button:hover { - background: none; - cursor: pointer; -} diff --git a/docs/assets/global.js b/docs/assets/global.js index 06ca77547ca..c9cbad481ac 100644 --- a/docs/assets/global.js +++ b/docs/assets/global.js @@ -45,12 +45,18 @@ function createClipboardInputNotification() { const title = 'Hello!'; const message = ` -

    We detected that you tried to paste content from Microsoft Word or Google Docs.

    -

    Please bear in mind that the editor demo to which you try to paste does not have all the features enabled. - Due to that, unsupported formatting is being stripped.

    -

    Check out the Paste from Office or - Paste from Google Docs - demos for the best experience.

    `; +

    + We detected that you tried to paste content from Microsoft Word or Google Docs. +

    +

    + Please bear in mind that the editor demo to which you try to paste does not have all the features enabled. + Due to that, unsupported formatting is being stripped. +

    +

    + Check out the Paste from Office or + Paste from Google Docs demos + for the best experience. +

    `; createNotification( title, message ); } @@ -71,7 +77,7 @@ function getViewportTopOffsetConfig() { } /** -* Creates a notification and appends it to the `.main__content` element. +* Creates a notification and appends it to the `.l-layout__container` element. * * @param {String} title A title of the notification. * @param {String} message A message to display in the notification. @@ -80,8 +86,8 @@ function getViewportTopOffsetConfig() { */ function createNotification( title, message ) { const notificationTemplate = ` -

    ${ title }

    -
    +

    ${ title }

    +
    ${ message }
    `; @@ -89,18 +95,18 @@ function createNotification( title, message ) { const notification = document.createElement( 'div' ); const close = document.createElement( 'button' ); - close.classList.add( 'main__notification-close' ); + close.classList.add( 'notification__close' ); close.innerText = '✕'; close.setAttribute( 'aria-label', 'Close the notification' ); - notification.classList.add( 'main__notification', 'notice' ); + notification.classList.add( 'notification', 'notice' ); notification.innerHTML = notificationTemplate; // ATM we support only top-right position. notification.style.top = getViewportTopOffsetConfig() + 10 + 'px'; notification.style.right = '10px'; notification.appendChild( close ); - const activeNotifications = document.querySelectorAll( '.main__notification' ); + const activeNotifications = document.querySelectorAll( '.notification' ); // Translate the position of multiple notifications (just in case). if ( activeNotifications.length > 0 ) { @@ -110,8 +116,8 @@ function createNotification( title, message ) { notification.style.right = parseInt( notification.style.right ) + moveOffset + 'px'; } - // Append notification to the `.main__content` element. - const main = document.querySelector( '.main__content' ); + // Append notification to the `.l-layout__container` element. + const main = document.querySelector( '.l-layout__container' ); main.appendChild( notification ); close.addEventListener( 'click', () => { @@ -147,7 +153,7 @@ function createNotification( title, message ) { element.setAttribute( 'srcset', srcset ); } - [ ...document.querySelectorAll( '.main__content-inner img' ) ] + [ ...document.querySelectorAll( '.content-inner img' ) ] .filter( img => isRelativeUrl( img.getAttribute( 'src' ) ) ) .forEach( img => { // Update ``. diff --git a/docs/assets/img/closing-a-pr.gif b/docs/assets/img/closing-a-pr.gif deleted file mode 100644 index 72412abfe30..00000000000 Binary files a/docs/assets/img/closing-a-pr.gif and /dev/null differ diff --git a/docs/assets/styles.css b/docs/assets/styles.css index 68d695b0dc4..f7519381c8b 100644 --- a/docs/assets/styles.css +++ b/docs/assets/styles.css @@ -66,57 +66,3 @@ https://github.com/ckeditor/ckeditor5-build-decoupled-document/issues/12 */ .main .main__content-inner .features-html-output th { background-color: hsl(0, 0%, 96%); } - -/* Tabs navigation component */ - -.tabs { - margin: 1.5em 0; - - --tabs-active-background: hsl(0, 0%, 96%); - --tabs-active-border: hsl(231.35deg 89.21% 52.75%); - --tabs-list-border-color: hsl(0deg 0% 91.37%); -} - -.tabs ul.tabs__list { - list-style-type: none; - margin: 0; - padding: 0; - display: flex; - flex-direction: row; - justify-content: flex-start; - border-bottom: 1px solid var(--tabs-list-border-color); -} - -.tabs ul.tabs__list li { - margin: 0; - display: inline-block; - text-align: center; - border-bottom: 2px solid transparent; -} - -.tabs ul.tabs__list li a.tabs__list__tab-text { - text-decoration: none; - color: initial; - display: flex; - justify-content: center; - align-items: center; - padding: 8px 16px; -} - -.tabs ul.tabs__list li.tabs__list__tab_selected { - border-bottom: 2px solid var(--tabs-active-border); -} - -.tabs ul.tabs__list li.tabs__list__tab_selected a.tabs__list__tab-text { - color: var(--tabs-active-border); -} - -.tabs .tabs__panel { - padding: 1.333em 0; - display: none; -} - -.tabs .tabs__panel.tabs__panel_selected { - display: block; -} - diff --git a/docs/examples/builds/document-editor.md b/docs/examples/builds/document-editor.md index cfc833a9b65..8b8e784ba82 100644 --- a/docs/examples/builds/document-editor.md +++ b/docs/examples/builds/document-editor.md @@ -18,4 +18,4 @@ See the {@link framework/document-editor tutorial} to learn how to create this k Check out the [source code](https://github.com/ckeditor/ckeditor5-demos/tree/master/user-interface-document) of this editor preset or build your custom editor setup with our [interactive Builder](https://ckeditor.com/ckeditor-5/builder/?redirect=docs). -{@snippet examples/document-editor} +{@snippet examples/document-editor wide} diff --git a/docs/examples/index.md b/docs/examples/index.md index f8c3097591e..14f91cc7ca3 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -10,11 +10,11 @@ meta-description: Navigate through CKEditor 5 examples to see what you can creat Check out these examples of different editor integrations. See the various editor types in action, witness the unharnessed power of a feature-rich preset, and find out amazing, custom-tailored implementations using the CKEditor 5 Framework. - - - Use the **main menu button in the upper-left corner** to navigate through the documentation. - - +
    + + Use the **main menu button in the upper-left corner** to navigate through the documentation. + +
    ## Editor types diff --git a/docs/features/accessibility.md b/docs/features/accessibility.md index 4be8229cd02..1b6ea7f1b86 100644 --- a/docs/features/accessibility.md +++ b/docs/features/accessibility.md @@ -30,24 +30,13 @@ In our ongoing commitment to accessibility, we provide a report based on the [IT We continuously update the VPAT**®** report to reflect any changes or improvements. You can download the latest version of the VPAT**®** document below. - - ⬇️ Download VPAT**®** report for CKEditor 5 v44.3.0 (Mar 5, 2025) - -
    - Previous versions - -
    -
    +📎 Download VPAT**®** report for CKEditor 5 v44.3.0 (Mar 5, 2025) + +### Previous versions + +- 📎 VPAT® report for CKEditor 5 v43.0.0 (Aug 7, 2024) +- 📎 VPAT® report for CKEditor 5 v41.4.2 (May 17, 2024) +- 📎 VPAT® report for CKEditor 5 v41.3.0 (Apr 10, 2024) ## Keyboard shortcuts diff --git a/docs/features/editor-placeholder.md b/docs/features/editor-placeholder.md index c202676e192..6e30d94c9e1 100644 --- a/docs/features/editor-placeholder.md +++ b/docs/features/editor-placeholder.md @@ -124,6 +124,8 @@ editor.editing.view.document.getRoot( 'main' ).placeholder = 'new placeholder'; {@snippet features/update-placeholder} +Update placeholder + ## Contribute The source code of the feature is available on GitHub at [https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-core](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-core). diff --git a/docs/features/feature-digest.md b/docs/features/feature-digest.md index 2f38119d5fc..ac79b217b2b 100644 --- a/docs/features/feature-digest.md +++ b/docs/features/feature-digest.md @@ -13,2115 +13,1789 @@ CKEditor 5 offers over 150 various features, from basic editing capabilities lik Core editing capability provides tools to create, edit, and style content. Here are essentials that every writer needs in their tool belt, like bold or italics. There is also something for coders - advanced HTML editing capabilities where you can directly edit HTML elements. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link features/general-html-support Advanced HTML Editing} - - Advanced HTML Editing provides general HTML support, offering detailed - control over permissible HTML elements, attributes, and styles. It - further allows HTML Source Code Editing, handling HTML elements, - HTML comments, and editing of the full page content, including meta - tags. -
    - -  {@link features/full-page-html Full page HTML} - - - Thanks to the full page HTML feature, you can use CKEditor 5 to edit - entire HTML pages (from <html> to - </html>), including the page metadata. While the - {@link features/general-html-support General HTML Support} - feature focuses on elements inside the content (the document's - <body>), this feature enables markup invisible - to the end user. -
    - -  {@link features/general-html-support General HTML Support (GHS)} - - - With the General HTML Support (GHS) feature, developers can enable HTML - features that are not supported by any other dedicated CKEditor 5 - plugins. GHS lets you add elements, attributes, classes, and styles to - the source. It also ensures this markup stays in the editor window and the output. -
    - -  {@link features/html-comments HTML comment} - - - By default, the editor filters out all HTML comments on initialization. - The {@link features/html-comments HTML comment} - feature lets developers keep HTML comments in the document without - displaying them to the user. -
    - -  {@link features/html-embed HTML embed} - - - The HTML embed feature lets you embed any HTML snippet in your content. - The feature is meant for more advanced users who want to directly - interact with HTML fragments. -
    - -  {@link features/show-blocks Show blocks} - - - The show blocks feature allows the content creators to visualize all - block-level elements (except for widgets). It surrounds them with an - outline and displays their element name in the top-left corner of the - box. -
    - -  {@link features/source-editing Source code editing} - - - The source code editing feature lets you view and edit the source of your - document. -
    - -  {@link features/source-editing-enhanced Enhanced source code editing} - - - Enhanced source code editing allows for viewing and editing the source code of the document in a handy modal window (compatible with all editor types) with syntax highlighting, autocompletion and more. -
    - {@link features/block-quote Block formatting} - - Block Formatting allows for the organization and emphasis of content - through the use of Headings, Style Headings, Block Quotes, and - Horizontal Lines. Users can select from different levels of headings to - outline sections and subsections, apply various styles to these headings - for visual hierarchy, insert horizontal lines to delineate sections, and - use block quotes to highlight excerpts or important passages. -
    - -  {@link features/block-quote Block quote} - - - The block quote feature lets you easily include block quotations or pull - quotes in your content. It is also an attractive way to draw the - readers' attention to selected parts of the text. -
    - -  {@link features/headings Headings/paragraph} - - - The heading feature helps you structure your document by adding headings - to parts of the text. They make your content easier to scan by both - readers and search engines. -
    - -  {@link features/horizontal-line Horizontal line} - - - The horizontal line feature lets you visually divide your content into - sections by inserting horizontal lines (also known as horizontal rules). - It is an easy way to organize the content or indicate a change of topic. -
    - -  {@link features/indent Block indentation} - - - The block indentation feature lets you set indentation for text blocks - such as paragraphs, headings, or lists. This way you can visually - distinguish parts of your content. -
    - {@link features/bookmarks Bookmarks} - - The bookmarks feature allows for adding and managing the bookmarks anchors - attached to the content of the editor. These provide fast access to important - content sections, and speed up the navigation boosting efficiency. -
    - {@link framework/deep-dive/clipboard Clipboard} - - Copy, cut, and paste content within the editor or from external sources. -
    - {@link features/code-blocks Code blocks} - - Supports the insertion and management of pre-formatted code snippets with - distinct styling. -
    - {@link features/drag-drop Drag and drop} - - Rearrange elements within a document, including moving text blocks, - images, or other content types. -
    - {@link features/font Font formatting} - - The font feature lets you change font family, size, and color (including - background color). All of these options are configurable. -
    - -  {@link features/font#configuring-the-font-color-and-font-background-color-features Font background color} - - - Effortlessly make the words stand out even more with a colored background. -
    - -  {@link features/font#configuring-the-font-color-and-font-background-color-features Font color} - - Effortlessly make the letters stand out with their own color.
    - -  {@link features/font#configuring-the-font-family-feature Font family} - - - Choose from a predefined set of fonts, depending on the type of content - and its destination - print, screen, etc. -
    - -  {@link features/font#configuring-the-font-size-feature Font size} - - Easily control the size of the letters.
    - {@link features/images-overview Image} - - The image feature allows adding images of various kinds to the rich - content inside the editor. A large set of subfeatures lets the users - fully control this process. Upload or paste images, insert - via URL, use responsive images, resize images, add captions, set - different image styles, and link images. -
    - -  {@link features/images-text-alternative Image alt text} - - - Add description text, AKA alternative text, for images. Alt text - improves accessibility by telling screen readers and search engines what - the image depicts. -
    - -  {@link features/images-captions Image captions} - - - Add optional captions for images, which are shown below the picture. -
    - -  {@link features/images-inserting Image insert via URL} - - - You can insert images by uploading them directly from your disk, but you - can also configure CKEditor 5 to let you insert images using URLs. This - way, you can save time by adding images that are already online. -
    - -  {@link features/images-linking Image linking} - - - The - {@link module:link/linkimage~LinkImage} - plugin lets you use images as links. -
    - -  {@link features/images-resizing Image resize} - - - The image resize feature lets you change the width of images in your - content. It is implemented by the - {@link module:image/imageresize~ImageResize} - plugin. -
    - -  {@link features/images-styles Image styles} - - - The image styles feature lets you adjust the appearance of images. It - works by applying CSS classes to images or changing their type from - inline to block or vice versa. -
    - -  {@link features/image-upload Image upload} - - - Inserting - {@link features/images-overview images} - into content created with CKEditor 5 is quite a common task. In a - properly configured rich-text editor, there are several ways for the end - user to insert images. -
    - -  {@link features/images-responsive Responsive images} - - - The ability to have responsive images in the rich-text editor content is - a great modern feature provided by the {@link features/ckbox CKBox asset manager}. - With a single image upload, several optimized versions of that image - are created, each for a different size of the display. The CKBox feature - produces a <picture> element with a set of optimized - images. The browser will automatically load the image with the - dimensions most suitable for the presented page resolution, which makes - the image load much faster and saves bandwidth. -
    - - {@link features/line-height Line height - - Premium feature - } - - - The line height feature lets you adjust the vertical spacing between lines of text, - controlling how tightly or loosely text is packed within paragraphs. -
    - {@link features/lists Lists} - - Lists allow the creation and management of various list types, including - to-do lists, bulleted and numbered lists, with additional customization - options such as list styles, setting the start number for lists, - creating reversed lists, adjusting list indentation, and crafting nested - lists. -
    - -  {@link features/lists-editing#indenting-lists List indentation} - - - Besides controlling - {@link features/indent text block indentation}, - the indent and outdent buttons allow for indenting list items - (nesting them). -
    - -  {@link features/lists#list-start-index List start index} - - - The list start index feature allows the user to choose the starting - point of an ordered list. By default, this would be 1 (or A, or I – see - the list styles section). Sometimes, you may want to start a list with - some other digit or letter, though. -
    - -  {@link features/lists#list-styles List styles} - - - The list style feature introduces some more styles for the list item - markers. When - {@link module:list/listconfig~ListPropertiesConfig#member-styles enabled}, - it adds 3 styles for unordered lists and 6 styles for ordered lists - to choose from. The user will be able to set or change the list style - via the dropdown. It opens when you click the arrow next to the - appropriate list button in the toolbar. -
    - -  {@link features/multi-level-lists Multi-level lists - - Premium feature - } - - - Multi-level lists with the legal style numbering feature allows for easy - creation and modification of numbered lists with counters (1, 1.1, - 1.1.1). These are crucial for clear referencing and hierarchical - organization in complex documents. The feature offers full compatibility - with Microsoft Word. -
    - -  {@link features/lists-editing#indenting-lists Nested lists} - - - Besides controlling {@link features/indent text block indentation}, - the indent and outdent buttons allow for indenting list items - (nesting them). -
    - -  {@link features/lists Ordered lists} - - - The list feature lets you create ordered (numbered) lists. The unique - thing about them is that you can put any content inside each list item - (including block elements like paragraphs and tables), retaining the - continuity of numbering and indentation. You can also easily control the - list markers type. -
    - -  {@link features/lists#reversed-list Reversed list} - - - The reversed list feature lets the user reverse the numbering order of a - list, changing it from ascending to descending. This is useful in - countdowns and things-to-do lists that need to reproduce steps in a - reversed order (for example, in disassembly instructions). -
    - -  {@link features/todo-lists To-do lists} - - - The to-do list feature lets you create a list of interactive checkboxes - with labels. It supports all features of {@link features/lists bulleted and numbered lists}, - so you can nest a to-do list together with any combination of other - lists. -
    - -  {@link features/lists Unordered lists} - - - The list feature lets you create unordered (bulleted) lists. The unique - thing about them is that you can put any content inside each list item - (including block elements like paragraphs and tables), retaining the - continuity of numbering and indentation. You can also easily control the - list markers' shape. -
    - {@link features/mermaid Mermaid Exp} - - You can create flowcharts and diagrams in CKEditor 5 thanks to the - experimental integration with the Mermaid library. Mermaid uses a - Markdown-inspired syntax to create and dynamically modify flowcharts, - Gantt diagrams, pie or quadrant charts, graphs, mindmaps, and more. -
    - {@link features/remove-format Remove formatting} - - The remove format feature lets you quickly remove any text formatting - applied using inline HTML elements and CSS styles, like basic text - styles (bold, italic) or font family, size, and color. This feature does - not remove block-level formatting (headings, images) or semantic data - (links). -
    - {@link features/select-all Select all} - - Enables the selection of all content within the editor with a single - command or shortcut. -
    - {@link features/tables Tables} - - CKEditor 5 provides robust support for tables, with the ability to merge - and split cells, resize columns, style tables and individual cells, - insert and delete columns and rows, as well as create nested tables for - complex data presentation. -
    - -  {@link features/tables-resize Columns resizing} - - - The - {@link module:table/tablecolumnresize~TableColumnResize} - plugin lets you resize tables and individual table columns. It gives you - complete control over column width. -
    - -  {@link features/tables#table-contextual-toolbar Insert/delete columns & rows} - - - The basic table features allow users to insert tables into content, add - or remove columns and rows and merge or split cells. -
    - -  {@link features/tables#table-contextual-toolbar Merge & split cells} - - - The basic table features allow users to insert tables into content, add - or remove columns and rows, and merge or split cells. -
    - -  {@link features/tables#nesting-tables Nesting} - - - CKEditor 5 allows nesting tables inside other table's cells. This may be - used for creating advanced charts or layouts based on tables. The nested - table can be formatted just like a regular one. -
    - -  {@link features/tables-styling Styling tables & cells} - - - CKEditor 5 comes with some additional tools that help you change the - look of tables and table cells. You can control border color and style, - background color, padding, or text alignment. -
    - -  {@link features/tables#default-table-headers Table headers} - - - To make every inserted table have n number of rows and - columns as table headers by default, set an optional table configuration - property defaultHeadings. -
    - -  {@link features/tables#table-selection Table selection} - - - The - {@link module:table/tableselection~TableSelection} - plugin introduces support for the custom selection system for tables - that lets you:• Select an arbitrary rectangular table fragment – a - few cells from different rows, a column (or a few of them) or a row (or - multiple rows).• Apply formatting or add a link to all selected - cells at once. The table selection plugin is loaded automatically - by the Table plugin. -
    - -  {@link features/tables-caption Tables caption} - - - The - {@link module:table/tablecaption~TableCaption} - plugin lets you add captions to your tables. Table captions also improve - accessibility as they are recognized by screen readers. -
    - -  {@link features/layout-tables Layout tables} - - - The - {@link module:table/tablelayout~TableLayout} - plugin is used to structure web page content spatially rather than for presenting tabular data. - It lets integrators create multi-column designs and precise positioning of elements on a page. -
    - {@link features/text-alignment Text alignment} - - Allows the adjustment of text alignment to the left, right, center, or - justify and permits the alteration of indentation. -
    - {@link features/basic-styles Text formatting} - - CKEditor 5 provides developers with text editing and formatting features - such as Bold, Italic, Underline, Strikethrough, Subscript, Superscript, - Inline Code, Highlight, and Font Styles. These features allow users to - style and present their content as needed. This ensures users can style - their text to improve readability, match branding guidelines, or - highlight important content sections. -
    - -  {@link features/basic-styles Bold} - - Making the letters look like the good time were never gone.
    - -  {@link features/basic-styles Code} - - Snippet look like a terminal from the 1990s movie.
    - -  {@link features/highlight Highlight} - - - Highlight makes important content stand out, either with font color or - background fill. -
    - -  {@link features/basic-styles Italic} - - Making the letters look like seashore pines.
    - -  {@link features/basic-styles Strikethrough} - - Never mind, will not need it anymore.
    - -  {@link features/style Styles} - - - The styles feature lets you easily apply predefined styles available for - block and inline content. -
    - -  {@link features/basic-styles Subscript} - - Fine print at the bottom, like atom numbers.
    - -  {@link features/basic-styles Superscript} - - Fine print on top, like references in a book.
    - -  {@link features/basic-styles Underline} - - Stuff looks important, yo. Or like a link, too.
    - {@link features/undo-redo Undo/redo} - Backtrack or repeat actions for editing purposes.
    +### Advanced HTML Editing + +Advanced HTML Editing provides general HTML support, offering detailed control over permissible HTML elements, attributes, and styles. It further allows HTML Source Code Editing, handling HTML elements, HTML comments, and editing of the full page content, including meta tags. + + + + + Full page HTML + + + Thanks to the full page HTML feature, you can use CKEditor 5 to edit entire HTML pages (from `` to ``), including the page metadata. While the General HTML Support feature focuses on elements inside the content (the document's ``), this feature enables markup invisible to the end user. + + + + Feature page + + + + + + General HTML Support (GHS) + + + With the General HTML Support (GHS) feature, developers can enable HTML features that are not supported by any other dedicated CKEditor 5 plugins. GHS lets you add elements, attributes, classes, and styles to the source. It also ensures this markup stays in the editor window and the output. + + + + Feature page + + + + + + + HTML comment + + + By default, the editor filters out all HTML comments on initialization. The HTML comment feature lets developers keep HTML comments in the document without displaying them to the user. + + + + Feature page + + + + + + + HTML embed + + + The HTML embed feature lets you embed any HTML snippet in your content. The feature is meant for more advanced users who want to directly interact with HTML fragments. + + + + Feature page + + + + + + + Show blocks + + + The show blocks feature allows the content creators to visualize all block-level elements (except for widgets). It surrounds them with an outline and displays their element name in the top-left corner of the box. + + + + Feature page + + + + + + + Source code editing + + + The source editing feature lets you view and edit the source of your document. + + + + Feature page + + + + + + + Enhanced source code editing + + + Enhanced source code editing allows for viewing and editing the source code of the document in a handy modal window (compatible with all editor types) with syntax highlighting, autocompletion and more. + + + + Feature page + + + + + +### Block formatting + +Block Formatting allows for the organization and emphasis of content through the use of Headings, Style Headings, Block Quotes, and Horizontal Lines. Users can select from different levels of headings to outline sections and subsections, apply various styles to these headings for visual hierarchy, insert horizontal lines to delineate sections, and use block quotes to highlight excerpts or important passages. + + + + + Block quote + + + The block quote feature lets you easily include block quotations or pull quotes in your content. It is also an attractive way to draw the readers' attention to selected parts of the text. + + + + Feature page + + + + + + + Headings/paragraph + + + The heading feature helps you structure your document by adding headings to parts of the text. They make your content easier to scan by both readers and search engines. + + + + Feature page + + + + + + + Horizontal line + + + The horizontal line feature lets you visually divide your content into sections by inserting horizontal lines (also known as horizontal rules). It is an easy way to organize the content or indicate a change of topic. + + + + Feature page + + + + + + + Block indentation + + + The block indentation feature lets you set indentation for text blocks such as paragraphs, headings, or lists. This way you can visually distinguish parts of your content. + + + + Feature page + + + + + +### Bookmarks + +The bookmarks feature allows for adding and managing the bookmarks anchors attached to the content of the editor. These provide fast access to important content sections, and speed up the navigation boosting efficiency. + + + Feature page + + +### Clipboard + +Copy, cut, and paste content within the editor or from external sources. + + + Feature page + + +### Code blocks + +Supports the insertion and management of pre-formatted code snippets with distinct styling. + + + Feature page + + +### Drag and drop + +Rearrange elements within a document, including moving text blocks, images, or other content types. + + + Feature page + + +### Font formatting + +The font feature lets you change font family, size, and color (including background color). All of these options are configurable. + + + + + Font background color + + + Effortlessly make the words stand out even more with a colored background. + + + + Feature page + + + + + + + Font color + + + Effortlessly make the letters stand out with their own color. + + + + Feature page + + + + + + + Font family + + + Choose from a predefined set of fonts, depending on the type of content and its destination - print, screen, etc. + + + + Feature page + + + + + + + Font size + + + Easily control the size of the letters. + + + + Feature page + + + + + +### Image + +The image feature allows adding images of various kinds to the rich content inside the editor. A large set of subfeatures lets the users fully control this process. Upload or paste images, insert via URL, use responsive images, resize images, add captions, set different image styles, and link images. + + + + + Image alt text + + + Add description text, AKA alternative text, for images. Alt text improves accessibility by telling screen readers and search engines what the image depicts. + + + + Feature page + + + + + + + Image captions + + + Add optional captions for images, which are shown below the picture. + + + + Feature page + + + + + + + Image insert via URL + + + You can insert images by uploading them directly from your disk, but you can also configure CKEditor 5 to let you insert images using URLs. This way, you can save time by adding images that are already online. + + + + Feature page + + + + + + + Image linking + + + The LinkImage plugin lets you use images as links. + + + + Feature page + + + + + + + Image resize + + + The image resize feature lets you change the width of images in your content. It is implemented by the ImageResize plugin. + + + + Feature page + + + + + + + Image styles + + + The image styles feature lets you adjust the appearance of images. It works by applying CSS classes to images or changing their type from inline to block or vice versa. + + + + Feature page + + + + + + + Image upload + + + Inserting images into content created with CKEditor 5 is quite a common task. In a properly configured rich-text editor, there are several ways for the end user to insert images. + + + + Feature page + + + + + + + Responsive images + + + The ability to have responsive images in the rich-text editor content is a great modern feature provided by the CKBox asset manager. With a single image upload, several optimized versions of that image are created, each for a different size of the display. The CKBox feature produces a `` element with a set of optimized images. The browser will automatically load the image with the dimensions most suitable for the presented page resolution, which makes the image load much faster and saves bandwidth. + + + + Feature page + + + + + +### Links + +Facilitates the addition of hyperlinks to text, automatically converting typed or pasted URLs into clickable links, and allowing manual insertion and editing of links. + + + Feature page + + +### Lists + +Lists allow the creation and management of various list types, including to-do lists, bulleted and numbered lists, with additional customization options such as list styles, setting the start number for lists, creating reversed lists, adjusting list indentation, and crafting nested lists. + + + + + List indentation + + + Besides controlling text block indentation, the indent and outdent buttons allow for indenting list items (nesting them). + + + + Feature page + + + + + + + List start index + + + The list start index feature allows the user to choose the starting point of an ordered list. By default, this would be 1 (or A, or I – see the list styles section). Sometimes, you may want to start a list with some other digit or letter, though. + + + + Feature page + + + + + + + List styles + + + The list style feature introduces more styles for the list item markers. When enabled, it adds 3 styles for unordered lists and 6 styles for ordered lists to choose from. The user will be able to set or change the list style via the dropdown. + + + + Feature page + + + + + + + Multi-level lists + + + Multi-level lists with the legal style numbering feature allows for easy creation and modification of numbered lists with counters (1, 1.1, 1.1.1). These are crucial for clear referencing and hierarchical organization in complex documents. The feature offers full compatibility with Microsoft Word. + + + + Feature page + + + + + + + Nested lists + + + Besides controlling text block indentation, the indent and outdent buttons allow for indenting list items (nesting them). + + + + Feature page + + + + + + + Ordered lists + + + The list feature lets you create ordered (numbered) lists. The unique thing about them is that you can put any content inside each list item (including block elements like paragraphs and tables), retaining the continuity of numbering and indentation. You can also easily control the list markers type. + + + + Feature page + + + + + + + Reversed list + + + The reversed list feature lets the user reverse the numbering order of a list, changing it from ascending to descending. This is useful in countdowns and things-to-do lists that need to reproduce steps in a reversed order (for example, in disassembly instructions). + + + + Feature page + + + + + + + To-do lists + + + The to-do list feature lets you create a list of interactive checkboxes with labels. It supports all features of bulleted and numbered lists, so you can nest a to-do list together with any combination of other lists. + + + + Feature page + + + + + + + Unordered lists + + + The list feature lets you create unordered (bulleted) lists. The unique thing about them is that you can put any content inside each list item (including block elements like paragraphs and tables), retaining the continuity of numbering and indentation. You can also easily control the list markers' shape. + + + + Feature page + + + + + +Mermaid + +You can create flowcharts and diagrams in CKEditor 5 thanks to the experimental integration with the Mermaid library. Mermaid uses a Markdown-inspired syntax to create and dynamically modify flowcharts, Gantt diagrams, pie or quadrant charts, graphs, mindmaps, and more. + + + Feature page + + +### Remove formatting + +The remove format feature lets you quickly remove any text formatting applied using inline HTML elements and CSS styles, like basic text styles (bold, italic) or font family, size, and color. This feature does not remove block-level formatting (headings, images) or semantic data (links). + + + Feature page + + +### Select all + +Enables the selection of all content within the editor with a single command or shortcut. + + + Feature page + + +### Tables + +CKEditor 5 provides robust support for tables, with the ability to merge and split cells, resize columns, style tables and individual cells, insert and delete columns and rows, as well as create nested tables for complex data presentation. + + + + + Columns resizing + + + The TableColumnResize plugin lets you resize tables and individual table columns. It gives you complete control over column width. + + + + Feature page + + + + + + + Insert/delete columns & rows + + + The basic table features allow users to insert tables into content, add or remove columns and rows and merge or split cells. + + + + Feature page + + + + + + + Merge & split cells + + + The basic table features allow users to insert tables into content, add or remove columns and rows, and merge or split cells. + + + + Feature page + + + + + + + Nesting + + + CKEditor 5 allows nesting tables inside other table's cells. This may be used for creating advanced charts or layouts based on tables. The nested table can be formatted just like a regular one. + + + + Feature page + + + + + + + Styling tables & cells + + + CKEditor 5 comes with some additional tools that help you change the look of tables and table cells. You can control border color and style, background color, padding, or text alignment. + + + + Feature page + + + + + + + Table headers + + + To make every inserted table have n number of rows and columns as table headers by default, set an optional table configuration property defaultHeadings. + + + + Feature page + + + + + + + Table selection + + + The TableSelection plugin introduces support for the custom selection system for tables that lets you:• Select an arbitrary rectangular table fragment – a few cells from different rows, a column (or a few of them) or a row (or multiple rows).• Apply formatting or add a link to all selected cells at once. The table selection plugin is loaded automatically by the Table plugin. + + + + Feature page + + + + + + + Table caption + + + The TableCaption plugin lets you add captions to your tables. Table captions also improve accessibility as they are recognized by screen readers. + + + + Feature page + + + + + + + Layout tables + + + The TableLayout plugin is used to structure web page content spatially rather than for presenting tabular data. It lets integrators create multi-column designs and precise positioning of elements on a page. + + + + Feature page + + + + + +### Text alignment + +Allows the adjustment of text alignment to the left, right, center, or justify and permits the alteration of indentation. + + + Feature page + + +### Text formatting + +CKEditor 5 provides developers with text editing and formatting features such as Bold, Italic, Underline, Strikethrough, Subscript, Superscript, Inline Code, Highlight, and Font Styles. These features allow users to style and present their content as needed. This ensures users can style their text to improve readability, match branding guidelines, or highlight important content sections. + + + + + Bold + + + Making the letters look like the good time were never gone. + + + + Feature page + + + + + + + Code + + + Snippet look like a terminal from the 1990s movie. + + + + Feature page + + + + + + + Highlight + + + Highlight makes important content stand out, either with font color or background fill. + + + + Feature page + + + + + + + Italic + + + Making the letters look like seashore pines. + + + + Feature page + + + + + + + Line height + + + The line height feature lets you adjust the vertical spacing between lines of text, controlling how tightly or loosely text is packed within paragraphs. + + + + Feature page + + + + + + + Strikethrough + + + Never mind, will not need it anymore. + + + + Feature page + + + + + + + Styles + + + The styles feature lets you easily apply predefined styles available for block and inline content. + + + + Feature page + + + + + + + Subscript + + + Fine print at the bottom, like atom numbers. + + + + Feature page + + + + + + + Superscript + + + Fine print on top, like references in a book. + + + + Feature page + + + + + + + Underline + + + Stuff looks important, yo. Or like a link, too. + + + + Feature page + + + + + +### Undo/redo + +Backtrack or repeat actions for editing purposes. + + + Feature page + ## Collaboration Collaborate with others - real-time or asynchronously. Comment, co-author, and mention team members in your documents. With collaboration features review process should be a breeze. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link features/collaboration Asynchronous collaboration - - Premium feature - } - - Asynchronous Collaboration in CKEditor 5 is designed for teams using a - turn-based approach to collaboratively write, review, and discuss - content within the application. It integrates Track Changes, Comments, - and Revision History features to facilitate collaboration. -
    - -  {@link features/collaboration Local data storage - - Premium feature - } - - - In asynchronous collaboration, data is maintained on the client's - servers. -
    - {@link features/comments Comments - - Premium feature - } - - Users can add side notes to marked fragments of the document, including - text and block elements such as images. It also allows the users to - discuss in threads and remove comments when they finish the discussion. -
    - -  {@link features/comments Comments archive - - Premium feature - } - - - Comments threads can be either deleted or resolved. The latter provides - a way to archive comments that are no longer relevant, reducing clutter - and making it easier to focus on the most important feedback. Users can - access the comments archive from the toolbar and use it to view and - restore archived comments if necessary. It helps to simplify the - feedback management process. -
    - -  {@link features/comments-outside-editor Comments outside editor - - Premiumfeature - } - - - The comments feature API, together with - {@link module:core/context~Context}, lets you create deeper integrations with your application. One such - integration is enabling comments on non-editor form fields. -
    - {@link features/mentions Mentions} - - The mention feature supports smart autocompletion triggered by user - input. Typing a predetermined marker, like @ or #, prompts a panel to - appear, offering autocomplete suggestions. -
    - {@link features/real-time-collaboration Real-time collaboration - - Premium feature - } - - Real-Time Collaboration in CKEditor 5 is designed for users who are - writing, reviewing, and commenting on content simultaneously. It also - automatically solves all conflicts if users make changes at the same - time. -
    - -  {@link features/users-in-real-time-collaboration Co-authoring - - Premium feature - } - - Multiple user real-time editing and content creation feature.
    - -   - - On-premises - - Premium feature - - - - - On-premises real-time collaboration version to deploy to client's own - infrastructure, includes a private cloud. -
    - -   - - SaaS - - Premium feature - - - - Real-time collaboration provided as a service by CKSource.
    - {@link features/revision-history Revision history - - Premium feature - } - - The revision history feature is a document versioning tool. It allows - CKEditor 5 users to create and view the chronological revision history - of their content. These versions are listed in the side panel. The - preview mode allows for easy viewing of content development between - revisions. You can rename, compare, and restore older revisions on the - go. -
    - {@link features/track-changes Track changes - - Premium feature - } - - The track changes feature brings automatic suggestion marking for the - document as you change it. When editing the document, the user can - switch to the track changes mode. All their changes will then create - suggestions that they can accept or discard. -
    - {@link features/users Users list and permissions - - Premium feature - } - - The - {@link module:collaboration-core/users~Users} - plugin and related plugins let you manage user data and permissions. - This is essential when many users are working on the same document. -
    +Asynchronous collaboration + +Asynchronous Collaboration in CKEditor 5 is designed for teams using a turn-based approach to collaboratively write, review, and discuss content within the application. It integrates Track Changes, Comments, and Revision History features to facilitate collaboration. + + + + Local data storage + + + In asynchronous collaboration, data is maintained on the client's servers. + + + + Feature page + + + + +Comments + +Users can add side notes to marked fragments of the document, including text and block elements such as images. It also allows the users to discuss in threads and remove comments when they finish the discussion. + + + + + Comments archive + + + Comments threads can be either deleted or resolved. The latter provides a way to archive comments that are no longer relevant, reducing clutter and making it easier to focus on the most important feedback. Users can access the comments archive from the toolbar and use it to view and restore archived comments if necessary. It helps to simplify the feedback management process. + + + + Feature page + + + + + + + Comments outside editor + + + The comments feature API, together with Context, lets you create deeper integrations with your application. One such integration is enabling comments on non-editor form fields. + + + + Feature page + + + + + + + Sidebar modes + + + There are three built-in UIs to display comment threads and suggestion annotations: the wide sidebar, the narrow sidebar, and inline balloons. You can also display them together in more advanced scenarios where various annotation sources (comments, suggestions) are connected to different UIs or even create your UI for annotations. + + + + Feature page + + + + + +### Mentions + +The mention feature supports smart autocompletion triggered by user input. Typing a predetermined marker, like @ or #, prompts a panel to appear, offering autocomplete suggestions. + + + Feature page + + +Real-time collaboration + +Real-Time Collaboration in CKEditor 5 is designed for users who are writing, reviewing, and commenting on content simultaneously. It also automatically solves all conflicts if users make changes at the same time. + + + + + Co-authoring + + + Multiple user real-time editing and content creation feature. + + + + Feature page + + + + + + + On-premises + + + On-premises real-time collaboration version to deploy to client's own infrastructure, includes a private cloud. + + + + Feature page + + + + + + + SaaS + + + Real-time collaboration provided as a service by CKSource. + + + + Feature page + + + + + +Revision history + +The revision history feature is a document versioning tool. It allows CKEditor 5 users to create and view the chronological revision history of their content. These versions are listed in the side panel. The preview mode allows for easy viewing of content development between revisions. You can rename, compare, and restore older revisions on the go. + + + Feature page + + +Track changes + +The track changes feature brings automatic suggestion marking for the document as you change it. When editing the document, the user can switch to the track changes mode. All their changes will then create suggestions that they can accept or discard. + + + Feature page + + +Users list and permissions + +The Users plugin and related plugins let you manage user data and permissions. This is essential when many users are working on the same document. + + + Feature page + ## Content conversion & embedding Collaborate also regarding different formats. With content conversions, you can integrate content across commonly used business formats. You can also enrich your content with media embeds. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link features/export-pdf Content generation - - Premium feature - } - CKEditor 5 may be your universal starting point for generating content in several recognizable formats.
    - -  {@link features/export-pdf Export to PDF - - Premium feature - } - - - Create a PDF from in-editor content seamlessly. Customize headers and - footers, include page breaks, embed images, and choose from various - fonts. -
    - -  {@link features/export-word Export to Word - - Premium feature - } - - - Instantly convert content from the editor to a Word document with a - single click, maintaining its appearance and formatting. The final - document includes suggestions, comments, page breaks, and embedded - images. -
    - -  {@link features/import-word Import from Word - - Premium feature - } - - - Effortlessly transform Word documents into clean HTML within CKEditor 5 - while retaining the original styling, as well as comments and change - tracking annotations. -
    - {@link features/export-with-inline-styles Export with inline styles} - - Premium feature - - The - {@link module:export-inline-styles/exportinlinestyles~ExportInlineStyles} - plugin applies the styles defined by CSS style sheets directly on HTML elements. -
    - {@link features/markdown Markdown output} - - Enable Markdown as the default output format instead of HTML with the - Markdown plugin. Combined with Autoformatting, CKEditor becomes an - efficient Markdown editor, allowing the creation of text documents using - the simplified formatting syntax favored by developers. -
    - {@link features/media-embed Media embed} - - Use the insert media button in the toolbar to embed media. - Pasting a media URL directly into the editor content automatically - embeds the media. -
    - {@link features/paste-markdown Paste Markdown - Exp - } - - The paste Markdown feature lets users paste Markdown-formatted content - straight into the editor. It will be then converted into rich text on - the fly. -
    - {@link module:engine/dataprocessor/xmldataprocessor~XmlDataProcessor XML output} - - Turn your content into parsable XML files for automation and - cross-platform interoperability. -
    +Content generation + +CKEditor 5 may be your universal starting point for generating content in several recognizable formats. + + + + + Export to PDF + + + Create a PDF from in-editor content seamlessly. Customize headers and footers, include page breaks, embed images, and choose from various fonts. + + + + Feature page + + + + + + + Export to Word + + + Instantly convert content from the editor to a Word document with a single click, maintaining its appearance and formatting. The final document includes suggestions, comments, page breaks, and embedded images. + + + + Feature page + + + + + + + Import from Word + + + Effortlessly transform Word documents into clean HTML within CKEditor 5 while retaining the original styling, as well as comments and change tracking annotations. + + + + Feature page + + + + + +Export with inline styles + +The `ExportInlineStyles` plugin applies the styles defined by CSS style sheets directly on HTML elements. + + + Feature page + + +### Markdown output + +Enable Markdown as the default output format instead of HTML with the Markdown plugin. Combined with Autoformatting, CKEditor becomes an efficient Markdown editor, allowing the creation of text documents using the simplified formatting syntax favored by developers. + + + Feature page + + +### Media embed + +Use the insert media button in the toolbar to embed media. Pasting a media URL directly into the editor content automatically embeds the media. + + + Feature page + + +Paste Markdown + +The paste Markdown feature lets users paste Markdown-formatted content straight into the editor. It will be then converted into rich text on the fly. + + + Feature page + + +### XML output + +Turn your content into parsable XML files for automation and cross-platform interoperability. + + + Feature page + ## Page management Format, organize, and navigate your documents easily with page management features. Create a table of contents, insert page breaks, and manage pagination. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link features/document-outline Document outline - - Premium feature - } - - The Document Outline feature automatically detects and lists document - headings in a sidebar, enabling faster navigation through large - documents. Headings are organized in a structured list, so users can - click and jump to different sections quickly. This feature also - allows for customization of the outline's location within the user - interface, catering to different user preferences for workspace layout. -
    - {@link features/minimap Page utilities} - - CKEditor 5 Page Utilities enables users to dictate the structuring and - print formatting of their documents effectively. -
    - -  {@link features/minimap Content minimap} - - - Offers a concise, birds-eye view of the document's content, - allowing for quick navigation and content management. -
    - -  {@link features/title Document title} - - - Allows users to set and modify the document's title within the - editing interface, ensuring accurate reflection of the contents. -
    - -  {@link features/page-break Page break} - - - Facilitates the insertion of manual breaks within the document, enabling - the definition of page endings and beginnings for optimal layout and - print clarity. -
    - {@link features/pagination Pagination - - Premium feature - } - - The Pagination feature visually indicates where pages begin and end within a document. This feature is - designed to assist users in preparing their documents for printing or export to various document - formats, ensuring that the transition between pages is seamless and accurately reflected in the final - output. Users may adjust content distribution across pages as they like, ensuring well-organized - documents with presented content, whether in digital form or print. By providing a clear view of how - text and elements will appear page-by-page, Pagination aids in the creation of professional and polished - documents. -
    - {@link features/table-of-contents Table of contents - - Premium feature - } - - The Table of Contents feature is a dynamic tool for organizing - documents. It allows for the insertion of a linked table of contents - that automatically updates in real time as the document's content - changes. This means changes made to headings or structured sections - within the document are reflected immediately in the table of contents, - accurately representing the document structure. -
    +Document outline + +The Document Outline feature automatically detects and lists document headings in a sidebar, enabling faster navigation through large documents. Headings are organized in a structured list, so users can click and jump to different sections quickly. This feature also allows for customization of the outline's location within the user interface, catering to different user preferences for workspace layout. + + + Feature page + + +### Page utilities + +CKEditor 5 Page Utilities enables users to dictate the structuring and print formatting of their documents effectively. + + + + + Content minimap + + + Offers a concise, birds-eye view of the document's content, allowing for quick navigation and content management. + + + + Feature page + + + + + + + Document title + + + Allows users to set and modify the document's title within the editing interface, ensuring accurate reflection of the contents. + + + + Feature page + + + + + + + Page break + + + Facilitates the insertion of manual breaks within the document, enabling the definition of page endings and beginnings for optimal layout and print clarity. + + + + Feature page + + + + + +Pagination + +The Pagination feature visually indicates where pages begin and end within a document. This feature is designed to assist users in preparing their documents for printing or export to various document formats, ensuring that the transition between pages is seamless and accurately reflected in the final output. Users may adjust content distribution across pages as they like, ensuring well-organized documents with presented content, whether in digital form or print. By providing a clear view of how text and elements will appear page-by-page, Pagination aids in the creation of professional and polished documents. + + + Feature page + + +Table of contents + +The Table of Contents feature is a dynamic tool for organizing documents. It allows for the insertion of a linked table of contents that automatically updates in real time as the document's content changes. This means changes made to headings or structured sections within the document are reflected immediately in the table of contents, accurately representing the document structure. + + + Feature page + ## Productivity Speed up the content creation process with dedicated productivity utilities. Autoformat your content as you write (or paste from other editors) or even delegate some tasks to an AI Assistant. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link features/ai-assistant-overview AI Assistant - - Premium feature - } - - The AI Assistant feature enhances editing efficiency and creativity with - artificial intelligence capabilities. It allows users to generate new - content and process data through custom queries or utilize a set of - predefined commands that are also customizable. The feature supports - integration with multiple AI API providers: OpenAI, Azure OpenAI, and - Amazon Bedrock. You can also integrate it with custom models. -
    - {@link features/autoformat Automation} - Automate your workflow with CKEditor 5 automation tools, regardless of whether you write, link, or save! -
    - -  {@link features/autoformat Autoformatting} - - - Use Autoformatting to get Markdown-like shortcodes for - quick formatting without needing to navigate through toolbar buttons or - dropdown menus. This feature caters to the most common formatting needs. -
    - -  {@link features/text-transformation Automatic text transformations} - - - The Automatic Text Transformation autocorrects or - transforms predefined text fragments into their designated forms. It - comes with a range of popular text transformations pre-configured, and - accepts customization by adding or removing autocorrect entries. It is - commonly used to automate the expansion of abbreviations or short - phrases into their full forms. -
    - -  {@link features/autosave Autosave} - - - The Autosave feature guarantees that your work is never - lost. It automatically saves changes - for instance, when content is - modified. This could involve sending the latest version of the document - to the server, providing peace of mind through continuous backup. -
    - {@link features/case-change Case change - - Premium feature - } - - The Case Change feature simplifies adjusting text cases within a - document. With just a single click, users can shift text between - UPPERCASE, lowercase, and Title Case options. The case transformation - can be applied to various text blocks (paragraph, heading, or list item) - by placing the cursor within the block. Alternatively, users can select - a specific fragment of text they wish to modify. This feature - enhances the editing workflow by removing the need for manual case - adjustments. -
    - {@link features/emoji Emoji} - - The Emoji feature lets you insert emojis into the document from the editor - toolbar, or on the go while writing the content. -
    - {@link features/find-and-replace Find and replace} - - The Find and Replace feature in CKEditor 5's Productivity tools - allows you to search for words or phrases in your document and replace - them with different text. This function helps speed up editing and - maintain content consistency. -
    - {@link features/format-painter Format painter - - Premium feature - } - - The Format Painter feature lets users clone formatting from one section - and apply it to others within a document. This tool speeds up - maintaining style consistency across the document. Once initiated, - Format Painter can continue to apply the copied formatting to multiple - sections consecutively. This "continuous painting" ensures a - uniform style is achieved quickly without the need to repeatedly select - the formatting options for each new section. -
    - {@link features/fullscreen Fullscreen mode} - The fullscreen mode lets you temporarily expand the editor to the whole browser viewport, giving you more space to comfortably edit content and use editor's UI features. -
    - {@link features/accessibility#keyboard-shortcuts Keyboard shortcuts} - - CKEditor 5 supports various keyboard shortcuts that boost productivity - and provide necessary accessibility to screen reader users. -
    - {@link features/math-equations MathType - - Premium feature - } - - Math Equations allows you to add properly formatted mathematical - notation and chemical formulas to your documents. This feature supports - the inclusion of math equations, which can be handwritten on a tablet - and automatically converted into well-formed digital text. It also - offers simple numbering of equations and the ability to customize with - various fonts and colors, enhancing readability and presentation in your - content. -
    - {@link features/merge-fields Merge fields - - Premium feature - } - - Merge Fields allows the inclusion of placeholders in your content, - facilitating the creation of document templates, especially useful for - email templates and document automation. These placeholders can later be - replaced with dynamic values by the customer's application, - enabling tasks like mass email distribution or generation of - personalized documents. -
    - {@link features/paste-from-google-docs Paste from Google Docs} - - Paste from Office features let you paste content from Microsoft Word and - Microsoft Excel and preserve its original structure and formatting. This - is the basic, open-source Paste from Office feature. -
    - {@link features/paste-from-office Paste from Office} - - Paste from Office features let you paste content from Microsoft Word and - Microsoft Excel and preserve its original structure and formatting. This - is the basic, open-source Paste from Office feature. -
    - {@link features/paste-from-office-enhanced Enhanced paste from Office - - Premium feature - } - - The Enhanced paste from Word/Excel feature accurately retains formatting - and structure when content is pasted from Microsoft Word documents into - the editor. This includes preserving text styles, lists, tables, and - layouts. The feature facilitates the transfer of documents from Word to - CKEditor 5 without compromising on formatting. -
    - {@link features/paste-plain-text Paste plain text} - - The Paste as Plain Text feature strips formatting from the pasted text. This feature ensures that text - pasted into the document adopts the style of the surrounding content, effectively described as "pasting - without formatting." Additionally, it intelligently converts double-line breaks into paragraphs and - single-line breaks into soft breaks, aiding in maintaining the structural integrity of the document. -
    - {@link features/slash-commands Slash commands - - Premium feature - } - - The Slash Commands feature lets users insert block elements and apply - styles using just the keyboard. By pressing the / key, a panel with - suggested commands appears, enabling quick and mouse-free actions. Users - can filter through these commands by typing additional phrases after the - /, making it easier to find specific commands. Additionally, the option - to customize personal commands is available, allowing for a tailored - editing experience. -
    - {@link features/special-characters Special characters} - - Insert a variety of unique symbols and characters into your document - with CKEditor 5's Special Characters feature. This includes mathematical - operators, currency symbols, punctuation, graphic symbols like arrows or - bullets, and Unicode letters that are not typically available on - standard keyboards, such as umlauts or diacritics. Additionally, the - feature supports the insertion of emojis. This tool is particularly - useful for enhancing the detail and accuracy of content that requires - specialized symbols. -
    - {@link features/template Templates - - Premium feature - } - - The Templates feature enables the insertion of predefined content structures - into documents, ranging from small content pieces, like formatted - tables, to complete document frameworks, like formal letter templates. - Templates accelerate the document creation process while ensuring - adherence to the company's content and document policies. -
    +AI Assistant + +The AI Assistant feature enhances editing efficiency and creativity with artificial intelligence capabilities. It allows users to generate new content and process data through custom queries or utilize a set of predefined commands that are also customizable. The feature supports integration with multiple AI API providers: OpenAI, Azure OpenAI, and Amazon Bedrock. You can also integrate it with custom models. + + + Feature page + + +### Automation + +Automate your workflow with CKEditor 5 automation tools, regardless of whether you write, link, or save! + + + + + Autoformatting + + + Use Autoformatting to get Markdown-like shortcodes for quick formatting without needing to navigate through toolbar buttons or dropdown menus. This feature caters to the most common formatting needs. + + + + Feature page + + + + + + + Autolink + + + With Autolink, typing or pasting URLs and email addresses automatically transforms them into clickable links. This functionality is enabled by default, ensuring that links are always ready to use. + + + + Feature page + + + + + + + Automatic text transformations + + + The Automatic Text Transformation autocorrects or transforms predefined text fragments into their designated forms. It comes with a range of popular text transformations pre-configured, and accepts customization by adding or removing autocorrect entries. It is commonly used to automate the expansion of abbreviations or short phrases into their full forms. + + + + Feature page + + + + + + + Autosave + + + The Autosave feature guarantees that your work is never lost. It automatically saves changes - for instance, when content is modified. This could involve sending the latest version of the document to the server, providing peace of mind through continuous backup. + + + + Feature page + + + + + +Case change + +The Case Change feature simplifies adjusting text cases within a document. With just a single click, users can shift text between UPPERCASE, lowercase, and Title Case options. The case transformation can be applied to various text blocks (paragraph, heading, or list item) by placing the cursor within the block. Alternatively, users can select a specific fragment of text they wish to modify. This feature enhances the editing workflow by removing the need for manual case adjustments. + + + Feature page + + +### Emoji + +The Emoji feature lets you insert emojis into the document from the editor toolbar, or on the go while writing the content. + + + Feature page + + +### Find and replace + +The Find and Replace feature in CKEditor 5's Productivity tools allows you to search for words or phrases in your document and replace them with different text. This function helps speed up editing and maintain content consistency. + + + Feature page + + +Format painter + +The Format Painter feature lets users clone formatting from one section and apply it to others within a document. This tool speeds up maintaining style consistency across the document. Once initiated, Format Painter can continue to apply the copied formatting to multiple sections consecutively. This "continuous painting" ensures a uniform style is achieved quickly without the need to repeatedly select the formatting options for each new section. + + + Feature page + + +### Fullscreen mode + +The fullscreen mode lets you temporarily expand the editor to the whole browser viewport, giving you more space to comfortably edit content and use editor's UI features. + + + Feature page + + +### Keyboard shortcuts + +CKEditor 5 supports various keyboard shortcuts that boost productivity and provide necessary accessibility to screen reader users. + + + Feature page + + +MathType + +Math Equations allows you to add properly formatted mathematical notation and chemical formulas to your documents. This feature supports the inclusion of math equations, which can be handwritten on a tablet and automatically converted into well-formed digital text. It also offers simple numbering of equations and the ability to customize with various fonts and colors, enhancing readability and presentation in your content. + + + Feature page + + +Merge fields + +Merge Fields allows the inclusion of placeholders in your content, facilitating the creation of document templates, especially useful for email templates and document automation. These placeholders can later be replaced with dynamic values by the customer's application, enabling tasks like mass email distribution or generation of personalized documents. + + + Feature page + + +### Paste from Google Docs + +Paste from Google Docs allows you to paste content from Google Docs and preserve its original structure and formatting. + + + Feature page + + +### Paste from Office + +Paste from Office features let you paste content from Microsoft Word and Microsoft Excel and preserve its original structure and formatting. This is the basic, open-source Paste from Office feature. + + + Feature page + + +Enhanced paste from Office + +The Enhanced Paste from Word/Excel feature accurately retains formatting and structure when content is pasted from Microsoft Word documents into the editor. This includes preserving text styles, lists, tables, and layouts. The feature facilitates the transfer of documents from Word to CKEditor 5 without compromising on formatting. + + + Feature page + + +### Paste plain text + +The Paste as Plain Text feature strips formatting from the pasted text. This feature ensures that text pasted into the document adopts the style of the surrounding content, effectively described as "pasting without formatting." Additionally, it intelligently converts double-line breaks into paragraphs and single-line breaks into soft breaks, aiding in maintaining the structural integrity of the document. + + + Feature page + + +Slash commands + +The Slash Commands feature lets users insert block elements and apply styles using just the keyboard. By pressing the / key, a panel with suggested commands appears, enabling quick and mouse-free actions. Users can filter through these commands by typing additional phrases after the /, making it easier to find specific commands. Additionally, the option to customize personal commands is available, allowing for a tailored editing experience. + + + Feature page + + +### Special characters + +The Special Characters feature lets you insert a variety of unique symbols and characters into your document. This includes mathematical operators, currency symbols, punctuation, graphic symbols like arrows or bullets, and Unicode letters that are not typically available on standard keyboards, such as umlauts or diacritics. Additionally, the feature supports the insertion of emojis. This tool is particularly useful for enhancing the detail and accuracy of content that requires specialized symbols. + + + Feature page + + +Templates + +The Templates feature enables the insertion of predefined content structures into documents, ranging from small content pieces, like formatted tables, to complete document frameworks, like formal letter templates. Templates accelerate the document creation process while ensuring adherence to the company's content and document policies. + + + Feature page + ## Configurations Configure CKEditor 5 to your liking. Choose the editor type, modify the toolbar, and select a language from our translated language packs. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link features/editor-placeholder Editor placeholder} - - You can prompt the user to input content by displaying a configurable - placeholder text when the editor is empty. This works similarly to the - native DOM placeholder attribute used by inputs. Not to be confused with - content placeholder. -
    - {@link getting-started/setup/editor-types Editor UI types} - - The editor's user interface is dependent on the editor types. The editor - provides functionality through specialized features accessible via a - configurable toolbar or keyboard shortcuts. Some of these features are - only available with certain editor types. -
    - -  {@link getting-started/setup/editor-types#balloon-editor-and-balloon-block-editor Balloon block editor} - - - Balloon block is essentially the balloon editor with an extra block - toolbar, which can be accessed using the button attached to the editable - content area and following the selection in the document. The toolbar - gives access to additional block–level editing features. -
    - -  {@link getting-started/setup/editor-types#balloon-editor-and-balloon-block-editor Balloon block editor} - - - Balloon editor is similar to inline editor. The difference between them - is that the toolbar appears in a balloon next to the selection (when the - selection is not empty). -
    - -  {@link getting-started/setup/editor-types#classic-editor Classic editor} - - - Classic editor is what most users traditionally learned to associate - with a rich-text editor – a toolbar with an editing area placed in a - specific position on the page, usually as a part of a form that you use - to submit some content to the server. -
    - -  {@link getting-started/setup/editor-types#decoupled-editor-document Decoupled editor} - - - The document editor focuses on a rich-text editing experience similar to - large editing packages such as Google Docs or Microsoft Word. It works - best for creating documents, which are usually later printed or exported - to PDF files. -
    - -  {@link getting-started/setup/editor-types#inline-editor Inline editor} - - - The inline editor comes with a floating toolbar that becomes visible - when the editor is focused (for example, by clicking it). A common - scenario for using the inline editor is offering users the possibility - to edit content (such as headings and other small areas) in its real - location on a web page instead of doing it in a separate administration - section. -
    - -  {@link getting-started/setup/editor-types#multi-root-editor Multi-root editor} - - - The multi-root editor is an editor type that features multiple, separate - editable areas. The main difference between using a multi-root editor - and using multiple separate editors is the fact that in a multi-root - editor, the editors are “connected.” All editable areas of the same - editor instance share the same configuration, toolbar, undo stack, and - produce one document. -
    - {@link features/email Email editing} - - CKEditor 5 provides a wide variety of tools and functions for editing almost - any kind of content. This includes a wide array of tools and solutions to make - email editing easier and more compatible with various email clients. -
    - -  {@link features/email-configuration-helper Email configuration helper} - - Premium feature - - While configuring an email editor looks like a demanding task, the email configuration - helper plugin is the best way to start and make this experience more manageable. -
    - {@link getting-started/setup/ui-language Professionally translated language packs} - - CKEditor 5 provides 38 professionally translated language options, along - with additional languages provided by community translations. CKEditor 5 - also supports right-to-left (RTL) languages natively. When an RTL - language is selected, the editor automatically adjusts its interface, - including elements like toolbars, dropdowns, and buttons, to ensure an - optimal editing experience.1 -
    - {@link getting-started/setup/toolbar Toolbar and menus} - - The Toolbar Configuration feature provides different toolbar interfaces - for editing content. The default toolbar includes dropdown menus and - buttons for various editing functions. The Balloon Toolbar appears when - text is selected, showing relevant tools. The Block Toolbar is accessed - by clicking a button on the left-hand side of the editor, providing - tools for the active block of content. Additionally, the Multiline - Toolbar option allows for the expansion of the standard toolbar over - multiple lines to display more tools simultaneously. -
    - -  {@link getting-started/setup/toolbar#balloon-toolbar Balloon toolbar} - - - A ballon toolbar is a special instance of the main toolbar, available in the balloon and balloon block editor types. Instead of being fixed to the editing area, it pops up when the user selects some content and provides an editing toolset. -
    - -  {@link getting-started/setup/toolbar#block-toolbar Block toolbar} - - - The block toolbar provides an additional configurable toolbar on the - left-hand side of the content area, useful when the main toolbar is not - accessible (for example in certain layouts, like balloon block editor). -
    - -  {@link getting-started/setup/toolbar#main-editor-toolbar Classic toolbar} - - - The toolbar is the most basic user interface element of CKEditor 5 that - gives you convenient access to all its features. It has buttons and - dropdowns that you can use to format, manage, insert, and change - elements of your content. -
    - -  {@link getting-started/setup/toolbar#extended-toolbar-configuration-format Collapsible toolbar} - - Collapsible toolbar for UI space efficiency.
    - -  {@link features/images-overview#image-contextual-toolbar Image contextual toolbar} - - - The - {@link module:image/imagetoolbar~ImageToolbar} - plugin introduces a contextual toolbar for images. The toolbar appears - when an image is selected and can be configured to contain any buttons - you want. Usually, these will be image-related options, such as the - {@link features/images-text-alternative text alternative} - button, the - {@link features/images-captions image caption} - button, and - {@link features/images-styles image styles} - buttons. The toolbar can also host the image editing button introduced - by the {@link features/ckbox CKBox asset manager}. - Shown below is an example contextual toolbar with an extended set of buttons. -
    - -  {@link getting-started/setup/toolbar#multiline-wrapping-toolbar Multiline toolbar} - - Multiline toolbar for easy access to all functions.
    - -  {@link getting-started/setup/toolbar#grouping-toolbar-items-in-dropdowns-nested-toolbars Nesting toolbars in dropdowns} - - Nested toolbars for space efficiency and task-oriented access.
    - -  {@link features/tables#table-contextual-toolbar Table contextual toolbar} - - - The - {@link module:table/tabletoolbar~TableToolbar} - plugin introduces a contextual toolbar for the table. The toolbar appears when a table or a cell is - selected and contains various table-related buttons. These would typically include adding or removing - columns and rows and merging or splitting cells. If these features are configured, the toolbar will also - contain buttons for captions and table and cell properties. -
    - {@link features/watchdog Watchdog} - - The watchdog utility protects you from data loss in case the editor - crashes. It saves your content just before the crash and creates a new - instance of the editor with your content intact. -
    +### Editor placeholder + +You can prompt the user to input content by displaying a configurable placeholder text when the editor is empty. This works similarly to the native DOM placeholder attribute used by inputs. Not to be confused with content placeholder. + + + Feature page + + +### Editor UI types + +The editor's user interface is dependent on the editor types. The editor provides functionality through specialized features accessible via a configurable toolbar or keyboard shortcuts. Some of these features are only available with certain editor types. + + + + + Balloon block editor + + + Balloon block is essentially the balloon editor with an extra block toolbar, which can be accessed using the button attached to the editable content area and following the selection in the document. The toolbar gives access to additional block–level editing features. + + + + Feature page + + + + + + + Balloon editor + + + Balloon editor is similar to inline editor. The difference between them is that the toolbar appears in a balloon next to the selection (when the selection is not empty). + + + + Feature page + + + + + + + Classic editor + + + Classic editor is what most users traditionally learned to associate with a rich-text editor – a toolbar with an editing area placed in a specific position on the page, usually as a part of a form that you use to submit some content to the server. + + + + Feature page + + + + + + + Decoupled editor + + + The document editor focuses on a rich-text editing experience similar to large editing packages such as Google Docs or Microsoft Word. It works best for creating documents, which are usually later printed or exported to PDF files. + + + + Feature page + + + + + + + Inline editor + + + The inline editor comes with a floating toolbar that becomes visible when the editor is focused (for example, by clicking it). A common scenario for using the inline editor is offering users the possibility to edit content (such as headings and other small areas) in its real location on a web page instead of doing it in a separate administration section. + + + + Feature page + + + + + + + Multi-root editor + + + The multi-root editor is an editor type that features multiple, separate editable areas. The main difference between using a multi-root editor and using multiple separate editors is the fact that in a multi-root editor, the editors are "connected." All editable areas of the same editor instance share the same configuration, toolbar, undo stack, and produce one document. + + + + Feature page + + + + + +### Email editing + +CKEditor 5 provides a wide variety of tools and functions for editing almost any kind of content. This includes a wide array of tools and solutions to make email editing easier and more compatible with various email clients. + + + + Email configuration helper + + + While configuring an email editor looks like a demanding task, the email configuration helper plugin is the best way to start and make this experience more manageable. + + + + Feature page + + + + +### Professionally translated language packs + +CKEditor 5 provides 38 professionally translated language options, along with additional languages provided by community translations. CKEditor 5 also supports right-to-left (RTL) languages natively. When an RTL language is selected, the editor automatically adjusts its interface, including elements like toolbars, dropdowns, and buttons, to ensure an optimal editing experience. + + + Feature page + + +### Toolbar and menus + +The Toolbar Configuration feature provides different toolbar interfaces for editing content. The default toolbar includes dropdown menus and buttons for various editing functions. The Balloon Toolbar appears when text is selected, showing relevant tools. The Block Toolbar is accessed by clicking a button on the left-hand side of the editor, providing tools for the active block of content. Additionally, the Multiline Toolbar option allows for the expansion of the standard toolbar over multiple lines to display more tools simultaneously. + + + + + Balloon toolbar + + + A ballon toolbar is a special instance of the main toolbar, available in the balloon and balloon block editor types. Instead of being fixed to the editing area, it pops up when the user selects some content and provides an editing toolset. + + + + Feature page + + + + + + + Block toolbar + + + The block toolbar provides an additional configurable toolbar on the left-hand side of the content area, useful when the main toolbar is not accessible (for example in certain layouts, like balloon block editor). + + + + Feature page + + + + + + + Classic toolbar + + + The toolbar is the most basic user interface element of CKEditor 5 that gives you convenient access to all its features. It has buttons and dropdowns that you can use to format, manage, insert, and change elements of your content. + + + + Feature page + + + + + + + Collapsible toolbar + + + Collapsible toolbar for UI space efficiency. + + + + Feature page + + + + + + + Image contextual toolbar + + + The {@link module:image/imagetoolbar~ImageToolbar} plugin introduces a contextual toolbar for images. The toolbar appears when an image is selected and can be configured to contain any buttons you want. Usually, these will be image-related options, such as the {@link features/images-text-alternative text alternative} button, the {@link features/images-captions image caption} button, and {@link features/images-styles image styles} buttons. The toolbar can also host the image editing button introduced by the {@link features/ckbox CKBox asset manager}. Shown below is an example contextual toolbar with an extended set of buttons. + + + + Feature page + + + + + + + Menu bar + + + The menu bar is a user interface component that gives you access to all features provided by the editor, organized in menus and categories. This familiar experience, popular in large editing desktop and online packages, improves the usability of the editor. As the menu bar gathers all the editor features, the toolbar can be simple and tidy, providing only the most essential and commonly used features. This is especially welcome in heavily-featured editor integrations. For your convenience, the menu bar provides a default preset structure based on the plugins loaded in the editor. However, you can arrange it to suit your needs, remove unnecessary items, or add menu items related to your custom features. + + + + Feature page + + + + + + + Multiline toolbar + + + Multiline toolbar for easy access to all functions. + + + + Feature page + + + + + + + Nesting toolbars in dropdowns + + + Nested toolbars for space efficiency and task-oriented access. + + + + Feature page + + + + + + + Wide sidebar + + + There are three built-in UIs to display comment threads and suggestion annotations: the wide sidebar, the narrow sidebar, and inline balloons. You can also display them together in more advanced scenarios where various annotation sources (comments, suggestions) are connected to different UIs, or even create your own UI for annotations. + + + + Feature page + + + + + + + Table contextual toolbar + + + The {@link module:table/tabletoolbar~TableToolbar} plugin introduces a contextual toolbar for the table. The toolbar appears when a table or a cell is selected and contains various table-related buttons. These would typically include adding or removing columns and rows and merging or splitting cells. If these features are configured, the toolbar will also contain buttons for captions and table and cell properties. + + + + Feature page + + + + + +### Watchdog + +The watchdog utility protects you from data loss in case the editor crashes. It saves your content just before the crash and creates a new instance of the editor with your content intact. + + + Feature page + ## Compliance Make your content accessible to any person or restrict it to specific users. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link features/accessibility Accessibility support} - - CKEditor 5 includes accessibility functionality designed to ensure - content is accessible to all users. These features encompass keyboard - navigation for easier content access without a mouse, screen reader - compatibility facilitated by ARIA attributes, and semantic output markup - for clearer interpretation of content structures. CKEditor 5 meets the - requirements of the Web Content Accessibility Guidelines (WCAG) 2.2 at - levels A and AA, as well as Section 508 of the Rehabilitation Act, as - detailed in the Accessibility Conformance Report, ensuring broad - accessibility compliance. -
    - {@link features/read-only Read-only support} - - The Read-Only Mode feature enables content to be locked from editing - while still allowing it to be viewed. This mode is often used for - restricting editing access based on user roles, allowing only specific - users or groups to view the content without being able to modify it. - Common uses include viewing sensitive documents like financial reports, - software logs, or copyrighted stories that should not be altered but - need to be accessible for copying or by screen readers. This mode can be - toggled on and off by system triggers. -
    - {@link features/restricted-editing Restricted editing} - - The Restricted Editing feature allows some sections of a document to be - designated as non-editable while others remain editable. This feature - supports two modes: the standard editing mode, where all content can be - edited, and the restricted editing mode, where users can only modify - parts of the content that are specifically marked as editable. This - functionality is useful for workflows where one group of users creates - document templates that include protected sections, and a second group - fills in editable details such as names, dates, or product names without - altering the rest of the document. -
    - {@link features/language Text Part Language} - - The Text Part Language feature allows users to specify the language of - individual sections of text. This capability helps in creating documents - that include multiple languages by ensuring that browsers and screen - readers correctly interpret each part according to its designated - language. This feature is particularly valuable for content that - contains text in varying directions, such as an English document with - Arabic citations. It supports the WCAG 3.1.2 Language of Parts - specification, facilitating the creation of more accessible and - comprehensible multilingual content. -
    - {@link features/word-count Word and character counter} - - The Word and Character Count feature provides a real-time tracking tool - for monitoring the number of words and characters within the editor. - This functionality assists in managing content length and ensuring it - meets specific requirements or limits. -
    - {@link features/spelling-and-grammar-checking WProofreader - - Premium feature - } - - The Spelling and Grammar Checker is a proofreading tool that supports - over 80 languages and dialects. It checks spelling and grammar in real - time and through a separate dialog. Features include spelling - autocorrect, text autocomplete, and suggestions that appear on hover. Users - can create custom dictionaries for specific terms related to their brand - or company. The tool is compliant with WCAG 2.1 and Section 508 - accessibility standards. It also detects sentence-level errors and - offers context-based correction suggestions. -
    +### Accessibility support + +CKEditor 5 includes accessibility functionality designed to ensure content is accessible to all users. These features encompass keyboard navigation for easier content access without a mouse, screen reader compatibility facilitated by ARIA attributes, and semantic output markup for clearer interpretation of content structures. CKEditor 5 meets the requirements of the Web Content Accessibility Guidelines (WCAG) 2.2 at levels A and AA, as well as Section 508 of the Rehabilitation Act, as detailed in the Accessibility Conformance Report, ensuring broad accessibility compliance. + + + Feature page + + +### Read-only support + +The Read-Only Mode feature enables content to be locked from editing while still allowing it to be viewed. This mode is often used for restricting editing access based on user roles, allowing only specific users or groups to view the content without being able to modify it. Common uses include viewing sensitive documents like financial reports, software logs, or copyrighted stories that should not be altered but need to be accessible for copying or by screen readers. This mode can be toggled on and off by system triggers. + + + Feature page + + +### Restricted editing + +The Restricted Editing feature allows some sections of a document to be designated as non-editable while others remain editable. This feature supports two modes: the standard editing mode, where all content can be edited, and the restricted editing mode, where users can only modify parts of the content that are specifically marked as editable. This functionality is useful for workflows where one group of users creates document templates that include protected sections, and a second group fills in editable details such as names, dates, or product names without altering the rest of the document. + + + Feature page + + +### Text Part Language + +The Text Part Language feature allows users to specify the language of individual sections of text. This capability helps in creating documents that include multiple languages by ensuring that browsers and screen readers correctly interpret each part according to its designated language. This feature is particularly valuable for content that contains text in varying directions, such as an English document with Arabic citations. It supports the WCAG 3.1.2 Language of Parts specification, facilitating the creation of more accessible and comprehensible multilingual content. + + + Feature page + + +### Word and character counter + +The Word and Character Count feature provides a real-time tracking tool for monitoring the number of words and characters within the editor. This functionality assists in managing content length and ensuring it meets specific requirements or limits. + + + Feature page + + +WProofreader + +The Spelling and Grammar Checker is a proofreading tool that supports over 80 languages and dialects. It checks spelling and grammar in real time and through a separate dialog. Features include spelling autocorrect, text autocomplete, and suggestions that appear on hover. Users can create custom dictionaries for specific terms related to their brand or company. The tool is compliant with WCAG 2.1 and Section 508 accessibility standards. It also detects sentence-level errors and offers context-based correction suggestions. + + + Feature page + ## Customization Customize your editor even further. Use components and helpers from our UI library to create a UI that will match your design system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link framework/index Editor SDK} - - Select from numerous toolbar styles and over 100 plugins to tailor an - editor that perfectly fits your requirements, all without needing any - development expertise. For those looking to go further, the CKEditor API - enables the creation of custom plugins or modification of the - editor's functionality. To assist the development process, - dedicated resources such as a package generator and the CKEditor 5 - Inspector - a comprehensive suite of debugging tools - are provided, - helping accelerate development work. -
    - -  {@link features/custom-components Custom Widgets and Components} - - - Build custom interactive components using CKEditor 5's widget system. Create block widgets, inline elements, external data integrations, and framework components (React, Vue, Angular) that seamlessly integrate with the editor's content model and UI. -
    - -  {@link framework/development-tools/inspector CKEditor 5 inspector} - - The official CKEditor 5 inspector provides a set of rich debugging tools for editor internals like - {@link framework/architecture/editing-engine#model model}, {@link - framework/architecture/editing-engine#view view}, and {@link - framework/architecture/core-editor-architecture#commands commands}.
    - -  Cloud Services REST API - - The CKEditor Cloud Services is a cloud platform that provides editing and real-time collaboration - services. The platform primarily focuses on providing a backend for the CKEditor 5 features, although - some features can also be used directly through REST APIs.
    - {@link framework/theme-customization Themes} - - The default theme of CKEditor 5 can be customized to match most visual - integration requirements. -
    - {@link framework/architecture/ui-library UI Library} - - The standard UI library of CKEditor 5 is - @ckeditor/ckeditor5-ui. It provides base classes and helpers that allow for building a - modular UI that seamlessly integrates with other components of the - ecosystem. -
    +### Editor SDK + +Select from numerous toolbar styles and over 100 plugins to tailor an editor that perfectly fits your requirements, all without needing any development expertise. For those looking to go further, the CKEditor API enables the creation of custom plugins or modification of the editor's functionality. To assist the development process, dedicated resources such as a package generator and the CKEditor 5 Inspector - a comprehensive suite of debugging tools - are provided, helping accelerate development work. + + + + + CKEditor 5 inspector + + + The official CKEditor 5 inspector provides a set of rich debugging tools for editor internals like model, view, and commands. + + + + Feature page + + + + + + + Cloud Services REST API + + + The CKEditor Cloud Services is a cloud platform that provides editing and real-time collaboration services. The platform primarily focuses on providing a backend for the CKEditor 5 features, although some features can also be used directly through REST APIs. + + + + Feature page + + + + + +### Themes + +Customize the editor theme to match your design needs. + + + Feature page + + +### UI Library + +The standard UI library of CKEditor 5 is @ckeditor/ckeditor5-ui. It provides base classes and helpers that allow for building a modular UI that seamlessly integrates with other components of the ecosystem. + + + Feature page + ## File management Upload and manage your files using file management features. Take advantage of CKBox, our file management solution, or create your own using an adapter. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescription
    - {@link features/base64-upload-adapter Base64 Upload Adapter} - - Convert inserted images into Base64-encoded strings in the editor - output. Images are stored with other content in the database without - server-side processing. -
    - {@link features/ckbox CKBox - - Premium feature - } - - Securely upload, store, edit, and utilize your images and files in CKEditor 5. Simplify media discovery - in your uploads with the media browser alongside an intuitive Image Editor for image adjustments. - Designed to facilitate organization, CKBox enables integrations, maintains permissions, and uses - Workspaces to categorize files according to the user, document, or customer. It guarantees fast loading - and optimal display of your images across devices through an efficient CDN. Deployable on-premises or as - cloud SaaS. -
    - {@link features/ckfinder CKFinder - - Premium feature - } - - The CKFinder feature lets you insert images and links to files into your - content. CKFinder is a powerful file manager with various image editing - and image upload options. -
    - {@link features/image-upload#implementing-your-own-upload-adapter Custom Upload Adapter} - - Have your own file management solution? Use this adapter to integrate - your preferred software with CKEditor. -
    - {@link features/simple-upload-adapter Simple Upload Adapter} - - Upload images to your server using the XMLHttpRequest API with a - minimal editor configuration. -
    - UploadcarePremium - feature - - Upload, store, transform, optimize, and deliver images, videos, and - documents with this cloud-based file handler. Upload media from local - storage, web cameras, cloud services, and social networks with automated - media optimization through a CDN for responsive image delivery. Popular - features include adaptive image quality, automated image format - conversion, progressive JPEG, and options for preview, resize, stretch, - crop, content-aware crop, and setting fill color. -
    - -{@snippet features/feature-digest} +### Base64 Upload Adapter + +Convert inserted images into Base64-encoded strings in the editor output. Images are stored with other content in the database without server-side processing. + + + Feature page + + +CKBox + +Securely upload, store, edit, and utilize your images and files in CKEditor 5. Simplify media discovery in your uploads with the media browser alongside an intuitive Image Editor for image adjustments. Designed to facilitate organization, CKBox enables integrations, maintains permissions, and uses Workspaces to categorize files according to the user, document, or customer. It guarantees fast loading and optimal display of your images across devices through an efficient CDN. Deployable on-premises or as cloud SaaS. + + + Feature page + + +CKFinder + +The CKFinder feature lets you insert images and links to files into your content. CKFinder is a powerful file manager with various image editing and image upload options. + + + Feature page + + +### Custom Upload Adapter + +Have your own file management solution? Use this adapter to integrate your preferred software with CKEditor. + + + Feature page + + +### Simple Upload Adapter + +Upload images to your server using the XMLHttpRequest API with a minimal editor configuration. + + + Feature page + + +Uploadcare + +Upload, store, transform, optimize, and deliver images, videos, and documents with this cloud-based file handler. Upload media from local storage, web cameras, cloud services, and social networks with automated media optimization through a CDN for responsive image delivery. Popular features include adaptive image quality, automated image format conversion, progressive JPEG, and options for preview, resize, stretch, crop, content-aware crop, and setting fill color. + + + Feature page + diff --git a/docs/features/index.md b/docs/features/index.md index a7671d56dd3..85448ad6cf5 100644 --- a/docs/features/index.md +++ b/docs/features/index.md @@ -8,13 +8,13 @@ meta-description: Explore CKEditor 5's rich text editing features, including me # CKEditor 5 features overview -CKEditor 5 has many features, and the number is constantly growing. You can find the most recent list of features on the left. In addition to working on new features, we also expand and improve the existing ones. Newly added or meaningfully updated feature guides are marked with a NEW icon. Premium features, which require an additional license to work, have a Premium feature icon. +CKEditor 5 has many features, and the number is constantly growing. You can find the most recent list of features on the left. In addition to working on new features, we also expand and improve the existing ones. Newly added or meaningfully updated feature guides are marked with a icon. Premium features, which require an additional license to work, have a icon. - - - Use the **main menu button in the upper-left corner** to navigate through the documentation. - - +
    + + Use the **main menu button in the upper-left corner** to navigate through the documentation. + +
    ## Using CKEditor 5 features diff --git a/docs/features/math-equations.md b/docs/features/math-equations.md index b18e3553880..58c2f821643 100644 --- a/docs/features/math-equations.md +++ b/docs/features/math-equations.md @@ -54,8 +54,8 @@ If you visit a page using MathType with your mobile device, the handwriting inte ## Installation - - ⚠️ **New import paths** + + **New import paths** Starting with {@link updating/update-to-42 version 42.0.0}, we changed the format of import paths. This guide uses the new, shorter format. Refer to the {@link getting-started/legacy-getting-started/legacy-imports Packages in the legacy setup} guide if you use an older version of CKEditor 5. diff --git a/docs/features/read-only.md b/docs/features/read-only.md index c7ef7c4828e..8357d2921b0 100644 --- a/docs/features/read-only.md +++ b/docs/features/read-only.md @@ -13,6 +13,9 @@ CKEditor 5 offers an out-of-the-box read-only mode. You can use it to preve Use the button below to toggle the read-only mode. Some features, like exports or search, are still functional in the read-only mode. Others, like the replace function, are disabled. +
    +Switch to read-only mode + {@snippet features/read-only} @@ -67,6 +70,9 @@ When the button is clicked, the `editor.enableReadOnlyMode()` creates a lock tha Use the demo below to see this code in action. Toggle the read-only mode with the button. You will see that the toolbar disappears in the read-only mode. +
    +Switch to read-only mode + {@snippet features/read-only-hide-toolbar} ## Common API diff --git a/docs/features/spelling-and-grammar-checking.md b/docs/features/spelling-and-grammar-checking.md index 22a7cd8f96e..5ac08b68ccd 100644 --- a/docs/features/spelling-and-grammar-checking.md +++ b/docs/features/spelling-and-grammar-checking.md @@ -75,8 +75,8 @@ The spell and grammar check is compliant with Web Content Accessibility Guidelin ## Installation - - ⚠️ **New import paths** + + **New import paths** Starting with {@link updating/update-to-42 version 42.0.0}, we changed the format of import paths. This guide uses the new, shorter format. Refer to the {@link getting-started/legacy-getting-started/legacy-imports Packages in the legacy setup} guide if you use an older version of CKEditor 5. diff --git a/docs/framework/architecture/intro.md b/docs/framework/architecture/intro.md index c9203b8d376..6f540bda010 100644 --- a/docs/framework/architecture/intro.md +++ b/docs/framework/architecture/intro.md @@ -3,13 +3,12 @@ category: framework-architecture menu-title: Introduction meta-title: Introduction to CKEditor 5 architecture | CKEditor 5 Framework Documentation order: 10 -toc: false feedback-widget: false --- # Introduction to CKEditor 5 architecture -This guide introduces the main pillars of the CKEditor 5 architecture. +This guide introduces the main pillars of the CKEditor 5 architecture. ## Basic CKEditor 5 architecture diff --git a/docs/framework/architecture/plugins.md b/docs/framework/architecture/plugins.md index 640e6701abf..ce9e006ada5 100644 --- a/docs/framework/architecture/plugins.md +++ b/docs/framework/architecture/plugins.md @@ -54,52 +54,30 @@ If a given plugin does not generate any output, the "HTML output" is described a The data used to generate the following tables comes from the package metadata. You can read more about it in the {@link framework/contributing/package-metadata package metadata} guide. diff --git a/docs/framework/contributing/changelog-entries.md b/docs/framework/contributing/changelog-entries.md new file mode 100644 index 00000000000..0a152cedae0 --- /dev/null +++ b/docs/framework/contributing/changelog-entries.md @@ -0,0 +1,294 @@ +--- +category: framework-contributing +meta-title: Changelog entries | CKEditor 5 Framework Documentation +meta-description: Learn how to write structured, user-facing changelog entries for CKEditor 5 using a Markdown-based system designed for clarity, versioning, and long-term maintainability. +order: 60 +modified_at: 2025-07-01 +--- + +# Changelog entries + +CKEditor 5 uses Markdown file-based changelog system inspired by tools like Changesets. Contributions are noted in a human-readable Markdown files stored in the repository. These files describe the nature of the change (bug fix, feature, breaking change, etc.) and are committed alongside the actual code. These entries will be automatically compiled into the final changelog during the release process. + +## How to create a new file + +Create a new Markdown file in the `.changelog/` directory to add a changelog entry. Each file **must** describe **one change only**. You can create as many files as you need to explain the changes. + + + The easiest and preferred way to create a changelog entry is by running: + + ```bash + yarn run nice + ``` + + `nice` stands for **N**ew **I**ndividual **C**hangelog **E**ntry. + + +This command creates a new Markdown file with a file name based on the current date and Git branch name: `YYYYMMDDHHMMSS_{branch-name}.md`. The branch name is automatically slugified (only letters, numbers, `-`, and `_` are allowed). + +_Example: `20250617103000_fix-toolbar-alignment.md`_ + +The file will include a predefined frontmatter template. **You must manually fill in the details** (like `type`, `scope`, `closes`, and the summary of your change). + +## Format of a changelog entry + +Each changelog entry is a Markdown file with a frontmatter section followed by a summary and optional context. Here is a breakdown of all available fields: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldRequired?Description
    type✅ Yes + Type of the change. See the allowed values and their impact in the table below. +
    scope❌ NoAffected package(s), using short names like ckeditor5-core.
    closes❌ NoList of issues this change resolves. Use numbers (123), full references (ckeditor/ckeditor5#123), or full URLs.
    see❌ NoRelated issues that provide context but are not directly resolved by this change. Same format as closes.
    communityCredits❌ NoGitHub usernames of external contributors who should be credited for this change.
    (body)✅ YesAfter the frontmatter, add a short and meaningful summary of the change. Optionally include extended context or rationale.
    + + + **Tip**: Keep the summary clear and user-facing – this is what will appear in the final changelog. + + +The changelog entry format is designed to be both human-friendly and machine-readable. It uses a simple frontmatter structure followed by a short description of the change. Each field in the frontmatter serves a specific purpose, from determining the entry's visibility to linking it with related issues or acknowledging community contributions. + +Using these fields correctly ensures that the changelog remains accurate, meaningful, and consistent across releases. The sections below explain the available fields in more detail and provide guidance on when and how to use them. + +### Allowed values for the `type` field + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeReleaseDescription
    FeatureminorA new feature. Introduces user-facing functionality.
    FixpatchA bug fix. Use also for small improvements that do not qualify as new features.
    OtherpatchEnhancement or refactor. It is not a fix or feature. Example: public API cleanup.
    Major breaking changemajorA change in the integration layer or the plugin development API. See {@link updating/versioning-policy versioning policy} for details.
    Minor breaking changeminorLow-level customizable API layer. See {@link updating/versioning-policy versioning policy} for details.
    + +### Package name (`scope`) + +Changes affect one or more packages. List the package that was most impacted by the change first. + +However, it is possible to skip this part if many packages are affected. This usually indicates a generic change. In this case, having all the packages listed would reduce the readability of the changelog. + +The package name is based on the npm package name, but the `@ckeditor/` prefix is stripped. + +If your change is related to the main package, use `ckeditor5` as the package name. + + + If the commit introduces a breaking change across the entire project (a generic change), you do not need to specify the package name. + + +### Referencing issues + +When creating PRs that address specific issues, use the following messages to indicate them. + +* `Closes` – When the PR resolves an issue. +* `See` – When the PR references an issue but has not resolved it yet. + +Both fields (`closes` and `see`) can contain multiple references, but they must follow the same format: + +* `14724` – A simple issue number. +* `ckeditor/ckeditor5#14724` – A full reference to an issue in the CKEditor 5 repository. +* `https://github.com/ckeditor/ckeditor5/issues/14724` – A full URL to an issue in the CKEditor 5 repository. + +### Giving credit + +When closing a PR submitted by a non-core contributor, add information about the contributor to the changelog entry file using the `communityCredits` field. It should contain a list of GitHub usernames of contributors who should be credited for this change. + +### Description + +Write a concise and meaningful summary of the change. This main message will appear in the public changelog, so keep it clear, user-facing, and relevant. + +Use the `ClassName#methodName()` format when referencing methods. This ensures consistency across all entries. + +**Example:** + +``` +MarkerCollection#has() +``` + +You may include multiple sentences if additional context is helpful. + +### Examples of correct entry formatting + + + Unlike the previous Git-based system, which captured all commit types, including internal changes, the new file-based changelog focuses exclusively on public, user-facing changes, ensuring the final changelog remains clear and relevant to end users. + + +A new feature without any breaking changes. + +```md +--- +type: Feature +scope: + - ckeditor5-ui +closes: + - 1 +--- + +Added support for RTL languages. + +RTL content will now be rendered correctly. +``` + +A generic bug fix for an existing feature that affects many packages (closes two tickets): + +```md +--- +type: Fix +closes: + - 2 + - 3 +--- + +The editor will be great again. +``` + +An improvement that is not backward compatible and sent by a non-core contributor. Public API was changed: + +```md +--- +type: Other +scope: + - ckeditor5-utils +closes: + - 9 +--- + +Extracted the `utils#foo()` to a separate package. +``` + +```md +--- +type: Feature +scope: + - ckeditor5-engine +closes: + - 9 +--- + +Introduced the `engine#foo()` method. +``` + +```md +--- +type: Major breaking change +scope: + - ckeditor5-utils +see: + - 9 +--- + +The `utils#foo()` method was moved to the `engine` package. +``` + +For the entries shown above, the changelog will look like this: + +```md +Changelog +========= + +## [51.0.0](https://github.com/ckeditor/ckeditor5/compare/v50.1.1...v51.0.0) (June 17, 2025) + +### MAJOR BREAKING CHANGES [ℹ️](https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/versioning-policy.html#major-and-minor-breaking-changes) + +* **[utils](https://www.npmjs.com/package/@ckeditor/ckeditor5-utils)**: The `utils#foo()` method was moved to the `engine` package. See [#9](https://github.com/ckeditor/ckeditor5/issues/9). + +### Features + +* **[engine](https://www.npmjs.com/package/@ckeditor/ckeditor5-engine)**: Introduced the `engine#foo()` method. Closes [#9](https://github.com/ckeditor/ckeditor5/issues/9). +* **[ui](https://www.npmjs.com/package/@ckeditor/ckeditor5-ui)**: Added support for RTL languages. Closes [#1](https://github.com/ckeditor/ckeditor5/issues/1). + + RTL content will now be rendered correctly. + +### Bug fixes + +* The editor will be great again. Closes [#2](https://github.com/ckeditor/ckeditor5/issues/2), [#3](https://github.com/ckeditor/ckeditor5/issues/3). + +### Other changes + +* **[utils](https://www.npmjs.com/package/@ckeditor/ckeditor5-utils)**: Extracted the `utils#foo()` to a separate package. Closes [#9](https://github.com/ckeditor/ckeditor5/issues/9). +``` + +### Fixing errors + +If the entry message is wrong, you can fix it by editing the Markdown file in the `.changelog/` directory and preparing a new pull request. + +## Handling pull requests + +When creating a pull request, you may propose a changelog entry (as recommended in the pull request template). + +The reviewer must validate the proposed message and apply necessary changes. It can be done using the GitHub interface (as suggestions). + +As a reviewer, make sure to check the following aspects of the proposed changelog entry and add or correct them if needed: + +* The language and grammar of the message +* The type of the change +* Mentioned issue(s) number +* Breaking changes +* Any additional relevant information + +You must be aware that the message will end up in the changelog and must be understandable in the broad context of the entire editor. It is not for you – it is for other developers. + +When closing a PR, you do not have to copy anything. Pick your merge strategy (for example, "Squash and merge"), and GitHub will handle the rest. diff --git a/docs/framework/contributing/contributing.md b/docs/framework/contributing/contributing.md index a7edcb192e1..35ea4aff560 100644 --- a/docs/framework/contributing/contributing.md +++ b/docs/framework/contributing/contributing.md @@ -83,7 +83,7 @@ Assuming that you would like to propose some changes, these are the steps you sh $ git push my-fork i/GITHUB-ISSUE-NUMBER ``` -1. Go to your forked repository on GitHub. Use the [pull request button](https://help.github.com/articles/about-pull-requests/) and follow the instructions. Make sure to include a merge commit message text matches the {@link framework/contributing/git-commit-message-convention convention} +1. Go to your forked repository on GitHub. Use the [pull request button](https://help.github.com/articles/about-pull-requests/) and follow the instructions. 1. **Let us know about your pull request!** The best way is to comment under the original issue. Some additional things you should keep in mind: diff --git a/docs/framework/contributing/git-commit-message-convention.md b/docs/framework/contributing/git-commit-message-convention.md deleted file mode 100644 index 37c6fe397d0..00000000000 --- a/docs/framework/contributing/git-commit-message-convention.md +++ /dev/null @@ -1,247 +0,0 @@ ---- -category: framework-contributing -meta-title: Git commit message convention | CKEditor 5 Framework Documentation -meta-description: Learn CKEditor 5's Git commit message convention to write clear, structured messages that improve project history and collaboration. -order: 60 -modified_at: 2021-09-07 ---- - -# Git commit message convention - -Every commit made *directly* to the `master` branch must follow the convention below. Based on commits in the `master` branch CKEditor 5 release tools will generate changelog entries for the current release. - - - Commits in the ticket branches are not analyzed for the changelog and do not have to follow any specific convention (other than finishing sentences with periods). For ticket branches, **only merge commits are analyzed**. - - Therefore, this guide is mainly targeted at core team members. However, it may help you understand how to write a suggested commit message when creating a pull request for CKEditor 5. - - -## Convention - -Commit message template: - -``` -Type (package-name): A short sentence about the commit. Closes #XXX. - -Type (another-package-name): If the change affects more than one package, it is possible to put multiple entries at once. Closes #YYY. - -Optional description. - -MAJOR BREAKING CHANGE (package-name): If any breaking changes were done, they need to be listed here. -MINOR BREAKING CHANGE (package-name): Another breaking change if needed. Closes #ZZZ. -``` - -### Commit types - -| Type | Release | Description | Changelog | -| --- | --- | --- | --- | -| Feature | `minor` | A new feature. | Visible | -| Fix | `patch` | A bug fix. Should also be used for enhancements if they do not introduce new features at the same time. | Visible | -| Other | `patch` | An enhancement – when it is neither a bug fix nor a feature. Example: public API refactoring. Use it also if you do not want to admit that it was a bug ;). | Visible | -| Docs | `patch` | Updated documentation. | Hidden | -| Internal | `patch` | Other kinds of internal changes. | Hidden | -| Tests | `patch` | Changes in test files. | Hidden | -| Revert | `patch` | Revert of some commit. | Hidden | -| Release | `patch` | A special type of commit used by the release tools. | Hidden | - -Each commit can contain additional notes that will be inserted into the changelog: - -* `MAJOR BREAKING CHANGE`, -* `MINOR BREAKING CHANGE`. - -If any change contains the `MAJOR BREAKING CHANGE` note, the next release will automatically be marked as `major`. - -For reference on how to identify minor or major breaking changes see the {@link updating/versioning-policy versioning policy guide}. - -Each `MAJOR BREAKING CHANGE` or `MINOR BREAKING CHANGE` note must be followed by the package name. - - - Remember to always specify whether the breaking change is major or minor. If you fail to do so, the system will assume all unspecified breaking changes are major. - - -### Package name - -Most commits are related to one or more packages. Each affected package should be listed in parentheses following the commit type. You should list the package that was the most impacted by the change first. - -It is, however, possible to skip this part if many packages are affected. This usually indicates a generic change. In this case, having all the packages listed would reduce the changelog readability. - -The package name is based on the npm package name but it has the `@ckeditor/ckeditor5-` prefix stripped. - -If your change is related to the main package, use `ckeditor5` as the package name. - - - If the commit introduces a breaking change across the entire project (a generic change), you do not need to specify the package name. - - -### Referencing issues - -When creating PRs that address specific issues, use the following messages to indicate it. Add these in the same line with the merge message: -* `Closes #123` – When the PR closes an issue. -* `Closes #123` (outside the merge message) – When a PR in a public repository closes an issue from a private repository. -* `See #123` – When the PR only references an issue but does not close it yet. -* _No reference_ – when the PR does not reference any issue. - -### Methods name syntax - -All methods mentioned in the Git commit message should use the **#** sign between the class name and the method name. An example of a properly named method: - -``` -MarkerCollection#has() -``` - -### Order of entries - -The proper order of sections for a commit message is as follows: -* Entries that should be added to the changelog. -* Entries that will not be added to the changelog. -* Breaking change notes. - -All entries must be separated with a blank line, otherwise the lines will not be treated as separate entries. - -### Squash commits - -The changelog generator understands squash commits created by GitHub when merging a pull request. - -When using the _"Squash and merge"_ option, ensure the default commit title is not modified. It should contain the pull request title and its number, for example: `Sample pull request (#000)`. The changelog entries should be added as a commit description. They must follow the same rules as merge commits. - -### Examples of correct and incorrect message formatting - -An example of a proper commit message: - -``` -Feature (package-name-1): Message 1. Closes: #123 - -Fix (package-name-2): Message 2. Closes: #456 - -Tests: A change across the entire project. -``` - -An example of an invalid commit message with incorrectly separated lines (the second line will be treated as a part of the first line): - -``` -Feature (package-name-1): Message 1. -Fix (package-name-2): Message 2. -Tests: Message 3. -``` - -An example of an invalid commit message with an incorrect section order (the "internal" message will be treated as a part of the breaking change message): - -``` -Feature (package-name): Message 1. - -MINOR BREAKING CHANGE (package-name): A description. - -Internal: Message 2. -``` - -### Example commits - -A new feature without any breaking changes. - -``` -Feature (ui): Added support for RTL languages. Closes #1. - -RTL content will now be rendered correctly. -``` - -A generic bug fix for an existing feature that affects many packages (closes two tickets): - -``` -Fix: The editor will be great again. Closes #3. Closes #4. -``` - -A commit with updated documentation: - -``` -Docs (link): Updated the README. -``` - -A commit that provides or changes the tests: - -``` -Tests (widget): Introduced missing tests. Closes #5. -``` - -An improvement that is not backward compatible and sent by a non-core contributor. Public API was changed: - -``` -Other (utils): Extracted the `utils#foo()` to a separate package. Closes #9. - -Feature (engine): Introduced the `engine#foo()` method. Closes #9. - -MAJOR BREAKING CHANGE (utils): The `utils#foo()` method was moved to the `engine` package. See #9. -``` - -For the commits shown above the changelog will look like this: - -```md -Changelog -========= - -## [1.0.0](https://github.com/ckeditor/ckeditor5/compare/v1.0.0...v0.0.1) (2017-01-04) - -### MAJOR BREAKING CHANGES [ℹ️](https://ckeditor.com/docs/ckeditor5/latest/support/versioning-policy.html#major-and-minor-breaking-changes) - -* **[utils](http://npmjs.com/package/@ckeditor/ckeditor5-utils)**: The `utils#foo()` method was moved to the `engine` package. See [#9](https://github.com/ckeditor/ckeditor5/issue/9). - -### Features - -* **[engine](http://npmjs.com/package/@ckeditor/ckeditor5-engine)**: Introduced the `engine#foo()` method. Thanks to [@CKEditor](https://github.com/CKEditor). Closes [#9](https://github.com/ckeditor/ckeditor5/issue/9). ([e8cc04f](https://github.com/ckeditor/ckeditor5/commit/e8cc04f)) -* **[ui](http://npmjs.com/package/@ckeditor/ckeditor5-ui)**: Added support for RTL languages. Closes [#1](https://github.com/ckeditor/ckeditor5/issue/1). ([adc59ed](https://github.com/ckeditor/ckeditor5/commit/adc59ed)) - - RTL content will now be rendered correctly. - -### Bug fixes - -* The editor will be great again. Closes [#3](https://github.com/ckeditor/ckeditor5/issue/3). Closes [#4](https://github.com/ckeditor/ckeditor5/issue/4). ([a0b4ce8](https://github.com/ckeditor/ckeditor5/commit/a0b4ce8)) - -### Other changes - -* **[utils](http://npmjs.com/package/@ckeditor/ckeditor5-utils)**: Extracted the `utils#foo()` to a separate package. Thanks to [@CKEditor](https://github.com/CKEditor). ([e8cc04f](https://github.com/ckeditor/ckeditor5/commit/e8cc04f)) -``` - -### Fixing errors - -If the commit message was wrong but it was already too late to fix (for example, already merged into `master`), you can push an empty commit with the correct message straight to `master`: - -``` -git checkout master -git commit --allow-empty # Fix the message in the commit -git push origin master -``` - - - Two commits for the same pull request will require **manual deduplication** during the changelog generation process. To reduce the noise, **avoid this technique for minor errors** like spelling or grammar: changelog entries will be checked and corrected anyway. Use it to add missing `BREAKING CHANGE` entries or fix wrong ticket numbers in `Closes #123` (critical information for integrators). You can also notify the team about the fix. - - -## Handling pull requests - -When creating a pull request, you may (it is recommended in the pull request template) propose a merge commit message. - -The reviewer must validate the proposed message and apply necessary changes. The PR description can be edited. - -Things like: - -* the language and grammar of the message, -* the type of the change, -* mentioned issue(s) number, -* breaking changes, -* and any additional information - -should be checked and added if missing. - -As a reviewer, you must be aware that the message will end up in the changelog and must be understandable in the broad context of the entire editor. It is not for you – it is for other developers. - -When closing a PR, remember to copy the source of the message to the textarea with the merge commit message: - -{@img assets/img/closing-a-pr.gif 998 Screencast how to copy a source version of the suggested commit message when closing a PR.} - -### Giving credit - -When closing a non-core contributor's PR make sure to add information about the contributor to the commit message. For example: - -``` -Feature (ui): Added support for RTL languages. Closes #1. - -Thanks to @someone! -``` diff --git a/docs/framework/development-tools/inspector.md b/docs/framework/development-tools/inspector.md index 56903def2cc..66b2b16adff 100644 --- a/docs/framework/development-tools/inspector.md +++ b/docs/framework/development-tools/inspector.md @@ -86,6 +86,8 @@ Click the "Inspect editor" button below to attach the inspector to the ed {@snippet framework/development-tools/inspector} +Inspect editor + ### Compatibility The inspector works with CKEditor 5 [v12.0.0](https://github.com/ckeditor/ckeditor5/releases/tag/v12.0.0)+. diff --git a/docs/framework/index.md b/docs/framework/index.md index 611799832cb..2b2227a9641 100644 --- a/docs/framework/index.md +++ b/docs/framework/index.md @@ -30,7 +30,7 @@ To sum up: you need to start using the framework as soon as existing builds do n ## Contents of this section -This section of CKEditor 5 documentation provides the following resources accessible from the left-hand menu (or **main menu button in the upper-left corner** on mobile systems): +This section of CKEditor 5 documentation provides the following resources accessible from the left-hand menu (or **main menu button in the upper-left corner** on mobile systems): * Tutorials – A crash course, a basic tutorial and advanced guides for any developers keep on writing their own CKEditor 5 plugins. * Development tools – A set of useful tooling and resources for anyone wanting to develop their editor. diff --git a/docs/getting-started/advanced/content-styles.md b/docs/getting-started/advanced/content-styles.md index 4533ee81a81..1f4f4972649 100644 --- a/docs/getting-started/advanced/content-styles.md +++ b/docs/getting-started/advanced/content-styles.md @@ -8,7 +8,7 @@ order: 30 # (Legacy) Content styles - ⚠️ We changed installation methods and this legacy guide is kept for users' convenience. If you are looking for current CKEditor 5 installation instructions, please refer to the newest version of the {@link getting-started/setup/css Editor and content styles} guide. + We changed installation methods and this legacy guide is kept for users' convenience. If you are looking for current CKEditor 5 installation instructions, please refer to the newest version of the {@link getting-started/setup/css Editor and content styles} guide. Some {@link features/index core editor features} bring additional CSS to control the look of the content they produce. Take, for example, the {@link features/images-overview image feature} that needs special content styles to render images and their captions in the content. Or the {@link module:block-quote/blockquote~BlockQuote block quote} feature that displays quotes in italics with a subtle border on the side. diff --git a/docs/getting-started/advanced/dll-builds-collaboration-features.md b/docs/getting-started/advanced/dll-builds-collaboration-features.md index 7b63773357b..600ea987679 100644 --- a/docs/getting-started/advanced/dll-builds-collaboration-features.md +++ b/docs/getting-started/advanced/dll-builds-collaboration-features.md @@ -9,7 +9,7 @@ modified_at: 2022-02-21 # (Legacy) CKEditor 5 DLL builds for CKEditor 5 Collaboration Features - ⚠️ We changed installation methods and this legacy guide is kept for users' convenience. If you want to learn more about these changes, please refer to the {@link updating/nim-migration/dll-builds Migrating from DLL builds} guide. + We changed installation methods and this legacy guide is kept for users' convenience. If you want to learn more about these changes, please refer to the {@link updating/nim-migration/dll-builds Migrating from DLL builds} guide. This guide discusses using a DLL build together with CKEditor 5 Collaboration Features and is supplemental to the {@link getting-started/advanced/dll-builds CKEditor 5 DLL builds guide}. Make sure to read the {@link getting-started/advanced/dll-builds base guide} first before proceeding. diff --git a/docs/getting-started/advanced/dll-builds.md b/docs/getting-started/advanced/dll-builds.md index c8295297952..95fbcb2a80a 100644 --- a/docs/getting-started/advanced/dll-builds.md +++ b/docs/getting-started/advanced/dll-builds.md @@ -6,12 +6,12 @@ order: 20 modified_at: 2022-02-22 --- -{@snippet installation/advanced/dll-builds} +{@snippet installation/advanced/dll-builds empty} # (Legacy) CKEditor 5 DLL builds - ⚠️ We changed installation methods and this legacy guide is kept for users' convenience. If you want to learn more about these changes, please refer to the {@link updating/nim-migration/dll-builds Migrating from DLL builds} guide. + We changed installation methods and this legacy guide is kept for users' convenience. If you want to learn more about these changes, please refer to the {@link updating/nim-migration/dll-builds Migrating from DLL builds} guide. The purpose of a DLL build is to allow adding plugins to an editor build without having to rebuild (recompile) the build itself. diff --git a/docs/getting-started/integrations-cdn/angular.md b/docs/getting-started/integrations-cdn/angular.md index aab33a36ea2..1f07f17c941 100644 --- a/docs/getting-started/integrations-cdn/angular.md +++ b/docs/getting-started/integrations-cdn/angular.md @@ -8,12 +8,6 @@ order: 30 # Integrating CKEditor 5 with Angular from CDN -

    - - npm version - -

    - Angular is a TypeScript-based, open-source, single-page web application framework. The CKEditor 5 component for Angular supports integrating different editor types. {@snippet getting-started/use-builder} @@ -41,7 +35,7 @@ npm install --save-dev ckeditor5-premium-features # Premium features plugin type In the below example, the `loadCKEditorCloud` helper is used to load the editor code and plugins from CDN. To use CKEditor 5 with CDN, you need to import the function and call it inside the `ngOnInit` lifecycle hook with the `version` provided in the configuration. To use premium plugins, set the `premium` property to `true` and provide your license key in the configuration. For more information about the `loadCKEditorCloud` helper, see the {@link getting-started/setup/loading-cdn-resources Loading CDN resources} guide. -```ts +```angular-ts // app.component.ts import { Component } from '@angular/core'; @@ -93,7 +87,7 @@ In the example above, the `EditorConfig` type is imported from the `https://cdn. Finally, use the `` tag in the template to run the rich text editor. The usage is the same regardless of the plugin configuration. -```html +```angular-html ``` @@ -121,7 +115,7 @@ The {@link getting-started/setup/editor-lifecycle `Editor`} which provides the s The {@link module:core/editor/editorconfig~EditorConfig configuration} of the editor: -```html +```angular-html ``` @@ -129,13 +123,13 @@ The {@link module:core/editor/editorconfig~EditorConfig configuration} of the ed The initial data of the editor. It can be a static value: -```html +```angular-html ``` or a shared parent component's property -```ts +```angular-ts @Component( { // ... } ) @@ -149,7 +143,7 @@ export class MyComponent { } ``` -```html +```angular-html ``` @@ -159,7 +153,7 @@ The tag name of the HTML element on which the rich text editor will be created. The default tag is `
    `. -```html +```angular-html ``` @@ -167,7 +161,7 @@ The default tag is `
    `. Controls the editor's {@link module:core/editor/editor~Editor#isReadOnly read–only} state: -```ts +```angular-ts @Component( { // ... } ) @@ -183,7 +177,7 @@ export class MyComponent { } ``` -```html +```angular-html - diff --git a/packages/ckeditor5-word-count/docs/_snippets/features/word-count-update.html b/packages/ckeditor5-word-count/docs/_snippets/features/word-count-update.html index 66529a9705a..6d4af62bc56 100644 --- a/packages/ckeditor5-word-count/docs/_snippets/features/word-count-update.html +++ b/packages/ckeditor5-word-count/docs/_snippets/features/word-count-update.html @@ -1,80 +1,81 @@

    Post editor with word count

    -

    Tourists frequently admit that Taj Mahal “simply cannot be described with words”.

    +

    Tourists frequently admit that Taj Mahal "simply cannot be described with words".

    - - + + - +
    diff --git a/packages/ckeditor5-word-count/docs/_snippets/features/word-count.html b/packages/ckeditor5-word-count/docs/_snippets/features/word-count.html index c04a85aaf71..8f86816a022 100644 --- a/packages/ckeditor5-word-count/docs/_snippets/features/word-count.html +++ b/packages/ckeditor5-word-count/docs/_snippets/features/word-count.html @@ -1,15 +1,4 @@ -

    Taj Mahal is a mausoleum built in Agra between 1631 and 1648 by Emperor Shah Jahan in the memory of his beloved wife, Mumtaz Mahal, whose body lies there. It took 20,000 workers to complete and the excellence of this building is visible in every brick.

    In 1983, Taj Mahal was appointed UNESCO World Heritage Site for being “the jewel of Muslim art in India and one of the universally admired masterpieces of the world’s heritage”.

    -
    -
    diff --git a/packages/ckeditor5-word-count/docs/api/word-count.md b/packages/ckeditor5-word-count/docs/api/word-count.md index b8c13bb600e..198456ab72a 100644 --- a/packages/ckeditor5-word-count/docs/api/word-count.md +++ b/packages/ckeditor5-word-count/docs/api/word-count.md @@ -4,8 +4,6 @@ category: api-reference # Word count and character count feature for CKEditor 5 -[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-word-count.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-word-count) - This package implements the word count and character count features for CKEditor 5. You can use it to obtain the number of words or characters from the editor. ## Demo diff --git a/packages/ckeditor5-word-count/docs/features/word-count.md b/packages/ckeditor5-word-count/docs/features/word-count.md index 27b25f04bf7..6139427ac4c 100644 --- a/packages/ckeditor5-word-count/docs/features/word-count.md +++ b/packages/ckeditor5-word-count/docs/features/word-count.md @@ -5,7 +5,7 @@ meta-title: Word and character count | CKEditor 5 Documentation meta-description: Track word and character count in CKEditor 5 with the Word Count feature to monitor content length and meet writing requirements. --- -{@snippet features/build-word-count-source} +{@snippet features/build-word-count-source empty} # Word count and character count @@ -17,6 +17,8 @@ Add or remove some content and see how the counter below the editor changes in r {@snippet features/word-count} +
    + This demo presents a limited set of features. Visit the {@link examples/builds/full-featured-editor feature-rich editor example} to see more in action. @@ -47,8 +49,8 @@ ClassicEditor ## Installation - - ⚠️ **New import paths** + + **New import paths** Starting with {@link updating/update-to-42 version 42.0.0}, we changed the format of import paths. This guide uses the new, shorter format. Refer to the {@link getting-started/legacy-getting-started/legacy-imports Packages in the legacy setup} guide if you use an older version of CKEditor 5. diff --git a/scripts/ci/check-unit-tests-for-package.mjs b/scripts/ci/check-unit-tests-for-package.mjs index 0a814689fa3..ab929bc1e69 100644 --- a/scripts/ci/check-unit-tests-for-package.mjs +++ b/scripts/ci/check-unit-tests-for-package.mjs @@ -54,6 +54,7 @@ function runTests( { packageName, checkCoverage, attempts = 3 } ) { 'test', '--reporter=dots', '--production', + '-b ChromeHeadless', `-f ${ shortName }`, checkCoverage ? '--coverage' : null ].filter( Boolean ); diff --git a/scripts/ci/generate-circleci-configuration.mjs b/scripts/ci/generate-circleci-configuration.mjs index ccd1ab5ce77..6f6d86c732e 100755 --- a/scripts/ci/generate-circleci-configuration.mjs +++ b/scripts/ci/generate-circleci-configuration.mjs @@ -42,7 +42,7 @@ const bootstrapCommands = () => ( [ 'checkout_command', 'halt_if_short_flow', 'bootstrap_repository_command', - 'prepare_environment_command' + 'browser-tools/install_chrome' ] ); const prepareCodeCoverageDirectories = () => ( { @@ -120,7 +120,9 @@ const persistToWorkspace = fileName => ( { } ); config.jobs.cke5_tests_framework = { - machine: true, + docker: [ + { image: 'cimg/node:22.12.0-browsers' } + ], steps: [ ...bootstrapCommands(), prepareCodeCoverageDirectories(), @@ -136,7 +138,9 @@ const persistToWorkspace = fileName => ( { // Adding batches to the root `jobs`. featureTestBatches.forEach( ( batch, batchIndex ) => { config.jobs[ featureTestBatchNames[ batchIndex ] ] = { - machine: true, + docker: [ + { image: 'cimg/node:22.12.0-browsers' } + ], steps: [ ...bootstrapCommands(), 'install_newest_emoji', diff --git a/scripts/docs/build-ckeditor-packages.mjs b/scripts/docs/build-ckeditor-packages.mjs index e01baf1fafe..97c4150f4a8 100644 --- a/scripts/docs/build-ckeditor-packages.mjs +++ b/scripts/docs/build-ckeditor-packages.mjs @@ -13,7 +13,8 @@ import { CKEDITOR5_ROOT_PATH, CKEDITOR5_COMMERCIAL_PATH } from '../constants.mjs import generateCKEditor5DocsBuild from './generate-ckeditor5-docs-build.mjs'; buildCKEditorPackages() - .catch( () => { + .catch( error => { + console.error( error ); process.exitCode = 1; } ); diff --git a/scripts/docs/build-docs.mjs b/scripts/docs/build-docs.mjs index a54dfa8b0b4..1a4071174ae 100755 --- a/scripts/docs/build-docs.mjs +++ b/scripts/docs/build-docs.mjs @@ -55,7 +55,7 @@ async function buildDocs() { production: options.production, allowedSnippets: options.snippets }, - // skipApi: options.skipApi, + skipApi: options.skipApi, skipGuides: options.skipGuides, verbose: options.verbose, watch: options.watch, diff --git a/scripts/docs/features-html-output/build-features-html-output.cjs b/scripts/docs/features-html-output/build-features-html-output.cjs index b1f31b2c9e8..641f81ee8f8 100644 --- a/scripts/docs/features-html-output/build-features-html-output.cjs +++ b/scripts/docs/features-html-output/build-features-html-output.cjs @@ -66,18 +66,15 @@ module.exports = function createHtmlOutputMarkup() { return plugin.htmlOutput .map( ( htmlOutput, htmlOutputIndex ) => { const pluginNameCell = htmlOutputIndex === 0 ? - `${ plugin.pluginNameMarkup }` : + `${ plugin.pluginNameMarkup }` : ''; - const classNames = [ - 'html-output', - htmlOutput.isAlternative ? '' : 'html-output-default' - ].filter( className => !!className ).join( ' ' ); + const className = htmlOutput.isAlternative ? '' : 'b-table__cell--default'; return ( '' + pluginNameCell + - `${ htmlOutput.markup }` + + `${ htmlOutput.markup }` + '' ); } ) @@ -93,19 +90,20 @@ module.exports = function createHtmlOutputMarkup() { } = packageMetadata.package; const sourceFileLink = !isExternalPackage && !isThirdPartyPackage ? - `` + + `` + sourceFileMarkup + '' : sourceFileMarkup; return ( - `

    ${ packageName }

    ` + + `

    ${ packageName }

    ` + `

    Source file: ${ sourceFileLink }

    ` + - '' + - '' + + '
    ' + + '' + '' + - '' + - '' + + '' + + '' + '' + '' + '' + @@ -194,7 +192,7 @@ function parseFile( file ) { const sourceFileMarkup = isThirdPartyPackage ? createSourceFileMarkupForThirdPartyPackage( file.path ) : - `@ckeditor/${ packageName }/ckeditor5-metadata.json`; + `@ckeditor/${ packageName }/ckeditor5-metadata.json`; const packageData = { packageName, @@ -223,7 +221,7 @@ function createSourceFileMarkupForThirdPartyPackage( filePath ) { const match = filePath.match( /node_modules\/(.*)/ ); return match ? - `${ match[ 1 ] }` : + `${ match[ 1 ] }` : 'not published yet'; } @@ -242,11 +240,11 @@ function createHtmlOutputMarkupForPackage( packageData, plugins = [] ) { createApiLink( packageData, plugin ) ]; - let pluginNameMarkup = `

    ${ plugin.name }

    `; + let pluginNameMarkup = `

    ${ plugin.name }

    `; for ( const link of links ) { if ( link ) { - pluginNameMarkup += `

    ${ link }

    `; + pluginNameMarkup += `

    ${ link }

    `; } } @@ -255,7 +253,7 @@ function createHtmlOutputMarkupForPackage( packageData, plugins = [] ) { { // This value dictates whether or not the "None" output is considered to be default. isAlternative: true, - markup: '

    None.

    ' + markup: '

    None.

    ' } ]; @@ -292,9 +290,7 @@ function createFeatureLink( packageData, plugin ) { const skipLinkValidation = packageData.isExternalPackage ? 'data-skip-validation' : ''; - const docImg = 'Book'; - - return `${ docImg } Feature guide`; + return `Feature guide`; } /** @@ -319,9 +315,7 @@ function createApiLink( packageData, plugin ) { const skipLinkValidation = packageData.isExternalPackage ? 'data-skip-validation' : ''; - const cogImg = 'Cog'; - - return `${ cogImg } API documentation`; + return `API documentation`; } /** @@ -345,7 +339,7 @@ function createHtmlOutputMarkupForPlugin( htmlOutput ) { return ( output + separators.prefix + - `class="${ parsedClasses }"` + + `class="${ parsedClasses }"` + separators.suffix ); }; @@ -362,7 +356,7 @@ function createHtmlOutputMarkupForPlugin( htmlOutput ) { return ( output + separators.prefix + - `style="${ parsedStyles }"` + + `style="${ parsedStyles }"` + separators.suffix ); }; @@ -373,7 +367,6 @@ function createHtmlOutputMarkupForPlugin( htmlOutput ) { } const parsedAttributes = toArray( attributes ) - .map( wrapBy( { prefix: '', suffix: '' } ) ) .map( wrapBy( { suffix: '="*"' } ) ) .map( wrapBy( { prefix: separators.prefix, suffix: separators.suffix } ) ) .join( '' ); @@ -396,32 +389,32 @@ function createHtmlOutputMarkupForPlugin( htmlOutput ) { const elements = entry.elements ? toArray( entry.elements ) - .map( wrapBy( { prefix: '', suffix: '' } ) ) .map( wrapBy( { suffix: separators.suffix } ) ) .map( appendClasses( entry.classes, separators ) ) .map( appendStyles( entry.styles, separators ) ) .map( appendAttributes( entry.attributes, separators ) ) .map( wrapBy( { prefix: '<', suffix: '>' } ) ) - .map( wrapBy( { prefix: '', suffix: '' } ) ) + .map( wrapBy( { prefix: '', suffix: '' } ) ) .join( '' ) : ''; const others = entry.implements ? - `

    HTML element may contain classes, styles or attributes, that are created by other plugins, which alter the ${ - toArray( entry.implements ) - .map( wrapBy( { prefix: '<', suffix: '>' } ) ) - .map( wrapBy( { prefix: '', suffix: '' } ) ) - .join( ', ' ) - } element.

    ` : + `

    + HTML element may contain classes, styles or attributes, that are created by other plugins, which alter the ${ + toArray( entry.implements ) + .map( wrapBy( { prefix: '<', suffix: '>' } ) ) + .map( wrapBy( { prefix: '', suffix: '' } ) ) + .join( ', ' ) + } element.

    ` : ''; const comment = entry._comment ? - `

    ${ + `

    ${ entry._comment .replace( '<', '<' ) .replace( '>', '>' ) - .replace( /`(.*?)`/g, '$1' ) - .replace( /\[(.*?)\]\((.*?)\)/g, '$1' ) + .replace( /`(.*?)`/g, '$1' ) + .replace( /\[(.*?)\]\((.*?)\)/g, '$1' ) }

    ` : ''; diff --git a/scripts/docs/snippetadapter.mjs b/scripts/docs/snippetadapter.mjs index dd88aa03bbe..9a5f2cef23f 100644 --- a/scripts/docs/snippetadapter.mjs +++ b/scripts/docs/snippetadapter.mjs @@ -156,6 +156,11 @@ async function buildSnippets( snippets, paths, constants, imports ) { async function buildDocuments( snippets, paths, constants, imports, getSnippetPlaceholder ) { const getStyle = href => ``; const getScript = src => ``; + const getLayeredStyles = ( layer, hrefs ) => + ''; + const documents = {}; // TODO: Use `Object.groupBy` instead, when we migrate to Node 22. @@ -164,17 +169,23 @@ async function buildDocuments( snippets, paths, constants, imports, getSnippetPl documents[ snippet.destinationPath ].push( snippet ); } + // Style paths for preloading and layered imports + const editorStylePaths = [ + '%BASE_PATH%/assets/ckeditor5/ckeditor5.css', + '%BASE_PATH%/assets/ckeditor5-premium-features/ckeditor5-premium-features.css', + '%BASE_PATH%/assets/global.css' + ]; + // Gather global tags added to each document that do not require relative paths. const globalTags = [ + ...editorStylePaths.map( href => `` ), ``, + '', + '', ``, '', '', - getStyle( '%BASE_PATH%/assets/ckeditor5/ckeditor5.css' ), - getStyle( '%BASE_PATH%/assets/ckeditor5-premium-features/ckeditor5-premium-features.css' ), - getStyle( '%BASE_PATH%/assets/global.css' ), - '', - '' + getLayeredStyles( 'editor', editorStylePaths ) ]; // Iterate over each document and replace placeholders with the actual content. @@ -187,10 +198,11 @@ async function buildDocuments( snippets, paths, constants, imports, getSnippetPl // Iterate over each snippet in the document and replace placeholders with the actual content. for ( const snippet of documentSnippets ) { const data = await readFile( snippet.snippetSources.html, { encoding: 'utf-8' } ); + const snippetSizeCssClass = snippet.snippetSize ? `live-snippet--${ snippet.snippetSize }` : ''; documentContent = documentContent.replace( getSnippetPlaceholder( snippet.snippetName ), - () => `
    ${ data }
    ` + () => `
    ${ data }
    ` ); if ( await fileExists( upath.join( snippet.outputPath, snippet.snippetName, 'snippet.js' ) ) ) { diff --git a/scripts/release/changelog.mjs b/scripts/release/preparechangelog.mjs similarity index 55% rename from scripts/release/changelog.mjs rename to scripts/release/preparechangelog.mjs index 7b6c575fa1e..b806c21b685 100644 --- a/scripts/release/changelog.mjs +++ b/scripts/release/preparechangelog.mjs @@ -5,24 +5,33 @@ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ +import { styleText } from 'util'; import fs from 'fs'; -import { generateChangelogForMonoRepository } from '@ckeditor/ckeditor5-dev-release-tools'; +import { generateChangelogForMonoRepository } from '@ckeditor/ckeditor5-dev-changelog'; +import { CKEDITOR5_COMMERCIAL_PATH } from '../constants.mjs'; import getChangelogOptions from './utils/getchangelogoptions.mjs'; import parseArguments from './utils/parsearguments.mjs'; -import { CKEDITOR5_COMMERCIAL_PATH } from '../constants.mjs'; const cliArguments = parseArguments( process.argv.slice( 2 ) ); +const changelogOptions = getChangelogOptions( cliArguments ); if ( !fs.existsSync( CKEDITOR5_COMMERCIAL_PATH ) ) { - throw new Error( `The script assumes that the directory "${ CKEDITOR5_COMMERCIAL_PATH }" exists.` ); -} + const warning = styleText( + 'yellow', + 'The generated changelog misses the Commercial entries due to the missing CKEditor 5 Commercial repository.' + ); -const changelogOptions = getChangelogOptions( cliArguments ); + console.log( `\n${ warning }\n` ); + + // Filter out the CKEditor 5 Commercial repository from the changelog options. + changelogOptions.externalRepositories = changelogOptions.externalRepositories.filter( ( { cwd } ) => { + return cwd !== CKEDITOR5_COMMERCIAL_PATH; + } ); +} generateChangelogForMonoRepository( changelogOptions ) - .then( () => { - console.log( 'Done!' ); - } ) - .catch( err => { - console.error( err.stack ); + .then( maybeChangelog => { + if ( maybeChangelog ) { + console.log( maybeChangelog ); + } } ); diff --git a/scripts/release/utils/getchangelogoptions.mjs b/scripts/release/utils/getchangelogoptions.mjs index 9dd662b287a..619bb91ba5b 100644 --- a/scripts/release/utils/getchangelogoptions.mjs +++ b/scripts/release/utils/getchangelogoptions.mjs @@ -3,52 +3,48 @@ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ -import { format } from 'date-fns'; import { PACKAGES_DIRECTORY } from './constants.mjs'; import { CKEDITOR5_COMMERCIAL_PATH, CKEDITOR5_ROOT_PATH } from '../../constants.mjs'; export default function getChangelogOptions( cliArguments ) { const changelogOptions = { cwd: CKEDITOR5_ROOT_PATH, - packages: PACKAGES_DIRECTORY, - releaseBranch: cliArguments.branch, - formatDate: now => { - return format( now, 'LLLL d, yyyy' ); - }, + packagesDirectory: PACKAGES_DIRECTORY, transformScope: name => { - if ( name === 'ckeditor5' ) { - return 'https://www.npmjs.com/package/ckeditor5'; - } - - if ( name === 'ckeditor5-collaboration' ) { - return 'https://www.npmjs.com/package/ckeditor5-collaboration'; - } - - if ( name === 'ckeditor5-premium-feature' || name === 'premium-feature' ) { - return 'https://www.npmjs.com/package/ckeditor5-premium-feature'; - } - - if ( name === 'editor-*' ) { - return 'https://www.npmjs.com/search?q=keywords%3Ackeditor5-editor%20maintainer%3Ackeditor'; + const noScopedPackages = [ + 'ckeditor5', + 'ckeditor5-collaboration', + 'ckeditor5-premium-feature' + ]; + + if ( noScopedPackages.includes( name ) ) { + return { + displayName: name, + npmUrl: 'https://www.npmjs.com/package/' + name + }; } - return 'https://www.npmjs.com/package/@ckeditor/ckeditor5-' + name; + return { + displayName: name.replace( /^ckeditor5-/, '' ), + npmUrl: 'https://www.npmjs.com/package/@ckeditor/' + name + }; }, + externalRepositories: [ { cwd: CKEDITOR5_COMMERCIAL_PATH, - packages: PACKAGES_DIRECTORY, - skipLinks: true + packagesDirectory: PACKAGES_DIRECTORY, + shouldSkipLinks: true } ] }; - if ( !cliArguments.external ) { - changelogOptions.externalRepositories = []; + if ( cliArguments.date ) { + changelogOptions.date = cliArguments.date; } - if ( cliArguments.from ) { - changelogOptions.from = cliArguments.from; + if ( cliArguments.dryRun ) { + changelogOptions.disableFilesystemOperations = cliArguments.dryRun; } return changelogOptions; diff --git a/scripts/release/utils/parsearguments.mjs b/scripts/release/utils/parsearguments.mjs index 012cc62a36c..9cd4edd3231 100644 --- a/scripts/release/utils/parsearguments.mjs +++ b/scripts/release/utils/parsearguments.mjs @@ -21,7 +21,8 @@ export default function parseArguments( cliArguments ) { 'verbose', 'compile-only', 'ci', - 'external' + 'external', + 'dry-run' ], number: [ @@ -30,7 +31,7 @@ export default function parseArguments( cliArguments ) { string: [ 'branch', - 'from', + 'date', 'npm-tag', 'packages' ], @@ -47,7 +48,8 @@ export default function parseArguments( cliArguments ) { 'npm-tag': 'staging', verbose: false, ci: false, - external: true + external: true, + 'dry-run': false } }; @@ -61,7 +63,8 @@ export default function parseArguments( cliArguments ) { 'npm-tag', 'compile-only', 'nightly-alpha', - 'nightly-next' + 'nightly-next', + 'dry-run' ] ); if ( options.nightly ) { @@ -97,19 +100,21 @@ export default function parseArguments( cliArguments ) { * * @property {Boolean} external * - * @property {Boolean} [compileOnly=false] + * @property {Boolean} dryRun=false + * + * @property {Boolean} compileOnly=false * * @property {Number} concurrency * - * @property {String} [from] + * @property {String} branch='release' * - * @property {String} [branch='release'] + * @property {String} npmTag='staging'|'nightly'|'alpha'|'internal' * - * @property {String} [npmTag='staging'|'nightly'] + * @property {Array.|null} packages=null * - * @property {Array.|null} packages + * @property {Boolean} verbose=false * - * @property {Boolean} [verbose=false] + * @property {Boolean} ci=false * - * @property {Boolean} [ci=false] + * @property {String} [date] */ diff --git a/scripts/vale/styles/Vocab/Docs/accept.txt b/scripts/vale/styles/Vocab/Docs/accept.txt index 2f29b4a598f..fb5b10d3c8f 100755 --- a/scripts/vale/styles/Vocab/Docs/accept.txt +++ b/scripts/vale/styles/Vocab/Docs/accept.txt @@ -21,6 +21,7 @@ breakpoint Browserify bulletedList Chai +[Cc]hangesets CKBox ckbox CKEditor @@ -53,6 +54,7 @@ exportPdf exportWord [Ff]ocusable formatter +frontmatter Gantt [Gg]etter global diff --git a/scripts/web-crawler/index.mjs b/scripts/web-crawler/index.mjs index cb0a13d1cec..8c3ba0d8632 100644 --- a/scripts/web-crawler/index.mjs +++ b/scripts/web-crawler/index.mjs @@ -6,7 +6,7 @@ */ import minimist from 'minimist'; -import { DEFAULT_CONCURRENCY, runCrawler, toArray, isUrlValid } from '@ckeditor/ckeditor5-dev-web-crawler'; +import { DEFAULT_CONCURRENCY, DEFAULT_TIMEOUT, runCrawler, toArray, isUrlValid } from '@ckeditor/ckeditor5-dev-web-crawler'; const options = parseArguments( process.argv.slice( 2 ) ); @@ -31,7 +31,8 @@ function parseArguments( args ) { 'url', 'depth', 'exclusions', - 'concurrency' + 'concurrency', + 'timeout' ], boolean: [ @@ -44,7 +45,8 @@ function parseArguments( args ) { u: 'url', d: 'depth', e: 'exclusions', - c: 'concurrency' + c: 'concurrency', + t: 'timeout' }, default: { @@ -63,13 +65,15 @@ function parseArguments( args ) { '-e', '/ckfinder/', '-e', '/api/', '-e', '/assets/', - '-c', DEFAULT_CONCURRENCY + '-c', DEFAULT_CONCURRENCY, + '-t', DEFAULT_TIMEOUT ], config ); const defaultOptionsForManual = minimist( [ '-u', 'http://localhost:8125/', '-d', 1, - '-c', DEFAULT_CONCURRENCY + '-c', DEFAULT_CONCURRENCY, + '-t', DEFAULT_TIMEOUT * 2 ], config ); const options = {}; @@ -94,6 +98,7 @@ function parseArguments( args ) { url: options.url, depth: options.depth ? Number( options.depth ) : Infinity, exclusions: options.exclusions ? toArray( options.exclusions ).filter( exclusion => exclusion.length > 0 ) : [], + timeout: options.timeout ? Number( options.timeout ) : DEFAULT_TIMEOUT, concurrency: options.concurrency ? Number( options.concurrency ) : 1, silent: options.silent };
    PluginHTML outputPluginHTML output