redactor

jQuery plugin in Vue component: Cannot pass value to prop

只谈情不闲聊 提交于 2019-11-28 12:52:38
I have added the jquery redactor plugin in a vue component. The plugin is working fine but I need to access the html so I can see it in Vue. I have tried everything I can think of, methods, computed properties but I can't find a way. It's particularly tricky because Redactor adds new html into the dom, and I need to get the data from the added html. Currently I am getting this error, this.$emit is not a function . I need to get the html value of .redactor-editor into the prop so it will be available in the vue data. The var textContent prints out correctly in console but I can't get that to

jQuery plugin in Vue component: Cannot pass value to prop

↘锁芯ラ 提交于 2019-11-27 07:19:04
问题 I have added the jquery redactor plugin in a vue component. The plugin is working fine but I need to access the html so I can see it in Vue. I have tried everything I can think of, methods, computed properties but I can't find a way. It's particularly tricky because Redactor adds new html into the dom, and I need to get the data from the added html. Currently I am getting this error, this.$emit is not a function . I need to get the html value of .redactor-editor into the prop so it will be

yii2集成富文本编辑器redactor

回眸只為那壹抹淺笑 提交于 2019-11-26 14:50:39
作者:白狼 出处: http://www.manks.top/article/yii2_redactor 本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 前面我们说过 如何在yii2中集成百度编辑器umeditor 以及 如何解决umeditor上传图片问题 今天我们来谈谈yii2集成另外一个强大好用的富文本编辑器Redactor,个人觉得Redactor比百度编辑器好用哦 Redactor 有官方的Yii2插件package,实用性也是很强的。 首先我们不急不躁,先进行安装Redactor。 可以参考 https://github.com/yiidoc/yii2-redactor 进行安装。有很多新手看不惯英文哈,如果你点击了链接参考了github上的安装,希望你再回来看看在整个安装过程中都要哪些必要的注意点。 1、我们跟他们一样,利用composer安装即可。 2、添加配置项 'modules' => [ 'redactor' => [ 'class' => 'yii\redactor\RedactorModule', 'uploadDir' => '上传目录', 'uploadUrl' => '图片可访问地址', 'imageAllowExtensions'=>['jpg','png','gif'] ]