We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
导出时,文字在编辑状态时,文字会全部消失
`import { Leafer, Group, Rect, DropEvent, DragEvent, Text, App } from 'leafer-ui' import '@leafer-in/editor' // 导入图形编辑器插件 import '@leafer-in/text-editor' const app = new App({ view: window, editor: {} // 会自动创建 editor实例、tree层、sky层 })
const leafer = app.tree
const text = Text.one({ text: 'Action is the proper fruit of knowledge.', editable: true, fill: '#FFE04B', fontSize: 16, }, 100, 100, 100)
const rect = new Rect({ width: 100, height: 100, editable: true, fill: [ { type: 'image', url: 'https://cdn.pixabay.com/photo/2022/08/19/13/31/woman-7396948_1280.jpg', mode: 'stretch', opacity: 1 }] })
leafer.add(rect) leafer.add(text)
setTimeout(() => { leafer.export('screenshot.png') }, 10000)import { Leafer, Group, Rect, DropEvent, DragEvent, Text, App } from 'leafer-ui' import '@leafer-in/editor' // 导入图形编辑器插件 import '@leafer-in/text-editor' const app = new App({ view: window, editor: {} // 会自动创建 editor实例、tree层、sky层 })
setTimeout(() => { leafer.export('screenshot.png') }, 10000)`
The text was updated successfully, but these errors were encountered:
谢谢反馈,编辑状态确实隐藏了原始文本(显示的是一个dom文本),下个版本可以优化一下导出~
Sorry, something went wrong.
No branches or pull requests
导出时,文字在编辑状态时,文字会全部消失
`import { Leafer, Group, Rect, DropEvent, DragEvent, Text, App } from 'leafer-ui'
import '@leafer-in/editor' // 导入图形编辑器插件
import '@leafer-in/text-editor'
const app = new App({
view: window,
editor: {} // 会自动创建 editor实例、tree层、sky层
})
const leafer = app.tree
const text = Text.one({
text: 'Action is the proper fruit of knowledge.',
editable: true, fill: '#FFE04B', fontSize: 16,
}, 100, 100, 100)
const rect = new Rect({
width: 100,
height: 100,
editable: true,
fill: [
{
type: 'image',
url: 'https://cdn.pixabay.com/photo/2022/08/19/13/31/woman-7396948_1280.jpg',
mode: 'stretch',
opacity: 1
}]
})
leafer.add(rect)
leafer.add(text)
setTimeout(() => {
leafer.export('screenshot.png')
}, 10000)import { Leafer, Group, Rect, DropEvent, DragEvent, Text, App } from 'leafer-ui'
import '@leafer-in/editor' // 导入图形编辑器插件
import '@leafer-in/text-editor'
const app = new App({
view: window,
editor: {} // 会自动创建 editor实例、tree层、sky层
})
const leafer = app.tree
const text = Text.one({
text: 'Action is the proper fruit of knowledge.',
editable: true, fill: '#FFE04B', fontSize: 16,
}, 100, 100, 100)
const rect = new Rect({
width: 100,
height: 100,
editable: true,
fill: [
{
type: 'image',
url: 'https://cdn.pixabay.com/photo/2022/08/19/13/31/woman-7396948_1280.jpg',
mode: 'stretch',
opacity: 1
}]
})
leafer.add(rect)
leafer.add(text)
setTimeout(() => {
leafer.export('screenshot.png')
}, 10000)`
The text was updated successfully, but these errors were encountered: