Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaanj committed Apr 25, 2024
1 parent 6b05de7 commit f21470c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ exports[`serialization should serialize markdown 1`] = `
Unlikely to most Rich-Text editors, Slate uses JSON data model instead of HTML, which allows it to embed any entities, like arbitrary React components. For example, this checkbox, is a custom react component (check [source here](https://github.com/epam/UUI/blob/main/uui-editor/src/plugins/toDoListPlugin/ToDoItem.tsx)):
An item
\`We include HTML to Slate JSON converter, which is also used to convert pasted HTML.\`
We include HTML to Slate JSON converter, which is also used to convert pasted HTML.
## Out of the box components
### Basic layout
Expand Down
6 changes: 3 additions & 3 deletions uui-editor/src/__tests__/serialization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
codeBlockPlugin,
} from '../plugins';
import { defaultPlugins } from '../defaultPlugins';
import { createPlateEditor } from '@udecode/plate-core';
import { createPlateEditor, PlatePlugin } from '@udecode/plate-core';
import { createTempEditor } from '../helpers';
import { expectedSlateValue, inputMarkdowValue, editorValueMock } from './data/md-serialization';

Expand All @@ -35,9 +35,9 @@ export const createClipboardData = (html: string, rtf?: string): DataTransfer =>
getData: (format: string) => (format === 'text/html' ? html : rtf),
} as any);

const plugins = [
const plugins: PlatePlugin[] = [
...baseMarksPlugin(),
...defaultPlugins,
baseMarksPlugin(),
headerPlugin(),
colorPlugin(),
superscriptPlugin(),
Expand Down
4 changes: 2 additions & 2 deletions uui-editor/src/plugins/baseMarksPlugin/baseMarksPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
PlateEditor, PlatePluginComponent, isMarkActive,
PlateEditor, PlatePluginComponent, isMarkActive, PlatePlugin,
} from '@udecode/plate-common';
import React from 'react';

Expand Down Expand Up @@ -105,7 +105,7 @@ export function UnderlineButton({ editor }: IToolbarButton) {
);
}

export const baseMarksPlugin = () => ([
export const baseMarksPlugin = (): PlatePlugin[] => ([
boldPlugin(),
underlinePlugin(),
italicPlugin(),
Expand Down

0 comments on commit f21470c

Please sign in to comment.