Skip to content

Commit

Permalink
Merge pull request #8760 from ckeditor/i/8720-html-embed-widget
Browse files Browse the repository at this point in the history
Fix (html-embed): The HTML embed plugin should require the `Widget` plugin. Closes #8720.
  • Loading branch information
oleq authored Jan 11, 2021
2 parents ca58a3b + c2ec930 commit 8ef02e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/ckeditor5-html-embed/src/htmlembed.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import HtmlEmbedEditing from './htmlembedediting';
import HtmlEmbedUI from './htmlembedui';
import Widget from '@ckeditor/ckeditor5-widget/src/widget';

/**
* The HTML embed feature.
Expand All @@ -25,7 +26,7 @@ export default class HtmlEmbed extends Plugin {
* @inheritDoc
*/
static get requires() {
return [ HtmlEmbedEditing, HtmlEmbedUI ];
return [ HtmlEmbedEditing, HtmlEmbedUI, Widget ];
}

/**
Expand Down
5 changes: 3 additions & 2 deletions packages/ckeditor5-html-embed/tests/htmlembed.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
import HtmlEmbed from '../src/htmlembed';
import HtmlEmbedUI from '../src/htmlembedui';
import HtmlEmbedEditing from '../src/htmlembedediting';
import Widget from '@ckeditor/ckeditor5-widget/src/widget';

describe( 'HtmlEmbed', () => {
it( 'should require HtmlEmbedEditing and HtmlEmbedUI', () => {
expect( HtmlEmbed.requires ).to.deep.equal( [ HtmlEmbedEditing, HtmlEmbedUI ] );
it( 'should require HtmlEmbedEditing, HtmlEmbedUI and Widget', () => {
expect( HtmlEmbed.requires ).to.deep.equal( [ HtmlEmbedEditing, HtmlEmbedUI, Widget ] );
} );

it( 'should be named', () => {
Expand Down

0 comments on commit 8ef02e7

Please sign in to comment.