|
|
@@ -20,6 +20,7 @@ import SplitCellCommand from '../src/commands/splitcellcommand';
|
|
|
import MergeCellCommand from '../src/commands/mergecellcommand';
|
|
|
import SetHeaderRowCommand from '../src/commands/setheaderrowcommand';
|
|
|
import SetHeaderColumnCommand from '../src/commands/setheadercolumncommand';
|
|
|
+import MediaEmbedEditing from '@ckeditor/ckeditor5-media-embed/src/mediaembedediting';
|
|
|
|
|
|
describe( 'TableEditing', () => {
|
|
|
let editor, model;
|
|
|
@@ -27,7 +28,7 @@ describe( 'TableEditing', () => {
|
|
|
beforeEach( () => {
|
|
|
return VirtualTestEditor
|
|
|
.create( {
|
|
|
- plugins: [ TableEditing, Paragraph, ImageEditing ]
|
|
|
+ plugins: [ TableEditing, Paragraph, ImageEditing, MediaEmbedEditing ]
|
|
|
} )
|
|
|
.then( newEditor => {
|
|
|
editor = newEditor;
|
|
|
@@ -184,6 +185,15 @@ describe( 'TableEditing', () => {
|
|
|
expect( getModelData( model, { withoutSelection: true } ) )
|
|
|
.to.equal( '<table><tableRow><tableCell><paragraph></paragraph></tableCell></tableRow></table>' );
|
|
|
} );
|
|
|
+
|
|
|
+ it( 'should convert table with media', () => {
|
|
|
+ editor.setData(
|
|
|
+ '<table><tbody><tr><td><oembed url="https://www.youtube.com/watch?v=H08tGjXNHO4"></oembed></td></tr></tbody></table>'
|
|
|
+ );
|
|
|
+
|
|
|
+ expect( getModelData( model, { withoutSelection: true } ) )
|
|
|
+ .to.equal( '<table><tableRow><tableCell><paragraph></paragraph></tableCell></tableRow></table>' );
|
|
|
+ } );
|
|
|
} );
|
|
|
} );
|
|
|
|