Skip to content

markdown 组件的暗色主题怎么设置[Question]  #159

Open
@jiehwa

Description

🧐 问题描述 | Proposed Solution

如标题,使用了如下代码,设置
import { Markdown } from '@ant-design/pro-editor';

<ConfigProvider
        theme={{
          // 1. 单独使用暗色算法
          algorithm: theme.darkAlgorithm,
          // 2. 组合使用暗色算法与紧凑算法
          // algorithm: [theme.darkAlgorithm, theme.compactAlgorithm],
        }}
      >
        <p> 测试antd主题</p>
        <Title>h1. Ant Design</Title>
        <Button>antd主题按钮</Button>
        <Markdown>{`# This is an H1
        ## This is an H2
        ### This is an H3
        #### This is an H4
        ##### This is an H5`}
                </Markdown>
      </ConfigProvider>

antd的主题设置成了暗色背景,被 antd 组件包裹的 Button 和 Title 是变成了暗色的主题,但是 markdown 并没有变过来,markdown 如果想要也变成暗色,该如何设置?

📝 补充信息 | Additional Information

No response

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions