@@ -138,7 +138,7 @@ export default class AutoMediaEmbed extends Plugin {
const mediaEmbedCommand = editor.commands.get( 'mediaEmbed' );
- // Do not anything if media element cannot be inserted at the current position.
+ // Do not anything if media element cannot be inserted at the current position (#47).
if ( !mediaEmbedCommand.isEnabled ) {
return;
}
@@ -304,6 +304,7 @@ describe( 'AutoMediaEmbed - integration', () => {
);
} );
+ // #47
it( 'does not transform a valid URL into a media if the element cannot be placed in the current position', () => {
setData( editor.model, '<image src="foo.png"><caption>Foo.[]</caption></image>' );
pasteHtml( editor, 'https://www.youtube.com/watch?v=H08tGjXNHO4' );