How to use the @remirror/react-renderer.mapProps function in @remirror/react-renderer

To help you get started, we’ve selected a few @remirror/react-renderer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifiokjr / remirror / @remirror / react-ssr / src / remirror-ssr.tsx View on Github external
export const RemirrorSSR = ({
  attributes,
  manager,
  state,
  editable,
}: RemirrorSSRProps) => {
  const outerProps = mapProps(attributes);
  const ssrElement = ReactSerializer.fromExtensionManager(manager).serializeFragment(state.doc.content);
  const transformedElement = manager.ssrTransformer(ssrElement);
  return (
    <div>
      {transformedElement}
    </div>
  );
};

@remirror/react-renderer

Render the JSON output from your remirror editor as a react component

MIT
Latest version published 5 months ago

Package Health Score

82 / 100
Full package analysis