Skip to content

Commit

Permalink
feat: 在Markdown编辑器中添加测试环境下的节点列表更新逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Jan 16, 2025
1 parent 7515825 commit fbfeaad
Show file tree
Hide file tree
Showing 2 changed files with 11,579 additions and 10 deletions.
6 changes: 6 additions & 0 deletions src/MarkdownEditor/demos/rerender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,12 @@ export default () => {
const list = defaultValue.split('');
const html = document.getElementById('container');
const run = async () => {
if (process.env.NODE_ENV === 'test') {
instance.current?.store.updateNodeList(
parserMarkdown(defaultValue).schema,
);
return;
}
for await (const item of list) {
md += item;
await new Promise((resolve) => {
Expand Down
Loading

1 comment on commit fbfeaad

@vercel
Copy link

@vercel vercel bot commented on fbfeaad Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.