I managed to make some progress by removing replaceBlock and simply doing the transform myself in the dialect.
I also switched to addPreProcessor() and this seems to work ok for the preview window, but the main post still has some problems:
There also seems to be some debounce affect that causes my preview window to fire decorateCooked on every other keystroke?
Any guidance is appreciated.
