CodeMirror 6 的自定义主题库.
@fsegurai/codemirror-theme-android-studio 是CodeMiror 6编辑器的主题,使其视觉接触并适应不同的编码风格和用户偏好.
目录
安装
@fsegurai/codemirror-主题与机器人-studio
添加 @fsegurai/codemirror-theme-android-studio 与代码Mirror 6一起到您的 package.json 使用下列命令.
bun install @fsegurai/codemirror-theme-android-studio codemirror@^6.0.0 --save
使用主题
从软件包中导入相应的主题,并将其应用到您的 CodeMiror 实例中,如下所示 .
import { EditorView, basicSetup } from 'codemirror'
import { markdown } from '@codemirror/lang-markdown'
import { androidStudio } from '@fsegurai/codemirror-theme-android-studio'
let editor = new EditorView({
doc: '# Hello World',
extensions: [
basicSetup,
markdown(),
androidStudio
],
parent: document.body
})
读取 CodeMor 文档 关于主题的更详细信息.
可用主题
演示应用
请检查date=中的日期值 (帮助) 演示 : https://fsegurai.github.io/codemirror-主题。 。 。 .
本地设置演示:
git clone https://github.com/fsegurai/codemirror-themes.git
bun install
bun start
这将服务于本地的应用程序 http://[:1]:8000 (中文(简体) )。 。 。 .
许可证
许可证根据 麻省理工学院。 。 。 .