Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it( 'pastes blockquote into the td', () => {
setModelData( editor.model, modelTable( [ [ '[]' ] ] ) );
clipboard.fire( 'inputTransformation', {
content: parseView( '<blockquote>bar</blockquote>' )
} );
expect( formatTable( getModelData( editor.model ) ) ).to.equal( formattedModelTable( [
[ '<blockquote>bar[]</blockquote>' ]
] ) );
} );
} );
it( 'pastes td as p when pasting into the p', () => {
setModelData( editor.model, 'foo[]' );
clipboard.fire( 'inputTransformation', {
content: parseView( 'bar' )
} );
expect( formatTable( getModelData( editor.model ) ) ).to.equal( 'foobar[]' );
} );
it( 'pastes list into the td', () => {
setModelData( editor.model, modelTable( [ [ '[]' ] ] ) );
clipboard.fire( 'inputTransformation', {
content: parseView( '<li>bar</li>' )
} );
expect( formatTable( getModelData( editor.model ) ) ).to.equal( formattedModelTable( [
[ 'bar[]' ]
] ) );
} );
function convertToMarkdown() {
const viewText = viewTextArea.value;
markdownTextArea.value = dataProcessor.toData( parse( viewText ) );
}