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

还是关于主题参数配置 #892

Open
foxfire881 opened this issue Sep 5, 2024 · 4 comments
Open

还是关于主题参数配置 #892

foxfire881 opened this issue Sep 5, 2024 · 4 comments

Comments

@foxfire881
Copy link

请问mainTheme、codeBlockTheme、inlineCodeTheme、toolbarTheme这些参数的选项,只能从上面themeList列表里面选择吗?例如代码主题里面有one-dark、coy这两个主题,但是themeList里面并没有这两个主题,这要怎么操作?如果不是从themeList里面选,其他的参数为什么没有一个list?

themeSettings: {
    themeList: [
      { className: 'default', label: '默认' },
      { className: 'dark', label: '暗黑' },
      { className: 'light', label: '明亮' },
      { className: 'green', label: '清新' },
      { className: 'red', label: '热情' },
      { className: 'violet', label: '淡雅' },
      { className: 'blue', label: '清幽' },
    ],
    mainTheme: 'light',
    codeBlockTheme: 'default',
    inlineCodeTheme: 'red', // red or black
    toolbarTheme: 'dark', // light or dark 优先级低于mainTheme
  },
@sunsonliu
Copy link
Collaborator

哦哦。。themeList只是编辑器主题的list,是可以自定义配置的,mainTheme的取值范围是从themeList里取

codeBlockTheme对应的list是:

  • default
  • dark
  • one-light
  • one-dark
  • vs-light
  • vs-dark
  • solarized-light
  • tomorrow-night
  • okaidia
  • twilight
  • coy

因为codeBlock主题的list目前不支持自定义,所以没有在themeSettings里体现出来

@foxfire881
Copy link
Author

codeblock和main主题什么时候可以分离出来呀?感觉现在设置还是太复杂了,之前用过的所有的blog、论坛、cms、wiki等等,切换主题时都是theme文件夹下扫描出来各种主题文件包列表,然后从中选择一个就切换了。如果不想要某些主题,只用把对应的主题包从目录中删除就行了,下拉列表扫描主题包时也没有相关选项了。cherry这把主题包也打包在本体里,配置使用起来还是不太方便,例如coy那个主题很丑,不想要想删除它,每次还得跟着主线修改源码。

@foxfire881
Copy link
Author

分离出来之后,就不用给这些配置选项列表了,直接扫描分离出来的目录获取列表就行了

@sunsonliu
Copy link
Collaborator

额,不太一样,扫描目录的动作对前端组件来说是比较奇怪的,目前还是会继续保持当前配置式的方式。至于codeBlockThemeList的配置,后面会排期搞哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants