首页 > 其他 > 详细

vue中使用ckeditor

时间:2017-10-24 01:03:17      阅读:1349      评论:0      收藏:0      [点我收藏+]

1.第一步首先去ckeditor官网去下载editor文件,这里以ckeditor4为例

  首先在index.html里引入js代码

 <script type="text/javascript" src="/static/ckeditor/ckeditor.js"></script>

2然后在webpack.base.conf.js里编写

.技术分享

3.在需要使用的模块里引入

<template>
  <div id="video">
video
<textarea id="editor" rows="10" cols="80"></textarea>

  </div>
</template>
<script>
import CKEDITOR from "CKEDITOR"
  export default{
    name:video,
    mounted() {
      CKEDITOR.replace("editor", {height: "300px", width: "100%", toolbar: "Full"});
      var editor = CKEDITOR.instances.editor2;
    },
  }
</script>

<style>

</style>

然后保存运行你的vue项目,即可查看到

技术分享

 

vue中使用ckeditor

原文:http://www.cnblogs.com/ldlx-mars/p/7719815.html

(2)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!