nenadpnc / cl-editor

Lightweight text editor built with svelte, typescript
https://nenadpnc.github.io/cl-editor/
MIT License
293 stars 23 forks source link

setHtml while viewHtml action is active doesn't replace contents? #32

Closed Andersama closed 3 years ago

Andersama commented 3 years ago

When the viewHtml action is active setHtml edits $references.editor.innerHTML but that's not what is being currently displayed, when viewHtml is "deactivated" it replaces $references.editor.innerHTML with its current contents effectively discarding whatever setHtml calls were made.

Not sure if this is the intended behavior? Seems potentially broken.

nenadpnc commented 3 years ago

Yeah, you are right, it's a bug. I've just released a new version 2.2.0, check it out, should fix the issue.

Andersama commented 3 years ago

Will do!