How to use the @remirror/core-extensions.History function in @remirror/core-extensions

To help you get started, we’ve selected a few @remirror/core-extensions 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 / src / components / __tests__ / remirror-placeholder.spec.tsx View on Github external
import { Remirror } from '../..';
import { InjectedRemirrorProps } from '../../types';

const label = 'Remirror editor';
const handlers = {
  onChange: jest.fn(),
  onBlur: jest.fn(),
  onFocus: jest.fn(),
  onFirstRender: jest.fn(),
};
const placeholderText = 'Start typing...';
const extensions = [
  { extension: new Doc(), priority: 2 },
  { extension: new Text(), priority: 2 },
  { extension: new Paragraph(), priority: 2 },
  { extension: new History(), priority: 2 },
];
// const placeholderExtension = { extension: new Placeholder(), priority: 2 }

test('should not fail without the placeholder extension', () => {
  expect(() =>
    render(
      
        {() =&gt; <div>}
      ,
    ),
  ).not.toThrowError();
});

test('should display a placeholder when the content is empty', () =&gt; {
  const { baseElement, getByLabelText } = render(
    </div>