Skip to content

deserialize too slow #4703

@weiquabit

Description

@weiquabit

Description

const data  = ['string',.....]  ( length >=1500 )
const value = data.join('\n')

  const editor = usePlateEditor({
    plugins: EditorKit,
    value: (editor) => {
      const nodes = editor.getApi(MarkdownPlugin).markdown.deserialize(value);
      return nodes;
    },
  });

It took about 20 seconds too slow when the data is large.
what is a way to quickly deserialize?
Do I still need to deserialize my string if it is markdown syntax?

Reproduction URL

No response

Reproduction steps

const data  = ['string',.....]  ( length >=1500 )
const value = data.join('\n')

  const editor = usePlateEditor({
    plugins: EditorKit,
    value: (editor) => {
      const nodes = editor.getApi(MarkdownPlugin).markdown.deserialize(value);
      return nodes;
    },
  });
`
It took about 20 seconds too slow when the data is large.
what is a way to quickly deserialize?
Do I still need to deserialize my string if it is markdown syntax?

Plate version

51.0.0

Slate React version

19.2.0

Screenshots

Logs

Browsers

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions