Guest User

Untitled

a guest
Aug 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. import gapNormalizer from '../../widget/GapFill/normalizer';
  2. import listNormalizer from '../../button/List/normalizer';
  3. import {SlateBlock, SlateErrorReason, SlateInline} from '../../../interface';
  4. import {BlockNormalizer} from '../../interface';
  5. import {normalizeLogger} from './document';
  6.  
  7. const blockNormalizer: BlockNormalizer = {
  8. [SlateInline.GAP_FILL_INPUT]: gapNormalizer(SlateInline.GAP_FILL_INPUT),
  9. [SlateInline.GAP_FILL_DROP_DOWN]: gapNormalizer(SlateInline.GAP_FILL_DROP_DOWN),
  10. [SlateInline.GAP_FILL_DND]: gapNormalizer(SlateInline.GAP_FILL_DND),
  11. [SlateBlock.LIST]: listNormalizer,
  12. debug: {
  13. predicate: ({node}) => true,
  14. reasons: Object.keys(SlateErrorReason).reduce((reasons, reason) => ({...reasons, [SlateErrorReason[reason]]: normalizeLogger}), {})
  15. },
  16. };
  17.  
  18. export default blockNormalizer;
Add Comment
Please, Sign In to add comment