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

Commit

Permalink
Merge pull request #225 from ckeditor/t/224
Browse files Browse the repository at this point in the history
Other: `Use model.insertContent` instead of `model.Writer.insert`. Closes #224.
  • Loading branch information
Piotr Jasiun authored May 20, 2019
2 parents 5b861a2 + c1da028 commit e3c8676
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/linkcommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class LinkCommand extends Command {

const node = writer.createText( href, attributes );

writer.insert( node, position );
model.insertContent( node, position );

// Create new range wrapping created node.
writer.setSelection( writer.createRangeOn( node ) );
Expand Down
2 changes: 1 addition & 1 deletion tests/linkcommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe( 'LinkCommand', () => {

model.schema.extend( '$text', {
allowIn: '$root',
allowAttributes: 'linkHref'
allowAttributes: [ 'linkHref', 'bold' ]
} );

model.schema.register( 'p', { inheritAllFrom: '$block' } );
Expand Down

0 comments on commit e3c8676

Please sign in to comment.