Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const helpers = {
getState: Cast(jest.fn()),
portalContainer: new PortalContainer(),
getTheme: () => defaultRemirrorThemeValue,
};
export const baseExtensions = [
{ extension: new DocExtension(), priority: 2 },
{ extension: new TextExtension(), priority: 2 },
{ extension: new ParagraphExtension(), priority: 2 },
];
export const extensions = [
...baseExtensions,
{ extension: new HistoryExtension(), priority: 2 },
{ extension: new PlaceholderExtension(), priority: 2 },
{ extension: new BoldExtension(), priority: 3 },
{ extension: new ItalicExtension(), priority: 3 },
{ extension: new UnderlineExtension(), priority: 3 },
{ extension: new BlockquoteExtension(), priority: 3 },
];
/**
* Useful for testing
*/
export const ExtensionMap = {
nodes: {
blockquote: new BlockquoteExtension(),
heading: new HeadingExtension(),
},
marks: {
() =>
ExtensionManager.create([
{ priority: 1, extension: new DocExtension({ content: 'block' }) },
{
priority: 1,
extension: new CodeBlockExtension({ defaultLanguage: 'markdown', toggleType: 'codeBlock' }),
},
{ priority: 1, extension: new TextExtension() },
{ extension: new CompositionExtension(), priority: 3 },
{ extension: new HistoryExtension(), priority: 3 },
{ extension: new GapCursorExtension(), priority: 10 },
{ extension: new BaseKeymapExtension(), priority: 10 },
]),
[],