diff --git a/README.md b/README.md index b99a4e2a01c..f3adaf7ee73 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ The following CKEditor 5 Builds are currently available: * [Classic editor](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#classic-editor) * [Inline editor](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#inline-editor) * [Balloon editor](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#balloon-editor) +* [Balloon block editor](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#balloon-block-editor) * [Document editor](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#document-editor) #### Example @@ -283,6 +284,18 @@ See CKEditor 5 release blog posts [on the CKEditor blog](https://ckeditor.com/bl + + + @ckeditor/ckeditor5-build-balloon-block + + + @ckeditor/ckeditor5-build-balloon-block npm package badge + + + The balloon editor with a block toolbar (Slack–like) build. + + + @ckeditor/ckeditor5-build-decoupled-document diff --git a/docs/_snippets/examples/balloon-block-editor.html b/docs/_snippets/examples/balloon-block-editor.html new file mode 100644 index 00000000000..a7f1c887d8d --- /dev/null +++ b/docs/_snippets/examples/balloon-block-editor.html @@ -0,0 +1,37 @@ +
+

Walking the capitals of Europe: Warsaw

+ +
+ +
+ +

If you enjoyed my previous articles in which we discussed wandering around Copenhagen and Vilnius, you’ll definitely love exploring Warsaw.

+ +

Time to put comfy sandals on!

+ +

Best time to visit the city is July and August, when it’s cool enough to not break a sweat and hot enough to enjoy summer. The city which has quite a combination of both old and modern textures is located by the river of Vistula.

+ +

The historic Old Town, which was reconstructed after the World War II, with its late 18th century characteristics, is a must-see. You can start your walk from the Nowy Świat Street which will take you straight to the Old Town.

+ +

Then you can go to the Powiśle area and take a walk on the newly renovated promenade on the riverfront. There are also lots of cafes, bars and restaurants where you can shake off the exhaustion of the day. On Sundays, there are many parks where you can enjoy nature or listen to pianists from around the world playing Chopin.

+ +

For museum lovers, you can add these to your list:

+ + + +

Next destination

+ +

We will go to Berlin and have a night's walk in the city that never sleeps! Make sure you subscribe to our newsletter!

+
+ + diff --git a/docs/_snippets/examples/balloon-block-editor.js b/docs/_snippets/examples/balloon-block-editor.js new file mode 100644 index 00000000000..4d6f8282503 --- /dev/null +++ b/docs/_snippets/examples/balloon-block-editor.js @@ -0,0 +1,21 @@ +/** + * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +/* globals console, window, document */ + +import BalloonEditor from '@ckeditor/ckeditor5-build-balloon-block/src/ckeditor'; + +import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config'; + +BalloonEditor + .create( document.querySelector( '#snippet-balloon-block-editor' ), { + cloudServices: CS_CONFIG + } ) + .then( editor => { + window.editor = editor; + } ) + .catch( err => { + console.error( err ); + } ); diff --git a/docs/assets/img/editor-balloon-block.png b/docs/assets/img/editor-balloon-block.png new file mode 100644 index 00000000000..cbbcabcc539 Binary files /dev/null and b/docs/assets/img/editor-balloon-block.png differ diff --git a/docs/builds/guides/integration/installation.md b/docs/builds/guides/integration/installation.md index 70ad99cfe35..90b8e874f12 100644 --- a/docs/builds/guides/integration/installation.md +++ b/docs/builds/guides/integration/installation.md @@ -37,6 +37,8 @@ npm install --save @ckeditor/ckeditor5-build-inline # Or: npm install --save @ckeditor/ckeditor5-build-balloon # Or: +npm install --save @ckeditor/ckeditor5-build-balloon-block +# Or: npm install --save @ckeditor/ckeditor5-build-decoupled-document ``` diff --git a/docs/builds/guides/overview.md b/docs/builds/guides/overview.md index 9cd24ab2eb1..db47f9fb56f 100644 --- a/docs/builds/guides/overview.md +++ b/docs/builds/guides/overview.md @@ -56,6 +56,14 @@ Balloon editor is very similar to inline editor. The difference between them is To try it out online, check the {@link examples/builds/balloon-editor balloon editor example}. Jump to {@link builds/guides/quick-start#balloon-editor Quick start} to start using it. +### Balloon block editor + +Balloon block is essentially the [balloon editor](#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 an access to additional, block–level editing features. + +{@img assets/img/editor-balloon-block.png 813 Screenshot of a balloon block toolbar editor.} + +To try it out online, check the {@link examples/builds/balloon-block-editor balloon block editor example}. Jump to {@link builds/guides/quick-start#balloon-block-editor Quick start} to start using it. + ### Document editor The document editor is focused on rich text editing experience similar to the native word processors. It works best for creating documents which are usually later printed or exported to PDF files. diff --git a/docs/builds/guides/quick-start.md b/docs/builds/guides/quick-start.md index 87f9a35fa54..2ac05352488 100644 --- a/docs/builds/guides/quick-start.md +++ b/docs/builds/guides/quick-start.md @@ -173,6 +173,60 @@ Call the {@link module:editor-balloon/ballooneditor~BalloonEditor#create `Balloo ``` +## Balloon block editor + +In your HTML page add an element that CKEditor should make editable: + +```html +
+``` + +Load the balloon block editor build (here [CDN](https://cdn.ckeditor.com/) location is used): + +```html + +``` + +Call the {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`} method. + +```html + +``` + +**Note:** You can configure the block toolbar items using the {@link module:core/editor/editorconfig~EditorConfig#blockToolbar `config.blockToolbar`} option. + +### Example + +```html + + + + + CKEditor 5 – Balloon block editor + + + +

Balloon editor

+
+

This is some sample content.

+
+ + + +``` + ## Document editor Load the document editor build (here [CDN](https://cdn.ckeditor.com/) location is used): diff --git a/docs/examples/builds/balloon-block-editor.md b/docs/examples/builds/balloon-block-editor.md new file mode 100644 index 00000000000..96494fb3250 --- /dev/null +++ b/docs/examples/builds/balloon-block-editor.md @@ -0,0 +1,13 @@ +--- +category: examples-builds +order: 30 +--- + +# Balloon block editor + +{@link builds/guides/overview#balloon-block-editor Balloon block editor} lets you create your content directly in its target location with the help of two toolbars: + +* a balloon toolbar that appears next to the selected editable document element (offering inline content formatting tools), +* a {@link features/blocktoolbar block toolbar} accessible using a button attached to the editable content area and following the selection in the document (bringing additional block formatting tools). + +{@snippet examples/balloon-block-editor}