From c4aac97127dc79b4024e741d92f926b8f8fdf866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=BC=BA?= Date: Thu, 12 Jun 2025 14:43:00 +0800 Subject: [PATCH] update seafile-editor version --- frontend/package-lock.json | 9 +++++---- frontend/package.json | 2 +- frontend/src/pages/plain-markdown-editor/index.js | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d7d5a9622d..f37d9444f6 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -18,7 +18,7 @@ "@seafile/react-image-lightbox": "4.0.2", "@seafile/resumablejs": "1.1.16", "@seafile/seafile-calendar": "0.0.28", - "@seafile/seafile-editor": "2.0.10", + "@seafile/seafile-editor": "2.0.11", "@seafile/seafile-sdoc-editor": "2.0.9", "@seafile/stldraw-editor": "1.0.1", "@uiw/codemirror-extensions-langs": "^4.19.4", @@ -5690,9 +5690,10 @@ } }, "node_modules/@seafile/seafile-editor": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@seafile/seafile-editor/-/seafile-editor-2.0.10.tgz", - "integrity": "sha512-i32+d/xTday459hiCxEoDGtGWQrpiTQE2vuCATXSz6TLQgN+GGioF320qRHIaTKsLO08MxI9i59sCnU5fC2lBA==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@seafile/seafile-editor/-/seafile-editor-2.0.11.tgz", + "integrity": "sha512-u8dkjrvBxrwU2FsyyR8k9MVfGviPknvdCke6PYMHdkO/pp3ZJbA4iRQXTrGao8TUZymC+nXiOHYJQqcunD46tA==", + "license": "Apache-2.0", "dependencies": { "@seafile/react-image-lightbox": "4.0.2", "classnames": "2.3.2", diff --git a/frontend/package.json b/frontend/package.json index d1a91af26d..cb9cc87c0e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -13,7 +13,7 @@ "@seafile/react-image-lightbox": "4.0.2", "@seafile/resumablejs": "1.1.16", "@seafile/seafile-calendar": "0.0.28", - "@seafile/seafile-editor": "2.0.10", + "@seafile/seafile-editor": "2.0.11", "@seafile/seafile-sdoc-editor": "2.0.9", "@seafile/stldraw-editor": "1.0.1", "@uiw/codemirror-extensions-langs": "^4.19.4", diff --git a/frontend/src/pages/plain-markdown-editor/index.js b/frontend/src/pages/plain-markdown-editor/index.js index de6ef36414..533ff573d9 100644 --- a/frontend/src/pages/plain-markdown-editor/index.js +++ b/frontend/src/pages/plain-markdown-editor/index.js @@ -2,7 +2,7 @@ import React, { useState, useRef, useCallback, useLayoutEffect, useEffect } from import { createRoot } from 'react-dom/client'; import isHotkey from 'is-hotkey'; import PropTypes from 'prop-types'; -import { processor } from '@seafile/seafile-editor'; +import { processorWithMath } from '@seafile/seafile-editor'; import SeafileCodeMirror from './code-mirror'; import HeaderToolbar from '../markdown-editor/header-toolbar/header-toolbar'; import editorApi from '../markdown-editor/editor-api'; @@ -68,7 +68,7 @@ const PlainMarkdownEditor = (props) => { const setContent = useCallback((markdownContent) => { setEditorValue(markdownContent); - processor.process(markdownContent, (error, vfile) => { + processorWithMath.process(markdownContent, (error, vfile) => { var html = String(vfile); setPreviewValue(html); });