1

I want to use the document viewer from ckeditor. It looks like a normal ckeditor, i want the version with the page.

It looks like this: original

And in my app it looks like this: my app

I installed CKeditor with following:

npm install --save @ckeditor/ckeditor5-angular    
npm i @ckeditor/ckeditor5-build-decoupled-document

And used in HTML:

<ckeditor [editor]="Editor" data="<p>Hello, world!</p>" (ready)="onReady($event)"></ckeditor>

And in Component:

import * as DecoupledEditor from '@ckeditor/ckeditor5-build-decoupled-document';



public Editor = DecoupledEditor;

  public onReady(editor) {
    editor.ui.view.editable.element.parentElement.insertBefore(
      editor.ui.view.toolbar.element,
      editor.ui.view.editable.element
    );

  }
2
  • You'll need some additional styles to get the native text processor look and feel.
    – oleq
    Jan 31, 2019 at 8:58
  • Ok that make sense. I was expecting to be ready to use. Thank you Jan 31, 2019 at 13:18

1 Answer 1

0

You'll need some additional styles to get the native text processor look and feel. – oleq

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.