Vue js 中的免费文本编辑器

问题描述 投票:0回答:1

在 vue js 中尝试过 (vue-2) 文本编辑器。它在本地工作,当我尝试在 Prod Env 中移动相同的代码时,已使用以下命令 npmaudit 执行了漏洞检查。执行漏洞检查后,vue-2 编辑器在本地无法运行。请指导我使用 vue js 中支持所有环境的免费文本编辑器。

   Have tried the below code, which is working in local, before checking the vulnerability.  Please check it and let me know. 
          <script>  
           import { VueEditor } from "vue2-editor";

            export default {
              name: "fp-extension-createblock",
              components: {    
              VueEditor,
            },
            data() {
              return {
                 content: ''
               };
            },
            mounted() {
            },
            methods: { }
           };
         </script>
         <template>
            <vue-editor v-model="block.content"></vue-editor>
         </template>
        

谢谢,

vue.js vue-component text-editor
1个回答
1
投票

切换到 vue-quill-editor:如果您仍然遇到 vue-2-editor 问题,您可以考虑切换到 Vue.js 的其他文本编辑器组件。一种流行的替代方案是 vue-quill-editor,它得到积极维护并拥有良好的支持。

首先,安装 vue-quill-editor:

npm install vue-quill-editor

那么,

 <template>
  <div>
    <quill-editor v-model="content"></quill-editor>
  </div>
</template>

<script>
  import { quillEditor } from 'vue-quill-editor';

  export default {
    components: {
      quillEditor,
    },
    data() {
      return {
        content: '',
      };
    },
  };
</script>
© www.soinside.com 2019 - 2024. All rights reserved.