Skip to content

TextEditor ​

文本编辑,双击元素进入编辑状态。

关键属性 ​

config: ITextEditorConfig ​

文本编辑器配置。

可监听 InnerEditorEvent.BEFORE_OPEN 事件,提前配置 app.editor.innerEditor.config。

ts
interface ITextEditorConfig {
  selectAll: boolean // 是否自动全选文本,默认为true
}

editDom: HTMLDivElement ​

编辑文本框,覆盖在画布上的可编辑 dom 元素(用来临时代替文本)。

继承 ​

InnerEditor ​

示例 ​

正常文本 ​

倾斜加粗 ​

转为小写 ​

多行文本 ​

改变字体 ​

字间距 ​

行高 ​

居中对齐 ​

裁剪文本 ​

转为大写 ​

Released under the MIT License.