1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- np<template>
- <div>
- <script :id="uuid" type="text/plain" ></script>
- </div>
- </template>
- <script>
- import '../../../public/ueditor-1.4.3.3/ueditor.config.js'
- import '../../../public/ueditor-1.4.3.3/ueditor.all.min.js'
- import '../../../public/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js'
- import '../../../public/ueditor-1.4.3.3/jquery-2.2.3.min.js'
- export default {
- name: "UEditor",
- props: {
- id: {
- type: String
- },
- config: {
- type: Object
- }
- },
- data() {
- return {
- editor: null,
- uuid:`J_ueditorBox_${new Date().getTime()}`
- }
- },
- mounted() {
- //初始化UE
- const _this = this;
- this.editor = UE.delEditor(this.uuid);
- this.editor = UE.getEditor(this.uuid,this.config);
- },
- destoryed() {
- this.editor.destory();
- },
- methods:{
- getUEContent: function(){
- return this.editor.getContent();
- },
- getContentTxt: function(){
- return this.editor.getContentTxt();
- }
- }
- }
- </script>
|