当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Test interview questions collection (II) | test tools (with answers)
Applets: lifecycle
MOOC翁恺C语言第八周:指针与字符串:1.指针2.字符类型3.字符串4.字符串计算
Custom component -- data listener
Test interview questions collection (I) | common required questions and procedures of software testing (with answers)
Upload and download files from Ubuntu server
OSI seven layer model
Tcp/ip five layer model
Firewall - iptables firewall (four tables and five links, firewall configuration method, detailed explanation of matching rules)
Monotonic queue, Luogu p1886 sliding window
Es6--- > arrow function, class, modularization
Network - network layer
[learning notes] thread creation
DOM - Events
Pku-2739-sum of constructive prime numbers
Vmware workstation configuration net mode
Servlet
NFS shared storage service
MOOC Weng Kai C language week 6: arrays and functions: 1. Arrays 2. Definition and use of functions 3. Parameters and variables of functions 4. Two dimensional arrays
Canvas drawing 1









