@aligov/components-ace-code-editor

基于ACE的代码编辑器

Usage no npm install needed!

<script type="module">
  import aligovComponentsAceCodeEditor from 'https://cdn.skypack.dev/@aligov/components-ace-code-editor';
</script>

README

ACE 代码编辑器

@aligov/components-ace-code-editor

基于 ACE 的代码编辑器

代码编辑器 API

参数名 说明 必填 类型 默认值 备注
mode 语言类型 string
theme 主题 string
id 唯一 id string
onChange 内容改变回调 function
value string
fontSize 字体大小 number 14

其他值见 https://github.com/securingsincity/react-ace/blob/master/docs/Ace.md

Diff编辑器 API

参数名 说明 必填 类型 默认值 备注
mode 语言类型 string
theme 主题 string
id 唯一 id string
value Array ["", ""]
fontSize 字体大小 number 14
height 高度 string 500px
width 宽度 string 500px

其他值见 https://github.com/securingsincity/react-ace/blob/master/docs/Diff.md