guardian / scribe

DEPRECATED: A rich text editor framework for the web platform
http://guardian.github.io/scribe/
Apache License 2.0
3.51k stars 245 forks source link

Undo manager cannot be disabled #452

Closed nedrocks closed 8 years ago

nedrocks commented 8 years ago

If I set undo to disabled, scribe complains because _lastItem is null and part of the constructor calls setHTML which has a call for

_lastItem.content = <whatever>

There needs to be an else block to allow for this. Currently, my work around is to simply set

Scribe.prototype._lastItem = {content: ''};

rrees commented 8 years ago

Okay good spot, I'll take a look. setHtml should probably respect the option.

rrees commented 8 years ago

@nedrocks do you want to review the associated PR