Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Fix: It will be possible to paste links. See ckeditor/ckeditor5#477.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Jun 23, 2017
1 parent 4ecb8bf commit 4f24219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/linkengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
1 change: 1 addition & 0 deletions tests/linkengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 4f24219

Please sign in to comment.