当前位置:网站首页>Wangeditor (@4.7.15) - lightweight rich text editor
Wangeditor (@4.7.15) - lightweight rich text editor
2022-07-28 07:04:00 【SheepOnTheCloud】
Effect display

Official website :https://www.wangeditor.com/
Use steps
vue2
Introduce plug-ins into the page ->data Define the mount object in , Receive plug-in method -> Mount the plug-in to the specified element -> adopt .tex.html Method to set the data -> adopt change Callback to receive data
download
npm i wangeditorintroduce
import E from 'wangeditor'Define mount elements
<div id="editor" @input="Fchange"></div>data Initialize container in
editor: null,Instantiate the rich text plug-in
this.editor = new E('#editor')Create and pass in settings rich text content
this.editor.create() this.editor.txt.html('hello word!')Listen to the content of rich text ( It seems unable to monitor in both directions )
Fchange(e) { console.log(e.target.innerHTML) //this.OpageData.OselectTrue.content = e.target.innerHTML },
summary
边栏推荐
猜你喜欢
随机推荐
Joern的代码使用-devign
多进程(多核运算)Multiprocessing
MOOC Weng Kai C language fourth week: further judgment and circulation: 1. Logical types and operations 2. Judgment of cascading and nesting
How to describe a bug and the definition and life cycle of bug level
JS string method Encyclopedia
shell脚本——编程条件语句(条件测试、if语句、case分支语句、echo用法、for循环、while循环)
Test interview questions collection (V) | automated testing and performance testing (with answers)
DHCP principle and configuration
Applet creation component
Shell script - "three swordsmen" awk command
[learning notes] tool
About gcc:multiple definition of
NFS 共享存储服务
Technology sharing | how to do Assertion Verification in interface automated testing?
DHCP原理与配置
MOOC Weng Kai C language week 7: array operation: 1. array operation 2. Search 3. preliminary sorting
OSI seven layer model
Bond mode configuration
Monotonic queue, Luogu p1886 sliding window
Life cycle (process) of software testing









