These are chat archives for daviferreira/medium-editor

2nd
Apr 2015
Nate Mielnik
@nmielnik
Apr 02 2015 05:21
I'm working on exposing some of the custom events we need for my org. Once I get that code in, I'm happy to help out with this initiative.
ryanackley
@ryanackley
Apr 02 2015 15:18
Does the editor have no built-in hooks for undo or redo?
just wondering if I'm doing something wrong
cmd-z or ctrl-z seems to do nothing
nevermind, works in the demo must be me then
ryanackley
@ryanackley
Apr 02 2015 15:29
Wait it's not working now
can anyone confirm that undo/redo works for the medium editor
Davi Ferreira
@daviferreira
Apr 02 2015 15:35
browser contenteditable takes care of that
there is no implementation on MediumEditor side :)
Peter E Higgins
@phiggins42
Apr 02 2015 15:52
if you direct domManip the contentEditable some of those actions don't get put into undo stack
but if everything routes through execCommand then native undo still works
(am facing a similar issue where I'm doing direct manip/.innerHTML on certain nodes, so some of my "fancy component" in the editable area are ignored during undo/redo
ryanackley
@ryanackley
Apr 02 2015 17:33
I found the problem, i had an undo handler on my document. (I'm writing an image editor). It was bubbling up. I just added my own handler to the medium editor that calls execCommand and stops propagation. ALl good now