Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use keypress event to accept character input
Previously, character input was detected after-the-fact using the mutation observer.
Other changes:
enable/disable/enableTypesmethods.Used to selectively turn on/off logging for different parts of the editor.
Disabled by default
state of the editor (active markups, active sections, whether the next
character will have any markup applied to it)
cursorDidChangebefore the editor has renderedcursorDidChangewhen active markups or sections(but not necessarily the cursor) has changed. This provides compatibility
for consumers that rely only on the
cursorDidChangemethod to update thestate of their toolbar buttons, e.g.
editor.range-- noweditor.rangeis cached untilan event that may change the cursor (keystrokes, clicks, etc) occurs. This makes
editor.rangemore stable and more performant. This obviates some complicatedAdds
_resetRangeprivate method to force re-reading the range from DOM.editor.rangeis lazy — it only reads from the DOM when it is accessed.PostEditorslightly to read and render editor's range in light ofthe changes to
editor.rangein IE.
skipInIEinsertTextmethod to editor that inserts text at the current cursor positionwith the markups from that position (if the cursor is in bold text, more bold text will
be inserted).
insertTextandinsertTextWithMarkuptoPostEditorPost#markupsInRangeto determine the markups correctly if the range is collapsedKeyto correctly determine if an event is a key event or is in printable in Firefoxbecause Firefox reports
event.keyCodeas0for some key events.