Skip to content

Commit

Permalink
feat: 在Markdown编辑器预览中添加sup和sub标签支持
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Feb 20, 2025
1 parent 06d6514 commit e232e3e
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MarkdownEditor/demos/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const defaultValue = `<!-- {"MarkdownType": "report", "id": "8", "section_ids":
## html
<font color="red">腾讯科技(深圳)有限公司</font>
<sup>腾讯科技(深圳)有限公司</sup>
<sub>腾讯科技(深圳)有限公司</sub>
## 创始人
Expand Down
130 changes: 130 additions & 0 deletions tests/demo/__snapshots__/src/MarkdownEditor/demos/preview.snap
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,136 @@
</span>
</span>
</span>
<span
data-slate-node="text"
>
<span
class=" "
data-be="text"
data-slate-leaf="true"
draggable="false"
>
<span
data-slate-string="true"
>


</span>
</span>
</span>
<span
data-slate-node="text"
>
<span
class=" ant-md-editor-content-m-html"
data-be="text"
data-slate-leaf="true"
draggable="false"
>
<span
data-slate-string="true"
>
&lt;sup&gt;
</span>
</span>
</span>
<span
data-slate-node="text"
>
<span
class=" "
data-be="text"
data-slate-leaf="true"
draggable="false"
>
<span
data-slate-string="true"
>
腾讯科技(深圳 )有限公司
</span>
</span>
</span>
<span
data-slate-node="text"
>
<span
class=" "
data-be="text"
data-slate-leaf="true"
draggable="false"
>
<span
data-slate-string="true"
>
&lt;/sup&gt;
</span>
</span>
</span>
<span
data-slate-node="text"
>
<span
class=" "
data-be="text"
data-slate-leaf="true"
draggable="false"
>
<span
data-slate-string="true"
>


</span>
</span>
</span>
<span
data-slate-node="text"
>
<span
class=" ant-md-editor-content-m-html"
data-be="text"
data-slate-leaf="true"
draggable="false"
>
<span
data-slate-string="true"
>
&lt;sub&gt;
</span>
</span>
</span>
<span
data-slate-node="text"
>
<span
class=" "
data-be="text"
data-slate-leaf="true"
draggable="false"
>
<span
data-slate-string="true"
>
腾讯科技(深圳 )有限公司
</span>
</span>
</span>
<span
data-slate-node="text"
>
<span
class=" "
data-be="text"
data-slate-leaf="true"
draggable="false"
>
<span
data-slate-string="true"
>
&lt;/sub&gt;
</span>
</span>
</span>
</div>
<h2
class="ant-md-editor-drag-el"
Expand Down

1 comment on commit e232e3e

@vercel
Copy link

@vercel vercel bot commented on e232e3e Feb 20, 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.