imzbf / md-editor-v3

Markdown editor for vue3, developed in jsx and typescript, dark theme、beautify content by prettier、render articles directly、paste or clip the picture and upload it...
https://imzbf.github.io/md-editor-v3
MIT License
1.51k stars 144 forks source link

tags "<sup></sup>" is not show, when use MdPreview #613

Closed happywilma closed 1 month ago

happywilma commented 1 month ago

Describe the issue

<template>
  <MdPreview
    :modelValue="internalContent"
    :showCodeRowNumber="false"
    codeTheme="github"
    :codeStyleReverse="true"
    :formatCopiedText="formatCopiedText"
    :codeFoldable="false"
  />
</template>

<script setup lang="ts">
import { ref, watch } from "vue";
// 预览模式
import { MdPreview, config } from "md-editor-v3";
import "md-editor-v3/lib/preview.css";
import "md-editor-v3/lib/style.css";
import markdownItSup from "markdown-it-sup";

config({
  markdownItConfig(mdit, options: {editorId: "#dlqwepwqepwq"}) {
    mdit.use(markdownItSup, {
      permalink: true
    });
  }
});
</script>

I haved installed markdown-it-sup. no errors, but didn't show rightly.

Procedure version

4.15.6

Reproduction link

No response

imzbf commented 1 month ago

internalContent variable is not defined

ChinaSteven commented 1 month ago

internalContent variable is not defined

不好意思,找到问题了。全局重置了样式...取消重置就好了