wangeditor-team / wangeditor-for-vue Goto Github PK
View Code? Open in Web Editor NEWwangEditor v5 Vue2 component
Home Page: https://www.wangeditor.com/
wangEditor v5 Vue2 component
Home Page: https://www.wangeditor.com/
可以删除editor.children中的某一个选项吗
hope to add a custom image upload method attribute to defaultConfig
prop like v4 customUploadImg
由于现有项目锁定2.6.10,不能再升级(会有 slot 写法变更问题)。
希望peerDependencies 将vue版本下调到2.6,否则安装时依赖冲突。
两端对齐没有效果
// 声明编辑器实例,必须用 shallowRef
const editorRefI = shallowRef()
const editorRefII = shallowRef()
const editorConfig: Partial = { // TS 语法
MENU_CONF: { }
}
editorConfig.MENU_CONF['uploadImage'] = {
server: '/api/upload-img',
// server: '/api/upload-img-10s', // test timeout
// server: '/api/upload-img-failed', // test failed
// server: '/api/xxx', // test 404
timeout: 5 * 1000, // 5s
fieldName: 'custom-fileName',
meta: { token: 'xxx', a: 100 },
metaWithUrl: true, // join params to url
headers: { Accept: 'text/x-json' },
maxFileSize: 10 * 1024 * 1024, // 10M
base64LimitSize: 5 * 1024, // insert base64 format, if file's size less than 5kb
}
const handleCreatedI = (editor: any) => {
editor.config = editorConfig
editorRefI.value = editor
};// 记录 editor 实例,重要!
const handleCreatedII = (editor: any) => editorRefII.value = editor;// 记录 editor 实例,重要!
引入到微前端(wujie)子应用中,初始化渲染或操作就会异常。异常内容如下:
控制台报错
Uncaught Error: Cannot resolve a Alate range form DOM range:
at Object.toSlateRange(:6040:16050)
at :6040:66545
at HTMLDocument.(:6040:66632)
at p(:6008:102969)
at h(:6008:103025)
at HTMLDocument.m(:6008:103347)
工具栏禁用不可操作了
#初始化自动焦点问题
当前最新版本设置,foucus=false还是会自动设置焦点,导致键盘弹出
报错信息为 : 无法获取或null引用的属性“set”, at node_modules/@wangeditor/editor/dist/index.esm.js 199:29
关联 issue,否则用户安装完 @wangeditor/editor-for-vue
还需要单独安装 @wangeditor/editor
,带来额外的使用成本。对于小白用户,也容易出现因为依赖安装不够,导致意外的报错。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.