Fix markdown preview breaks and statics image count
This commit is contained in:
@@ -5,6 +5,7 @@ import React, { useState, useEffect, useRef, useCallback } from 'react';
|
||||
import MDEditor from '@uiw/react-md-editor';
|
||||
// 引入中文指令集
|
||||
import { getCommands, getExtraCommands } from '@uiw/react-md-editor/commands-cn';
|
||||
import remarkBreaks from 'remark-breaks';
|
||||
// 导入编辑器样式
|
||||
import '@uiw/react-md-editor/markdown-editor.css';
|
||||
import {
|
||||
@@ -415,7 +416,7 @@ const CreatePost: React.FC = () => {
|
||||
commands={commands}
|
||||
extraCommands={getExtraCommands()}
|
||||
previewOptions={{
|
||||
remarkPlugins: [remarkTagPlugin],
|
||||
remarkPlugins: [remarkTagPlugin, remarkBreaks],
|
||||
components: {
|
||||
a: ({ node, ...props }) => {
|
||||
if (props.href && props.href.startsWith('tag:')) {
|
||||
|
||||
Reference in New Issue
Block a user