diff --git a/packages/ckeditor5-admonition/docs/_snippets/features/block-quote-source.html b/packages/ckeditor5-admonition/docs/_snippets/features/block-quote-source.html deleted file mode 100644 index 7c726c059..000000000 --- a/packages/ckeditor5-admonition/docs/_snippets/features/block-quote-source.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/packages/ckeditor5-admonition/docs/_snippets/features/block-quote-source.js b/packages/ckeditor5-admonition/docs/_snippets/features/block-quote-source.js deleted file mode 100644 index eb60d3bbe..000000000 --- a/packages/ckeditor5-admonition/docs/_snippets/features/block-quote-source.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license - */ - -/* globals window */ - -import { CKBox, CKBoxImageEdit } from '@ckeditor/ckeditor5-ckbox'; -import { PictureEditing, ImageInsert, ImageResize, AutoImage } from '@ckeditor/ckeditor5-image'; -import { LinkImage } from '@ckeditor/ckeditor5-link'; -import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config.js'; -import { TOKEN_URL } from '@ckeditor/ckeditor5-ckbox/tests/_utils/ckbox-config.js'; - -// Umberto combines all `packages/*/docs` into the `docs/` directory. The import path must be valid after merging all directories. -import ClassicEditor from '../build-classic.js'; - -ClassicEditor.defaultConfig = { - plugins: ClassicEditor.builtinPlugins.concat( [ - PictureEditing, - ImageResize, - ImageInsert, - AutoImage, - LinkImage, - CKBox, - CKBoxImageEdit - ] ), - cloudServices: CS_CONFIG, - toolbar: { - items: [ - 'undo', 'redo', '|', 'heading', - '|', 'bold', 'italic', - '|', 'link', 'insertImage', 'insertTable', 'blockQuote', 'mediaEmbed', - '|', 'bulletedList', 'numberedList', 'outdent', 'indent' - ] - }, - ui: { - viewportOffset: { - top: window.getViewportTopOffsetConfig() - } - }, - ckbox: { - tokenUrl: TOKEN_URL, - allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ], - forceDemoLabel: true - }, - image: { - toolbar: [ 'toggleImageCaption', 'imageTextAlternative', 'ckboxImageEdit' ] - } -}; - -window.ClassicEditor = ClassicEditor; diff --git a/packages/ckeditor5-admonition/docs/_snippets/features/block-quote.html b/packages/ckeditor5-admonition/docs/_snippets/features/block-quote.html deleted file mode 100644 index 70663c3e8..000000000 --- a/packages/ckeditor5-admonition/docs/_snippets/features/block-quote.html +++ /dev/null @@ -1,27 +0,0 @@ -
-

The Famous Einstein Quote that never was

- -

You might have come across the following quote in the past few years:

- -
-

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.

- -

Albert Einstein

-
- -

It has been most popular on Facebook and other social networks, where people share it aplenty. No wonder: it is neat, it sounds smart, and, let’s be frank, Albert is one hell of a figure!

- -

The truth is not as neat, though. And mindlessly forwarding the quote isn’t exactly smart. That’s because Einstein never said that. The quote comes from the 2004 book The Rhythm of Life: Living Every Day with Passion and Purpose by Mathew Kelly, published almost 50 years after Albert’s death in 1955.

- -

Kelly was most likely inspired by an essay by Amos E. Dolbear of Tufts titled “An Educational Allegory,” describing animals educated to work on their weakest features instead of their strongest ones. So an eagle was made to run, a penguin was forced to fly, and so on. There is also the 1903 “Jungle School Boards” fable from an Illinois newspaper. It tells a story of a monkey, a kangaroo, and an elephant who cannot agree on the curriculum for their animal school — should all the little animals be taught tree-climbing, jumping, or looking wise? 

- -

In the late 1940s, something that appears to be an amalgam of the two was published and later reprinted with various changes in the 1960s. The idea evolved for decades and got mixed up with a few other quotes about being a genius originating back in the 1970s. Finally, Kelly wrote in his 2004 book:

- -
-

Albert Einstein wrote, “Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.” The question I have for you at this point of our journey together is, “What is your genius?”

-
- -

Why he attributed this to Albert Einstein remains unclear. The fact is, the quote got popular. But, apparently, not everyone is a genius when it comes to fact-checking and sources.

- -
- diff --git a/packages/ckeditor5-admonition/docs/_snippets/features/block-quote.js b/packages/ckeditor5-admonition/docs/_snippets/features/block-quote.js deleted file mode 100644 index 2b81ac2da..000000000 --- a/packages/ckeditor5-admonition/docs/_snippets/features/block-quote.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license - */ - -/* globals ClassicEditor, window, document, console */ - -ClassicEditor - .create( document.querySelector( '#snippet-block-quote' ) ) - .then( editor => { - window.editor = editor; - window.attachTourBalloon( { - target: window.findToolbarItem( editor.ui.view.toolbar, item => item.label && item.label === 'Block quote' ), - text: 'Click to insert a block quote.', - editor - } ); - } ) - .catch( err => { - console.error( err.stack ); - } ); diff --git a/packages/ckeditor5-admonition/docs/_snippets/features/nested-block-quote.html b/packages/ckeditor5-admonition/docs/_snippets/features/nested-block-quote.html deleted file mode 100644 index cf0edea58..000000000 --- a/packages/ckeditor5-admonition/docs/_snippets/features/nested-block-quote.html +++ /dev/null @@ -1,26 +0,0 @@ -
-

Re: Material usage information

- -
-
-

Tom,

- -

This is just a reminder that we need the data for our Friday meeting with the external subcontractors. Can you please let me know if all the reports are ready?

- -

Zoe

-
- -

Hi Zoe,

- -

The reports are coming in, but the Q3 data is still missing. As far as I can tell, Shizuoka is behind the schedule with the final summary, and the Expansion Department has not released its numbers yet. I will reach out to both and will keep you informed on that topic by noon tomorrow.

- -

Tom

-
- -

Please do so, this is getting urgent. Contact Haleema from ED directly. Also, check with Shizuoka. This is very much unlike him to leave such an important matter for the last moment.

- -

Hope to have this ready for review at the 2 p.m. board meeting provided you can manage to prepare a summary and have the full data by Thursday morning at the latest.

- -

Zoe

- -
diff --git a/packages/ckeditor5-admonition/docs/_snippets/features/nested-block-quote.js b/packages/ckeditor5-admonition/docs/_snippets/features/nested-block-quote.js deleted file mode 100644 index 892ff9db5..000000000 --- a/packages/ckeditor5-admonition/docs/_snippets/features/nested-block-quote.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. - * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license - */ - -/* globals ClassicEditor, window, document, console */ - -ClassicEditor - .create( document.querySelector( '#snippet-nested-block-quote' ) ) - .then( editor => { - window.editor2 = editor; - } ) - .catch( err => { - console.error( err.stack ); - } ); diff --git a/packages/ckeditor5-admonition/docs/api/block-quote.md b/packages/ckeditor5-admonition/docs/api/block-quote.md deleted file mode 100644 index d60ea8e16..000000000 --- a/packages/ckeditor5-admonition/docs/api/block-quote.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -category: api-reference ---- - -# CKEditor 5 block quote feature - -[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-block-quote.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-block-quote) - -This package implements block quote support for CKEditor 5. - -## Demo - -Check out the {@link features/block-quote#demo demo in the block quote feature guide}. - -## Documentation - -See the {@link features/block-quote block quote feature guide} and the {@link module:block-quote/blockquote~BlockQuote} plugin documentation. - -## Installation - -This package is part of our open-source aggregate package. - -```bash -npm install ckeditor5 -``` - -## Contribute - -The source code of this package is available on GitHub in [https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-block-quote](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-block-quote). - -## External links - -* [`@ckeditor/ckeditor5-block-quote` on npm](https://www.npmjs.com/package/@ckeditor/ckeditor5-block-quote) -* [`ckeditor/ckeditor5-block-quote` on GitHub](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-block-quote) -* [Issue tracker](https://github.com/ckeditor/ckeditor5/issues) -* [Changelog](https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md) diff --git a/packages/ckeditor5-admonition/docs/features/block-quote.md b/packages/ckeditor5-admonition/docs/features/block-quote.md deleted file mode 100644 index 3af0af0ca..000000000 --- a/packages/ckeditor5-admonition/docs/features/block-quote.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -category: features -menu-title: Block quote -meta-title: Block quote | CKEditor 5 Documentation ---- -{@snippet features/block-quote-source} - -# 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. - -## Demo - -Use the block quote toolbar button {@icon @ckeditor/ckeditor5-core/theme/icons/quote.svg Insert block quote} in the editor below to see the feature in action. You can also type `>` followed by a space before the quotation to format it on the go thanks to the {@link features/autoformat autoformatting} feature. - -{@snippet features/block-quote} - - - 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. - - -## Nested block quotes - -Starting from version 27.1.0, CKEditor 5 will properly display a block quote nested in another block quote. This sort of structure is indispensable in email editors or discussion forums. The ability to cite previous messages and preserve a correct quotation structure is often crucial to maintain the flow of communication. Nested block quotes may also prove useful for scientific or academic papers, but articles citing sources and referring to previous writing would often use it, too. - -Support for nested block quotes is provided as backward compatibility for loading pre-existing content, for example created in CKEditor 4. Additionally, pasting content with nested block quotes is supported. You can also nest a block quote in another block quote using the {@link features/drag-drop drag and drop} mechanism – just select an existing block quote and drag it into another. - -{@snippet features/nested-block-quote} - - - If you would want to block the possibility to nest block quotes in your editor, refer to the {@link features/block-quote#disallow-nesting-block-quotes Disallow nesting block quotes} section to learn how to disable this functionality. - - -## Installation - - - ⚠️ **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. - - -After {@link getting-started/quick-start installing the editor}, add the feature to your plugin list and toolbar configuration: - -```js -import { ClassicEditor, BlockQuote } from 'ckeditor5'; - -ClassicEditor - .create( document.querySelector( '#editor' ), { - plugins: [ BlockQuote, /* ... */ ], - toolbar: [ 'blockQuote', /* ... */ ] - } ) - .then( /* ... */ ) - .catch( /* ... */ ); -``` - -## Configuration - -### Disallow nesting block quotes - -By default, the editor supports inserting a block quote into another block quote. - -To disallow nesting block quotes, you need to register an additional schema rule. It needs to be added before the data is loaded into the editor, hence it is best to implement it as a plugin: - -```js -function DisallowNestingBlockQuotes( editor ) { - editor.model.schema.addChildCheck( ( context, childDefinition ) => { - if ( context.endsWith( 'blockQuote' ) && childDefinition.name == 'blockQuote' ) { - return false; - } - } ); -} - -// Pass it via config.extraPlugins or config.plugins: - -ClassicEditor - .create( document.querySelector( '#editor' ), { - extraPlugins: [ DisallowNestingBlockQuotes ], - - // The rest of the configuration. - // ... - } ) - .then( /* ... */ ) - .catch( /* ... */ ); -``` - - - Check the {@link tutorials/crash-course/editor step-by-step tutorial} if you need more information about the technical side of this solution. - - -## Related features - -Here are some other CKEditor 5 features that you can use similarly to the block quote plugin to structure your text better: - -* {@link features/indent Block indentation} – Set indentation for text blocks such as paragraphs or lists. -* {@link features/code-blocks Code block} – Insert longer, multiline code listings. -* {@link features/text-alignment Text alignment} – Align your content left, right, center it, or justify. -* {@link features/autoformat Autoformatting} – Add formatting elements (such as block quotes) as you type with Markdown code. - -## Common API - -The {@link module:block-quote/blockquote~BlockQuote} plugin registers: - -* the `'blockQuote'` UI button component implemented by the {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}, -* the `'blockQuote'` command implemented by the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}. - -You can execute the command using the {@link module:core/editor/editor~Editor#execute `editor.execute()`} method: - -```js -// Applies block quote to the selected content. -editor.execute( 'blockQuote' ); -``` - - - We recommend using the official {@link framework/development-tools/inspector CKEditor 5 inspector} for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more. - - -## Contribute - -The source code of the feature is available on GitHub at [https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-block-quote](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-block-quote).