such as the title, or a technical rookie, really do not know how to introduce properly, please teach!
how should this plug-in be written in vue?
such as the title, or a technical rookie, really do not know how to introduce properly, please teach!
how should this plug-in be written in vue?
recently used in the project
import Editor from 'wangeditor'
export default {
methods: {
initEditor() {
var editor = new Editor('-sharpeditor')
// editor.customConfig.uploadImgShowBase64 = true
// editor.customConfig.uploadImgServer = '/upload'
editor.customConfig.uploadImgServer = '/upload';
editor.customConfig.uploadFileName = 'uploadfile';
editor.customConfig.uploadImgHooks = {
customInsert: function (insertImg, result, editor) {
var url = result.url
insertImg(url)
}
}
editor.customConfig.customAlert = (info) => {
this.$Notice.info({title: info})
}
editor.customConfig.onchange = (html) => {
this.form.content = html
}
editor.create()
}
},
mounted() {
this.initEditor()
}
Next: Transcoding problem
after editing the content in the editor and sending it to the server, when you get the content editing again, the following questions are asked when rendering. What s going on? the code to initialize the editor is as follows initEdi...
as the title shows, when writing a background article management page, the content of the article is edited by popping up dialog, the text is edited using wangEditor, and the creation and configuration code of wangEditor is added in the response method ...
Open the page and get what s in the content, but I don t know how to put the content in this edit box ...
have you ever encountered the problem of not uploading pictures when wangeditor uses base64 to save pictures? the code is as follows <template> <div class="editor-wrap"> <div class="account-editor" ref...
use laravel5.7+wangEditor3.1 to publish the content of the article. add the js code of the article part, and then submit the data in the way of ajax, which is not suitable for this way . <script type="text javascript"> $.ajaxSetup(...
I want to implement an editing operation. When I enter the page, I get the data from the background and insert the data into the rich text box. The data is requested, but the official method editor.txt.html () fails to insert the data into the text box...
methods:{ you must click on the rich text to get the focus of the rich text, var editor = new E (this.$refs.editor1) editor.customConfig.onchange = (html) => { console.log(html) this.editorContent = html }; this.editorCon...