2. Ios requires compatibility -webkit-user-select:text;

The action is the same as innerHTML;

<view 
    class="texta" 
    ref="texta" 
    style="-webkit-user-select:text;" 
    contentEditable="true" 
    v-html="myTextarea">
</view>
Copy the code
 //this.$refs.texta.$el.innerhtml
 encodeURIComponent(this.$refs.texta.$el.innerHTML);// Upload it to the back end in urL-encoded format to prevent dependency injection
Copy the code