Skip to content

Commit 5d0fe1e

Browse files
authored
Update licenseKey handling (#17316)
Other: Changes related to the introduction of self-service channel for CKEditor 5 Premium Features. See #17317. MAJOR BREAKING CHANGE: `config.licenseKey` is now a required property in the editor configuration. Use `'GPL'` for installations under the GPL terms. See #17317.
1 parent 21c6f46 commit 5d0fe1e

File tree

359 files changed

+11038
-2940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

359 files changed

+11038
-2940
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = {
2121
],
2222
rules: {
2323
'ckeditor5-rules/ckeditor-imports': 'error',
24+
'ckeditor5-rules/prevent-license-key-leak': 'error',
2425
'ckeditor5-rules/license-header': [ 'error', {
2526
headerLines: [
2627
'/**',

docs/_snippets/examples/balloon-block-editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ BalloonEditor
2323
viewportOffset: {
2424
top: window.getViewportTopOffsetConfig()
2525
}
26-
}
26+
},
27+
licenseKey: 'GPL'
2728
} )
2829
.then( editor => {
2930
window.editor = editor;

docs/_snippets/examples/balloon-editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ BalloonEditor
2525
viewportOffset: {
2626
top: window.getViewportTopOffsetConfig()
2727
}
28-
}
28+
},
29+
licenseKey: 'GPL'
2930
} )
3031
.then( editor => {
3132
window.editor = editor;

docs/_snippets/examples/bottom-toolbar-editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ DecoupledEditor
202202
'mergeTableCells'
203203
]
204204
},
205-
206-
cloudServices: CS_CONFIG
205+
cloudServices: CS_CONFIG,
206+
licenseKey: 'GPL'
207207
} )
208208
.then( editor => {
209209
window.editor = editor;

docs/_snippets/examples/classic-editor-short.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ ClassicEditor
1414
viewportOffset: {
1515
top: window.getViewportTopOffsetConfig()
1616
}
17-
}
17+
},
18+
licenseKey: 'GPL'
1819
} )
1920
.then( editor => {
2021
window.editor = editor;

docs/_snippets/examples/classic-editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ ClassicEditor
2323
viewportOffset: {
2424
top: window.getViewportTopOffsetConfig()
2525
}
26-
}
26+
},
27+
licenseKey: 'GPL'
2728
} )
2829
.then( editor => {
2930
window.editor = editor;

docs/_snippets/examples/document-editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ DecoupledEditor
2929
viewportOffset: {
3030
top: window.getViewportTopOffsetConfig()
3131
}
32-
}
32+
},
33+
licenseKey: 'GPL'
3334
} )
3435
.then( editor => {
3536
const toolbarContainer = document.querySelector( '.document-editor__toolbar' );

docs/_snippets/examples/inline-editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Array.from( inlineInjectElements ).forEach( inlineElement => {
2626
'|', 'bulletedList', 'numberedList', 'outdent', 'indent'
2727
]
2828
},
29-
cloudServices: CS_CONFIG
29+
cloudServices: CS_CONFIG,
30+
licenseKey: 'GPL'
3031
};
3132

3233
if ( inlineElement.tagName.toLowerCase() == 'header' ) {

docs/_snippets/examples/multi-root-editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ MultiRootEditor
2828
'|', 'link', 'uploadImage', 'insertTable', 'mediaEmbed',
2929
'|', 'bulletedList', 'numberedList', 'outdent', 'indent'
3030
]
31-
}
31+
},
32+
licenseKey: 'GPL'
3233
}
3334
)
3435
.then( editor => {

docs/_snippets/features/image-upload.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ ClassicEditor
6161
tokenUrl: TOKEN_URL,
6262
forceDemoLabel: true,
6363
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
64-
}
64+
},
65+
licenseKey: 'GPL'
6566
} )
6667
.then( editor => {
6768
window.editor = editor;

docs/_snippets/features/mathtype.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ ClassicEditor
5959
table: {
6060
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
6161
},
62-
cloudServices: CS_CONFIG
62+
cloudServices: CS_CONFIG,
63+
licenseKey: 'GPL'
6364
} )
6465

6566
.then( editor => {

docs/_snippets/features/mermaid.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ ClassicEditor
3939
top: window.getViewportTopOffsetConfig()
4040
}
4141
},
42-
cloudServices: CS_CONFIG
42+
cloudServices: CS_CONFIG,
43+
licenseKey: 'GPL'
4344
} )
4445
.then( editor => {
4546
window.editor = editor;

docs/_snippets/features/placeholder-custom.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ ClassicEditor
3232
top: window.getViewportTopOffsetConfig()
3333
}
3434
},
35-
placeholder: 'Type some content here!'
35+
placeholder: 'Type some content here!',
36+
licenseKey: 'GPL'
3637
} )
3738
.then( editor => {
3839
window.editor = editor;

docs/_snippets/features/placeholder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ ClassicEditor
3232
top: window.getViewportTopOffsetConfig()
3333
}
3434
},
35-
placeholder: 'Type some content here!'
35+
placeholder: 'Type some content here!',
36+
licenseKey: 'GPL'
3637
} )
3738
.then( editor => {
3839
window.editor = editor;

docs/_snippets/features/read-only-hide-toolbar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ ClassicEditor
3535
tokenUrl: TOKEN_URL,
3636
forceDemoLabel: true,
3737
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
38-
}
38+
},
39+
licenseKey: 'GPL'
3940
} )
4041
.then( editor => {
4142
window.editor = editor;

docs/_snippets/features/read-only.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ ClassicEditor
5757
exportWord: {
5858
fileName: 'export-word-demo.docx',
5959
tokenUrl: false
60-
}
60+
},
61+
licenseKey: 'GPL'
6162
} )
6263
.then( editor => {
6364
const button = document.querySelector( '#snippet-read-only-toggle' );

docs/_snippets/features/ui-language-content.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ ClassicEditor
3838
tokenUrl: TOKEN_URL,
3939
forceDemoLabel: true,
4040
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
41-
}
41+
},
42+
licenseKey: 'GPL'
4243
} )
4344
.then( editor => {
4445
window.editor = editor;

docs/_snippets/features/ui-language-rtl.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ ClassicEditor
3636
tokenUrl: TOKEN_URL,
3737
forceDemoLabel: true,
3838
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
39-
}
39+
},
40+
licenseKey: 'GPL'
4041
} )
4142
.then( editor => {
4243
window.editor = editor;

docs/_snippets/features/ui-language.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ ClassicEditor
3636
tokenUrl: TOKEN_URL,
3737
forceDemoLabel: true,
3838
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
39-
}
39+
},
40+
licenseKey: 'GPL'
4041
} )
4142
.then( editor => {
4243
window.editor = editor;

docs/_snippets/features/update-placeholder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ ClassicEditor
2626
top: window.getViewportTopOffsetConfig()
2727
}
2828
},
29-
placeholder: 'Type some content here!'
29+
placeholder: 'Type some content here!',
30+
licenseKey: 'GPL'
3031
} )
3132
.then( editor => {
3233
const button = document.getElementById( 'update-placeholder-button' );

docs/_snippets/features/wproofreader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ ClassicEditor
5252
},
5353
table: {
5454
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
55-
}
55+
},
56+
licenseKey: 'GPL'
5657
} )
5758
.then( editor => {
5859
window.editor = editor;

docs/_snippets/framework/development-tools/inspector.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ ClassicEditor
1616
viewportOffset: {
1717
top: window.getViewportTopOffsetConfig()
1818
}
19-
}
19+
},
20+
licenseKey: 'GPL'
2021
} )
2122
.then( editor => {
2223
window.editor = editor;

docs/_snippets/framework/tutorials/block-widget.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ ClassicEditor
233233
viewportOffset: {
234234
top: window.getViewportTopOffsetConfig()
235235
}
236-
}
236+
},
237+
licenseKey: 'GPL'
237238
} )
238239
.then( editor => {
239240
console.log( 'Editor was initialized', editor );

docs/_snippets/framework/tutorials/external-data-widget.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ class ExternalDataWidgetEditing extends Plugin {
194194
ClassicEditor
195195
.create( document.querySelector( '#snippet-external-data-widget' ), {
196196
plugins: [ Essentials, Paragraph, Heading, List, Bold, Italic, ExternalDataWidget ],
197-
toolbar: [ 'undo', 'redo', '|', 'external', '|', 'heading', '|', 'bold', 'italic', '|', 'numberedList', 'bulletedList' ]
197+
toolbar: [ 'undo', 'redo', '|', 'external', '|', 'heading', '|', 'bold', 'italic', '|', 'numberedList', 'bulletedList' ],
198+
licenseKey: 'GPL'
198199
} )
199200
.then( editor => {
200201
console.log( 'Editor was initialized', editor );

docs/_snippets/framework/tutorials/inline-widget.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ ClassicEditor
221221
viewportOffset: {
222222
top: window.getViewportTopOffsetConfig()
223223
}
224-
}
224+
},
225+
licenseKey: 'GPL'
225226
} )
226227
.then( editor => {
227228
console.log( 'Editor was initialized', editor );

docs/_snippets/framework/tutorials/using-react-in-widget.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ <h3>Other deals</h3>
293293
<ProductPreview id={id} {...product} />
294294
);
295295
}
296-
}
296+
},
297+
licenseKey: 'GPL'
297298
};
298299

299300
this.handleEditorDataChange = this.handleEditorDataChange.bind( this );

docs/_snippets/framework/ui/ui-button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ document.querySelector( '.ui-button' ).append( toolbarButtons.element );
6868

6969
ClassicEditor
7070
.create( document.querySelector( '#ui-button-editor' ), {
71-
plugins: [ Essentials ]
71+
plugins: [ Essentials ],
72+
licenseKey: 'GPL'
7273
} )
7374
.then( editor => {
7475
this.tooltipManager = new TooltipManager( editor );

docs/_snippets/framework/ui/ui-dialog.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class MinimalisticDialog extends Plugin {
7474
ClassicEditor
7575
.create( document.querySelector( '#ui-dialog-editor' ), {
7676
plugins: [ Essentials, Paragraph, Bold, Italic, Underline, MinimalisticDialog, Dialog ],
77-
toolbar: [ 'bold', 'italic', 'underline', '|', 'showDialog' ]
77+
toolbar: [ 'bold', 'italic', 'underline', '|', 'showDialog' ],
78+
licenseKey: 'GPL'
7879
} )
7980
.then( editor => {
8081
window.attachTourBalloon( {

docs/_snippets/framework/ui/ui-modal.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ class MinimalisticModal extends Plugin {
7575
ClassicEditor
7676
.create( document.querySelector( '#ui-modal-editor' ), {
7777
plugins: [ Essentials, Paragraph, Bold, Italic, Underline, MinimalisticModal, Dialog ],
78-
toolbar: [ 'bold', 'italic', 'underline', '|', 'showModal' ]
78+
toolbar: [ 'bold', 'italic', 'underline', '|', 'showModal' ],
79+
licenseKey: 'GPL'
7980
} )
8081
.then( editor => {
8182
window.attachTourBalloon( {

docs/_snippets/installation/getting-and-setting-data/manualsave.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ ClassicEditor
2121
viewportOffset: {
2222
top: window.getViewportTopOffsetConfig()
2323
}
24-
}
24+
},
25+
licenseKey: 'GPL'
2526
} )
2627
.then( editor => {
2728
window.editor = editor;

docs/_snippets/installation/setup/blocktoolbar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ ClassicEditor
3232
'|',
3333
'outdent', 'indent'
3434
],
35-
cloudServices: CS_CONFIG
35+
cloudServices: CS_CONFIG,
36+
licenseKey: 'GPL'
3637
} )
3738
.then( editor => {
3839
window.editorBasic = editor;

docs/_snippets/installation/setup/toolbar-basic.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ ClassicEditor
3333
tokenUrl: TOKEN_URL,
3434
forceDemoLabel: true,
3535
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
36-
}
36+
},
37+
licenseKey: 'GPL'
3738
} )
3839
.then( editor => {
3940
window.editor = editor;

docs/_snippets/installation/setup/toolbar-breakpoint.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ ClassicEditor
6161
{ model: 'heading4', view: 'h5', title: 'Heading 4', class: 'ck-heading_heading4' }
6262
]
6363
},
64-
cloudServices: CS_CONFIG
64+
cloudServices: CS_CONFIG,
65+
licenseKey: 'GPL'
6566
} )
6667
.then( editor => {
6768
window.editor = editor;

docs/_snippets/installation/setup/toolbar-grouping.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ ClassicEditor
5858
{ model: 'heading4', view: 'h5', title: 'Heading 4', class: 'ck-heading_heading4' }
5959
]
6060
},
61-
cloudServices: CS_CONFIG
61+
cloudServices: CS_CONFIG,
62+
licenseKey: 'GPL'
6263
} )
6364
.then( editor => {
6465
window.editor = editor;

docs/_snippets/installation/setup/toolbar-nested-icon.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ ClassicEditor
5656
tokenUrl: TOKEN_URL,
5757
forceDemoLabel: true,
5858
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
59-
}
59+
},
60+
licenseKey: 'GPL'
6061
} )
6162
.then( editor => {
6263
window.editor = editor;

docs/_snippets/installation/setup/toolbar-nested-label.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ ClassicEditor
4545
tokenUrl: TOKEN_URL,
4646
forceDemoLabel: true,
4747
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
48-
}
48+
},
49+
licenseKey: 'GPL'
4950
} )
5051
.then( editor => {
5152
window.editor = editor;

docs/_snippets/installation/setup/toolbar-nested-simple.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ ClassicEditor
4848
tokenUrl: TOKEN_URL,
4949
forceDemoLabel: true,
5050
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
51-
}
51+
},
52+
licenseKey: 'GPL'
5253
} )
5354
.then( editor => {
5455
window.editor = editor;

docs/_snippets/installation/setup/toolbar-nested-tooltip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ ClassicEditor
3939
tokenUrl: TOKEN_URL,
4040
forceDemoLabel: true,
4141
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
42-
}
42+
},
43+
licenseKey: 'GPL'
4344
} )
4445
.then( editor => {
4546
window.editor = editor;

docs/_snippets/installation/setup/toolbar-separator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ ClassicEditor
3333
tokenUrl: TOKEN_URL,
3434
forceDemoLabel: true,
3535
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ]
36-
}
36+
},
37+
licenseKey: 'GPL'
3738
} )
3839
.then( editor => {
3940
window.editor = editor;

docs/_snippets/installation/setup/toolbar-wrapping.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ ClassicEditor
6363
table: {
6464
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells', 'tableProperties', 'tableCellProperties' ]
6565
},
66-
cloudServices: CS_CONFIG
66+
cloudServices: CS_CONFIG,
67+
licenseKey: 'GPL'
6768
} )
6869
.then( editor => {
6970
window.editor = editor;

0 commit comments

Comments
 (0)