Opened 11 years ago
Closed 11 years ago
#11740 closed Bug (fixed)
editor.insertHtml isn't registered as event.editor.on "change"
Reported by: | Roberto | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Maybe is a bug.
I'm using a tiny scroller bar in my page (inline editor) and I must re-init the bar after every change in the editor.
event.editor.on "change", -> window.adminjsmain.jScrollPaneReinit()
Everything is working right while I'm typing text in the editor, but if I use "editor.insertHtml" the editor state is not changed.
Change History (1)
comment:1 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Version: | 4.3.4 |
When you use
editor.insertHtml
you also have to remember about integration with undo manager - so you should fireeditor#saveSnapshot
events before and after the action. Theeditor.insertHtml
method cannot do that because it does not know when is the correct moment - there are some actions which consist of more than one step.The
editor#change
event is triggered by the undo manager. So if you'll fix your code integration with undo manager, then it will be correctly fired.