diff --git a/src/linkengine.js b/src/linkengine.js index 1e32f28..7862253 100644 --- a/src/linkengine.js +++ b/src/linkengine.js @@ -32,6 +32,8 @@ export default class LinkEngine extends Plugin { // Allow link attribute on all inline nodes. editor.document.schema.allow( { name: '$inline', attributes: 'linkHref', inside: '$block' } ); + // Temporary workaround. See https://github.com/ckeditor/ckeditor5/issues/477. + editor.document.schema.allow( { name: '$inline', attributes: 'linkHref', inside: '$clipboardHolder' } ); // Build converter from model to view for data and editing pipelines. buildModelConverter().for( data.modelToView, editing.modelToView ) diff --git a/tests/linkengine.js b/tests/linkengine.js index 0650ff3..f6bb9a3 100644 --- a/tests/linkengine.js +++ b/tests/linkengine.js @@ -34,6 +34,7 @@ describe( 'LinkEngine', () => { it( 'should set proper schema rules', () => { expect( doc.schema.check( { name: '$inline', attributes: [ 'linkHref' ], inside: '$root' } ) ).to.be.false; expect( doc.schema.check( { name: '$inline', attributes: [ 'linkHref' ], inside: '$block' } ) ).to.be.true; + expect( doc.schema.check( { name: '$inline', attributes: [ 'linkHref' ], inside: '$clipboardHolder' } ) ).to.be.true; } ); describe( 'command', () => {