remirror

ProseMirror toolkit for React 🎉

MIT License

Downloads
14.7M
Stars
2.6K
Committers
81

Bot releases are visible (Hide)

remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-05-27

Patch Changes

  • Return false when list indent and dedent commands won't work.
remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-05-24

Patch Changes

remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-05-24

Patch Changes

  • Add a built in extension allowing external code to subscribe to document changes.

    manager.getExtension(DocChangedExtension).addHandler('docChanged', mock);
    
  • Add a hook, and 2 React components to simplify subscribing to document changes.

    Adds a useDocChanged hook, which when given a handler function, calls it with the transactions and state when document is changed.

    import { useCallback } from 'react';
    import { useDocChanged } from '@remirror/react';
    
    useDocChanged(
      useCallback(({ tr, transactions, state }) => {
        console.log('Transaction', tr);
        console.log('Transactions', transactions);
        console.log('EditorState', state);
      }, []),
    );
    

    Also adds two React components, OnChangeJSON and OnChangeHTML which accept a handler function, which is called with the JSON or HTML serialisation of doc state, whenever the document is changed.

    import { useCallback } from 'react';
    import { OnChangeJSON, OnChangeHTML } from '@remirror/react';
    
    const handleChangeJSON = useCallback((json) => {
      console.log('JSON serialised state', json);
    }, []);
    
    const handleChangeHTML = useCallback((html) => {
      console.log('HTML serialised state', html);
    }, []);
    
    return (
      <Remirror manager={manager} autoRender>
        <OnChangeJSON onChange={handleChangeJSON} />
        <OnChangeHTML onChange={handleChangeHTML} />
      </Remirror>
    );
    
  • Updated dependencies []:

remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-05-18

Patch Changes

  • Support font sizes using min, max or clamp. Avoid error if value cannot be parsed.
  • Add support for parsing CSS functions (min,maxandclamp) toextractPixelSize`.
remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-05-18

Patch Changes

  • Add support for parsing CSS functions (min,maxandclamp) toextractPixelSize`.
remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-05-16

Patch Changes

  • Fix open depths in node paste rules.

    When excuting a node paste rule, only reset open depths (openStart and openEnd) when the node paste rule is actually applied and it's for a block node.

    This patch will fix the extra paragraph after pasting text.

  • Updated dependencies []:

remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-05-11

Patch Changes

  • Remove annotation support from yjs-extension

  • Updated dependencies []:

remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-05-05

Patch Changes

  • Update ProseMirror packages.
  • Add support for autoLinkAllowedTLDs which enables the restriction of auto links to a set of Top Level Domains (TLDs). Defaults to the top 50 TLDs (as of May 2022).

    For a more complete list, you could replace this with the tlds or global-list-tlds packages.

    Or to extend the default list you could

    import { LinkExtension, TOP_50_TLDS } from 'remirror/extensions';
    const extensions = () => [
      new LinkExtension({ autoLinkAllowedTLDs: [...TOP_50_TLDS, 'london', 'tech'] }),
    ];
    

    Tweak auto link regex to prevent match of single digit domains (i.e. 1.com) and remove support for hostnames ending with "." i.e. "remirror.io."

  • Updated dependencies []:

remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-05-05

Patch Changes

  • Update ProseMirror packages.
remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-05-03

Patch Changes

  • Insert emoticons when hitting the Enter key (rather than requiring a space)
remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-05-03

Patch Changes

remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-05-03

Patch Changes

remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-04-26

Patch Changes

  • Add a new hook useExtensionEvent. You can use it to add event handlers to your extension. It's simpler and easier to use than the existed useExtension hook.

    It accepts an extension class, an event name and a memoized handler. It's important to make sure that the handler is memoized to avoid needless updates.

    Here is an example of using useExtensionEvent:

    import { useCallback } from 'react';
    import { HistoryExtension } from 'remirror/extensions';
    import { useExtensionEvent } from '@remirror/react';
    
    const RedoLogger = () => {
      useExtensionEvent(
        HistoryExtension,
        'onRedo',
        useCallback(() => log('a redo just happened'), []),
      );
    
      return null;
    };
    
  • Update dependencies.
remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-04-25

Patch Changes

remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-04-25

Patch Changes

remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-04-21

Patch Changes

remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-04-21

Patch Changes

remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-04-20

Patch Changes

  • Prevent italic input rule activation in middle of words
  • Reorder the external plugins of the tables extensions, to avoid highlighting cells while resizing.

    Proposed by Pierre_ on Discord

  • Prevent marks in MentionAtom, to prevent input rules being triggered within the node
  • Fix an error with auto link preventing input rules at the end of a document
  • Create a "stepping stone" for future standardisation of useEvent types

    Add a second parameter to handlers for hover and contextmenu types, so we can eventually standarise the hook to pass event as the first argument.

    const handleHover = useCallback(({ event: MouseEvent }, props: HoverEventHandlerState) => {
      const { getNode, hovering, ...rest } = props;
      console.log('node', getNode(), 'is hovering', hovering, 'rest', rest);
    
      return false;
    }, []);
    
    useEvent('hover', handleHover);
    
remirror - @remirror/[email protected]

Published by github-actions[bot] over 2 years ago

2022-04-20

Patch Changes

  • Reorder the external plugins of the tables extensions, to avoid highlighting cells while resizing.

    Proposed by Pierre_ on Discord

  • Prevent marks in MentionAtom, to prevent input rules being triggered within the node
  • Fix an error with auto link preventing input rules at the end of a document
remirror - [email protected]

Published by github-actions[bot] over 2 years ago

2022-04-06

Patch Changes

Package Rankings
Top 1.07% on Npmjs.org
Related Projects