I chose WangEditor because I need a rich text editor on my phone and because it is not very easy to operate on my phone

There was a problem in using it, that is, when I clicked the editor in ios system, the keyboard also popped up, but the editor could not input or edit, and there was a cursor, so I searched online for relevant solutions, but failed to solve several. Finally, I tried one, but it could be solved

Contenteditable Query results: www.runoob.com/tags/att-gl…

Dom <div ref="edit" :contenteditable="contenteditable" class="text"></div> Attach the instantiation code to this.editor = new E(this.$refs.toolbar, this.$refs.edit) // to specify whether the content of the element is editable. The dom becomes an editable element, so that the focus border is displayed when we click on it. Add the following code to edit div *{-webkit-user-select:text; outline: none; }Copy the code

There’s also a problem, the autofocus problem, the phone opens the page, the keyboard automatically pops up and we go to the source code and we go to this line and we comment it out and we’re done

this.selection.restoreSelection()
Copy the code

There is another problem. When wangEditor was on the mobile terminal, it was very inconvenient for the cursor to run to the position you clicked when clicking to edit the content. At first, I thought it was the problem with the version 3 I used, but then I changed it to 4, but it still didn’t work

Reference address: blog.csdn.net/weixin_4364…