md-editor-v3 2.9.0-beta.4 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -771,7 +771,7 @@ const onUploadImg = async (files, callback) => {
771
771
  --md-scrollbar-bg-color: if(@isDark, #0f0f0f, #e2e2e2);
772
772
  --md-scrollbar-thumb-color: if(@isDark, #2d2d2d, #0000004d);
773
773
  --md-scrollbar-thumb-hover-color: if(@isDark, #3a3a3a, #00000059);
774
- --md-scrollbar-thumb-avtive-color: if(@isDark, #3a3a3a, #00000061);
774
+ --md-scrollbar-thumb-active-color: if(@isDark, #3a3a3a, #00000061);
775
775
  }
776
776
 
777
777
  .md-editor {
@@ -231,7 +231,7 @@ const staticTextDefault = {
231
231
  }
232
232
  }
233
233
  };
234
- const mermaidUrl = `${cdnBase}/mermaid/10.0.2/mermaid.esm.min.mjs`;
234
+ const mermaidUrl = `${cdnBase}/mermaid/9.4.0/mermaid.min.js`;
235
235
  const katexUrl = {
236
236
  js: `${cdnBase}/KaTeX/0.16.3/katex.min.js`,
237
237
  css: `${cdnBase}/KaTeX/0.16.3/katex.min.css`
@@ -5858,9 +5858,8 @@ const useMarked = (props) => {
5858
5858
  const katexInited = useKatex(props, marked);
5859
5859
  const mermaidData = useMermaid(props);
5860
5860
  const html = ref(props.sanitize(marked(props.value || "", { renderer })));
5861
- let unresolveHtml = "";
5862
5861
  const asyncReplace = async () => {
5863
- unresolveHtml = props.sanitize(marked(props.value || "", { renderer }));
5862
+ let unresolveHtml = props.sanitize(marked(props.value || "", { renderer }));
5864
5863
  const taskResults = await Promise.allSettled(mermaidTasks);
5865
5864
  taskResults.forEach((r, index2) => {
5866
5865
  if (r.status === "fulfilled") {
@@ -5871,14 +5870,14 @@ const useMarked = (props) => {
5871
5870
  });
5872
5871
  mermaidIds = [];
5873
5872
  mermaidTasks = [];
5873
+ return unresolveHtml;
5874
5874
  };
5875
- const markHtml = debounce(() => {
5875
+ const markHtml = debounce(async () => {
5876
5876
  heads.value = [];
5877
- asyncReplace().finally(() => {
5878
- html.value = unresolveHtml;
5879
- bus.emit(editorId, "buildFinished", html.value);
5880
- props.onHtmlChanged(html.value);
5881
- });
5877
+ const resolveHtml = await asyncReplace();
5878
+ html.value = resolveHtml;
5879
+ bus.emit(editorId, "buildFinished", html.value);
5880
+ props.onHtmlChanged(html.value);
5882
5881
  }, (editorConfig == null ? void 0 : editorConfig.renderDelay) !== void 0 ? editorConfig == null ? void 0 : editorConfig.renderDelay : previewOnly ? 0 : 500);
5883
5882
  watch([
5884
5883
  highlightInited,