Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [Feature]: Markdown MD组件支持暴露语言类名。 #1868

Open
aolinpk opened this issue May 30, 2024 · 2 comments
Open

✨ [Feature]: Markdown MD组件支持暴露语言类名。 #1868

aolinpk opened this issue May 30, 2024 · 2 comments
Labels
enhancement Feature enhancement

Comments

@aolinpk
Copy link
Contributor

aolinpk commented May 30, 2024

What problem does this feature solve

目前Markdown MD没有暴露语言类名。如果用户使用自定义的语言将无法捕获为其修改样式。
官方有提供API
image

What does the proposed API look like

生成编辑器的时候带上对应属性即可

@aolinpk
Copy link
Contributor Author

aolinpk commented Jun 3, 2024

默认的配置里面实际上内置了。只需要在xssWhiteList的白名单开启对应的标签和需要的数据即可。

:custom-xss-rules="customRenderRules"

    const customRenderRules = ref([
      {
        key: 'code',
        value: ['class'],
      }
    ]);

@aolinpk
Copy link
Contributor Author

aolinpk commented Jun 3, 2024

用法直接可以后续用来做参考。暂时不提交暴露全部设置的PR

@fu050409 fu050409 added the enhancement Feature enhancement label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature enhancement
Projects
None yet
Development

No branches or pull requests

2 participants