deotalandAi/packages/ui/plugins/editor/index.js

36 lines
861 B
JavaScript

// 编辑器插件主入口
export { default as EditorPlugin } from './EditorPlugin.vue'
// 插件配置信息
export const editorPluginConfig = {
name: '@deotaland/ui-editor',
version: '1.0.0',
dependencies: {
'monaco-editor': '^0.45.0',
'@monaco-editor/loader': '^1.4.0'
}
}
// 支持的语言列表
export const supportedLanguages = [
'javascript', 'typescript', 'vue', 'html', 'css', 'json',
'markdown', 'python', 'java', 'csharp', 'cpp', 'php'
]
// 支持的主题列表
export const supportedThemes = [
'vs', 'vs-dark', 'hc-black', 'hc-light'
]
// 默认配置
export const defaultEditorOptions = {
fontSize: 14,
fontFamily: 'Consolas, "Courier New", monospace',
lineNumbers: 'on',
minimap: { enabled: false },
automaticLayout: true,
scrollBeyondLastLine: false,
wordWrap: 'on',
tabSize: 2,
insertSpaces: true
}