docs/_snippets/features/todo-list.js
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/* globals console, window, document */
import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
import TodoList from '@ckeditor/ckeditor5-list/src/todolist';
ClassicEditor.builtinPlugins.push( TodoList );
ClassicEditor
.create( document.querySelector( '#snippet-todo-list' ), {
cloudServices: CS_CONFIG,
toolbar: {
items: [
'heading',
'|',
'bulletedList',
'numberedList',
'todoList',
'|',
'outdent',
'indent',
'|',
'link',
'insertTable',
'|',
'undo',
'redo'
],
viewportTopOffset: window.getViewportTopOffsetConfig()
}
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );