/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
/* globals document */
import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
import PasteFromOffice from '../../../src/pastefromoffice';
import { setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
import { getFixtures } from '../../_utils/fixtures';
import { expectModel } from '../../_utils/utils';
describe( 'Basic Styles – integration', () => {
let element, editor, input;
before( () => {
input = getFixtures( 'basic-styles' ).input;
element = document.createElement( 'div' );
document.body.appendChild( element );
return ClassicTestEditor
.create( element, { plugins: [ Clipboard, Paragraph, Heading, Bold, Italic, Underline, Strikethrough, PasteFromOffice ] } )
.then( editorInstance => {
editor = editorInstance;
} );
} );
beforeEach( () => {
setData( editor.model, '
Some text with bold.
it( 'pastes bold within text', () => { const expected = 'Italic text.
it( 'pastes italic starting text', () => { const expected = 'Whole text underlined
it( 'pastes underlined text', () => { const expected = 'Text incorrect
Text containing multiplestyling.
Line bold and italics
//Line foo bar
//Third line styling, space on end