Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/_snippets/build-balloon-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
import {
BalloonEditor as BalloonEditorBase,
Essentials,
CKFinderUploadAdapter,
Autoformat,
BlockToolbar,
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
EasyImage,
Heading,
Image,
ImageCaption,
Expand All @@ -38,15 +35,12 @@ import {
export class BalloonBlockEditor extends BalloonEditorBase {
static builtinPlugins = [
Essentials,
CKFinderUploadAdapter,
Autoformat,
BlockToolbar,
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
EasyImage,
Heading,
Image,
ImageCaption,
Expand Down
6 changes: 0 additions & 6 deletions docs/_snippets/build-balloon.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
import {
BalloonEditor as BalloonEditorBase,
Essentials,
CKFinderUploadAdapter,
Autoformat,
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
EasyImage,
Heading,
Image,
ImageCaption,
Expand All @@ -38,14 +35,11 @@ export class BalloonEditor extends BalloonEditorBase {
static builtinPlugins = [
Essentials,
Paragraph,
CKFinderUploadAdapter,
Autoformat,
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
EasyImage,
Heading,
Image,
ImageCaption,
Expand Down
2 changes: 0 additions & 2 deletions docs/_snippets/build-classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
Italic,
BlockQuote,
CKBox,
EasyImage,
Heading,
Image,
ImageCaption,
Expand Down Expand Up @@ -43,7 +42,6 @@ export class ClassicEditor extends ClassicEditorBase {
Italic,
BlockQuote,
CloudServices,
EasyImage,
Heading,
Image,
ImageCaption,
Expand Down
2 changes: 0 additions & 2 deletions docs/_snippets/build-decoupled-document.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
Underline,
BlockQuote,
CKBox,
EasyImage,
Heading,
Image,
ImageCaption,
Expand Down Expand Up @@ -57,7 +56,6 @@ export class DecoupledEditor extends DecoupledEditorBase {
BlockQuote,
CKBox,
CloudServices,
EasyImage,
Heading,
Image,
ImageCaption,
Expand Down
6 changes: 0 additions & 6 deletions docs/_snippets/build-inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
import {
InlineEditor as InlineEditorBase,
Essentials,
CKFinderUploadAdapter,
Autoformat,
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
EasyImage,
Heading,
Image,
ImageCaption,
Expand All @@ -37,14 +34,11 @@ import {
export class InlineEditor extends InlineEditorBase {
static builtinPlugins = [
Essentials,
CKFinderUploadAdapter,
Autoformat,
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
EasyImage,
Heading,
Image,
ImageCaption,
Expand Down
6 changes: 0 additions & 6 deletions docs/_snippets/build-multi-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
import {
MultiRootEditor as MultiRootEditorBase,
Essentials,
CKFinderUploadAdapter,
Autoformat,
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
EasyImage,
Heading,
Image,
ImageCaption,
Expand All @@ -37,14 +34,11 @@ import {
export class MultiRootEditor extends MultiRootEditorBase {
static builtinPlugins = [
Essentials,
CKFinderUploadAdapter,
Autoformat,
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
EasyImage,
Heading,
Image,
ImageCaption,
Expand Down
9 changes: 6 additions & 3 deletions docs/_snippets/examples/balloon-block-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import {
CS_CONFIG,
TOKEN_URL,
BalloonBlockEditor,
getViewportTopOffsetConfig,
setViewportTopOffsetDynamically
Expand All @@ -15,10 +16,12 @@ BalloonBlockEditor
root: {
element: document.querySelector( '#snippet-balloon-block-editor' )
},
removePlugins: [
'CKBox'
],
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
},
ui: {
viewportOffset: {
top: getViewportTopOffsetConfig()
Expand Down
9 changes: 6 additions & 3 deletions docs/_snippets/examples/balloon-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import {
CS_CONFIG,
TOKEN_URL,
BalloonEditor,
getViewportTopOffsetConfig,
setViewportTopOffsetDynamically
Expand All @@ -15,10 +16,12 @@ BalloonEditor
root: {
element: document.querySelector( '#snippet-balloon-editor' )
},
removePlugins: [
'CKBox'
],
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
},
ui: {
viewportOffset: {
top: getViewportTopOffsetConfig()
Expand Down
15 changes: 11 additions & 4 deletions docs/_snippets/examples/bottom-toolbar-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
*/

import {
Plugin, IconFontColor, Font, Indent, List, Alignment, Autoformat, BlockQuote, DropdownView,
ToolbarView, createDropdown, EasyImage, Essentials, Heading, HorizontalLine, Image,
Plugin, IconFontColor, Font, Indent, List, Alignment, Autoformat, BlockQuote, CKBox, CloudServices,
DropdownView, ToolbarView, createDropdown, Essentials, Heading, HorizontalLine, Image,
ImageInsert, ImageCaption, ImageStyle, ImageToolbar, ImageUpload, ImageResize, Link,
MediaEmbed, Paragraph, RemoveFormat, Bold, Italic, Strikethrough, Superscript, Subscript,
Underline, Table, TableToolbar
} from 'ckeditor5';
import {
CS_CONFIG,
TOKEN_URL,
DecoupledEditor,
attachTourBalloon,
findToolbarItem
Expand Down Expand Up @@ -108,7 +109,8 @@ DecoupledEditor
Autoformat,
BlockQuote,
Bold,
EasyImage,
CKBox,
CloudServices,
Essentials,
Font,
Heading,
Expand Down Expand Up @@ -192,7 +194,12 @@ DecoupledEditor
'mergeTableCells'
]
},
cloudServices: CS_CONFIG
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
}
} )
.then( editor => {
window.editor = editor;
Expand Down
6 changes: 6 additions & 0 deletions docs/_snippets/examples/classic-editor-short.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import {
CS_CONFIG,
TOKEN_URL,
ClassicEditor,
getViewportTopOffsetConfig,
setViewportTopOffsetDynamically
Expand All @@ -14,6 +15,11 @@ ClassicEditor
.create( {
attachTo: document.querySelector( '#snippet-classic-editor-short' ),
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
},
ui: {
viewportOffset: {
top: getViewportTopOffsetConfig()
Expand Down
6 changes: 6 additions & 0 deletions docs/_snippets/examples/classic-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import {
CS_CONFIG,
TOKEN_URL,
ClassicEditor,
getViewportTopOffsetConfig,
setViewportTopOffsetDynamically
Expand All @@ -14,6 +15,11 @@ ClassicEditor
.create( {
attachTo: document.querySelector( '#snippet-classic-editor' ),
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
},
toolbar: {
items: [
'undo', 'redo',
Expand Down
6 changes: 6 additions & 0 deletions docs/_snippets/examples/document-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { TableColumnResize } from 'ckeditor5';
import {
CS_CONFIG,
TOKEN_URL,
DecoupledEditor,
getViewportTopOffsetConfig,
setViewportTopOffsetDynamically
Expand All @@ -20,6 +21,11 @@ DecoupledEditor
TableColumnResize
],
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
},
toolbar: {
items: [
'undo', 'redo',
Expand Down
16 changes: 8 additions & 8 deletions docs/_snippets/examples/inline-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import {
CS_CONFIG,
TOKEN_URL,
InlineEditor,
getViewportTopOffsetConfig,
setViewportTopOffsetDynamically
Expand All @@ -17,9 +18,6 @@ Array.from( inlineInjectElements ).forEach( inlineElement => {
root: {
element: inlineElement
},
removePlugins: [
'CKBox'
],
ui: {
viewportOffset: {
top: getViewportTopOffsetConfig()
Expand All @@ -34,22 +32,24 @@ Array.from( inlineInjectElements ).forEach( inlineElement => {
'|', 'bulletedList', 'numberedList', 'outdent', 'indent'
]
},
cloudServices: CS_CONFIG
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
}
};

if ( inlineElement.tagName.toLowerCase() == 'header' ) {
config.removePlugins = [
...config.removePlugins,
'Blockquote',
'Image',
'ImageCaption',
'ImageStyle',
'ImageToolbar',
'ImageUpload',
'List',
'EasyImage',
'CKFinder',
'CKFinderUploadAdapter'
'CKBox'
];
config.toolbar.items = [ 'heading', '|', 'bold', 'italic', 'link' ];
} else {
Expand Down
10 changes: 6 additions & 4 deletions docs/_snippets/examples/multi-root-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/

import { CS_CONFIG, MultiRootEditor } from '@snippets/index.js';
import { CS_CONFIG, TOKEN_URL, MultiRootEditor } from '@snippets/index.js';

MultiRootEditor
.create(
{
removePlugins: [
'CKBox'
],
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
},
roots: {
header: {
element: document.querySelector( '#header' )
Expand Down
6 changes: 6 additions & 0 deletions docs/_snippets/features/mermaid.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { CKBox, PictureEditing, ImageResize, AutoImage, LinkImage } from 'ckeditor5';
import {
CS_CONFIG,
TOKEN_URL,
ClassicEditor,
getViewportTopOffsetConfig
} from '@snippets/index.js';
Expand Down Expand Up @@ -39,6 +40,11 @@ ClassicEditor
}
},
cloudServices: CS_CONFIG,
ckbox: {
tokenUrl: TOKEN_URL,
forceDemoLabel: true,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
},
// A proper indentation is required for the Mermaid syntax to work.
root: {
initialData: `<h2>CKEditor timeline diagram</h2>
Expand Down
Loading