| 123456789101112131415161718192021222324252627282930313233 |
- /**
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
- /* globals console, window, document */
- import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
- import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
- ClassicEditor
- .create( document.querySelector( '#editor' ), {
- plugins: [ ArticlePluginSet ],
- toolbar: [ 'headings', 'undo', 'redo' ],
- image: {
- toolbar: [ 'imageTextAlternative' ]
- }
- } )
- .then( editor => {
- window.editor = editor;
- // const schema = editor.model.schema;
- // TODO this requires a callback
- // schema.xdisallow( { name: '$text', attributes: [ 'linkHref', 'italic' ], inside: 'heading1' } );
- // schema.xdisallow( { name: '$text', attributes: [ 'italic' ], inside: 'heading2' } );
- // schema.xdisallow( { name: '$text', attributes: [ 'linkHref' ], inside: 'blockQuote listItem' } );
- // schema.xdisallow( { name: '$text', attributes: [ 'bold' ], inside: 'paragraph' } );
- // schema.xdisallow( { name: 'heading3', inside: '$root' } );
- } )
- .catch( err => {
- console.error( err.stack );
- } );
|