leafer-ui
leafer-ui copied to clipboard
空文本情况设置selectAll,双击进入编辑报错
// #图形编辑器 [打开内部编辑器]
import { App, Text } from 'leafer-ui'
import { InnerEditorEvent } from '@leafer-in/editor' // 导入图形编辑器插件
import '@leafer-in/viewport' // 导入视口插件(可选)
import '@leafer-in/text-editor' // 导入文本编辑插件
const app = new App({
view: window,
editor: {}
})
app.tree.add(Text.one({
width: 200,
height: 20,
placeholder: '请输入文本',
text: '',
editable: true, fill: '#FFE04B', fontSize: 16,
}, 100, 100, 100))
app.editor.on(InnerEditorEvent.BEFORE_OPEN, () => {
app.editor.getInnerEditor('TextEditor').config.selectAll = false
})
收到,谢谢反馈~
已修复,等待新版本发布~