Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP: First partially working version of inline text formatting * Added fix for importing elements with multiple styles * Added the option to toggle b/i/u for entire text field * Cleaned up the structure a bit * Added support for font weight and multi-select * Update tests now that some values are not in use * Adding `npx` to postinstall to see if CI approves * Removed `postinstall-postinstall` * If selection is collapsed when applying style change, apply to inline override * Reorganised selection manip and added letter spacing * Disable force focus when setting letter spacing Actually the whole `forceFocus` variable was superfluous - `EditorState.forceSelection` autimatically forces focus to the editor. And selection was remembered, just not visible while unfocused, so things still work as expected. * Added inline text color formatting * Fix multiple reducer for patterns, and fix tests * Fixed font and font weight dropdowns Font weight dropdown simply gets a new placeholder, as the placeholder will only be shown, when there's multiple font weights selected. For now, font weight logic is removed from font selector (but must be readded in a new version later), and tests are updated. * Remove deprecated types from text element * Some extra cleanup of deprecated properties * Added new migration with test (also added `jest-extended`) * Refactored formatters to verticals rather than horizontals - much cleaner result * Fixed reducer and added comments * Added jsdocs to html manipulation * Removed classes from migration and added test for nested tags * Fix tests for text style now that export does not have classes anymore * Moved focus management to edit component * Create general `getValidHTML` util * Added deps to `useImperativeHandle` * Fixed `parseFloat` args * Added faux-selection style and fixed various bugs * Fixed typo * For now, strip formatting when pasting * Remove weird npm scripts * Using a less nice matcher * Added tests for formatters * Set default font color to black - all other colors are fixed inline * Added unit tests for style manipulation These are slightly integrated with draft-js' editor state, as it was too complex too mock and this is actually a better test IMHO. * Fixed color input (allow multiple value string) * Fixed color picker to default to solid black (rather than transparent black) * Fixed null value for input * Fix color preset to work for new ITF formatting * Added full support for text color and text style presets * Inlined font weights for text panel presets * Fix focus out to check click target in capture phase * Re-add default props to test * Added jsdoc for draftUtils * Fix children proptype * Add better error handlign to faux selection removal * Added jsdocs for complex style manipulation functions * Added function to strip relevant inline styling * Added new function to compare patterns and used where applicable * Added ignore black to set color style as it is default * Changed highlight to use existing style manipulation Reverted changes to `getValidHTML` and reused the existing HTML manipulation functions. * Removed conditional hook
- Loading branch information
Morten Barklund
committed
May 6, 2020
1 parent
8c7421a
commit dd191a4
Showing
68 changed files
with
4,352 additions
and
682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.