Formatting was not persisted on empty paragraphs, and was instead based
upon last format encountered in selection.
This was due to overly-hasty removal of other formatting code, which
this got caught it.
Restored required parts from prior codebase.
Also updated inline format button active indicator to reflect formats
using the above, so correct buttons are shown as active even when just
in an empty paragraph.
- Fixed errors with selection and range handling due to captions
existing.
- Updated TableNode change handling to update existing DOM instead of
re-creating, which avoids breaking an attached selection helper.
- To support, Added function to handle node change detection and apply
relevant dom updates for common properties.
Code in lists could throw error on parse due to inner <code> tag being
parsed but not actually used within a <pre>, so this updates the
importDOM to disregard childdren for code blocks.
This also improves the invariant implementation to not be so
dev/debugger based, and to include vars in the output.
- Updated toolbar to match existing editor, including dynamic RTL/LTR
controls.
- Updated text node handling to not include spans and extra classes when
not needed. Added & update tests to cover.
Imported at 0.17.1, Modified to work in-app.
Added & configured test dependancies.
Tests need to be altered to avoid using non-included deps including
react dependancies.