nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
17.12k stars 1.74k forks source link

How to create the Viewer? How to render the content? #3085

Open OnkelTem opened 1 year ago

OnkelTem commented 1 year ago

I don't understand how to create this viewer thing and there is nothing helpful in the documentation on this.

This is from the docs:

const viewer = new toastui.Editor({
  el: document.querySelector('#viewer'),
  initialValue: content
});

but it doesn't create any Viewer, it just creates the same Editor UI with editable content.

I also found viewer: boolean property among the options, but setting it doesn't make any difference.

So how is it assumed to properly render the content?