mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°5298 - Update CKEditor to version 5
This commit is contained in:
25
js/ckeditor/sample/script.js
Normal file
25
js/ckeditor/sample/script.js
Normal file
@@ -0,0 +1,25 @@
|
||||
createDialog().then( config => {
|
||||
return ClassicEditor
|
||||
.create( document.querySelector( '.editor' ), {
|
||||
licenseKey: config.licenseKey,
|
||||
ckbox: {
|
||||
tokenUrl: config.ckboxTokenUrl
|
||||
}
|
||||
} )
|
||||
.then( editor => {
|
||||
window.editor = editor;
|
||||
} )
|
||||
.catch( handleSampleError );
|
||||
} );
|
||||
|
||||
function handleSampleError( error ) {
|
||||
const issueUrl = 'https://github.com/ckeditor/ckeditor5/issues';
|
||||
|
||||
const message = [
|
||||
'Oops, something went wrong!',
|
||||
`Please, report the following error on ${ issueUrl } with the build id "432vyqcgng9n-qwbrzeekei95" and the error stack trace:`
|
||||
].join( '\n' );
|
||||
|
||||
console.error( message );
|
||||
console.error( error );
|
||||
}
|
||||
Reference in New Issue
Block a user