Skip to content

Commit

Permalink
Merge 9b557ca into b3a451a
Browse files Browse the repository at this point in the history
  • Loading branch information
elszczepano authored Apr 18, 2019
2 parents b3a451a + 9b557ca commit 03f63b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
9 changes: 5 additions & 4 deletions src/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export default {
name: 'ckeditor',

render( createElement ) {
return createElement( this.tagName );
return createElement(this.tagName, {
domProps: {
innerHTML: this.value || ''
}
});
},

props: {
Expand Down Expand Up @@ -49,9 +53,6 @@ export default {
// Save the reference to the instance for further use.
this.instance = editor;

// Set the initial data of the editor.
editor.setData( this.value );

// Set initial disabled state.
editor.isReadOnly = this.disabled;

Expand Down
13 changes: 0 additions & 13 deletions tests/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,6 @@ describe( 'CKEditor Component', () => {
expect( vm.value ).to.equal( '' );
} );

it( 'should set the initial data', done => {
const setDataStub = sandbox.stub( MockEditor.prototype, 'setData' );
const { wrapper } = createComponent( {
value: 'foo'
} );

Vue.nextTick( () => {
sinon.assert.calledWithExactly( setDataStub, 'foo' );

wrapper.destroy();
done();
} );
} );
} );

describe( '#tagName', () => {
Expand Down

0 comments on commit 03f63b3

Please sign in to comment.