1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <div>
- <vue-ueditor-wrap v-model="contents" :config="myConfig" ></vue-ueditor-wrap>
- </div>
- </template>
-
- <script>
- import VueUeditorWrap from 'vue-ueditor-wrap';
- export default {
- name: 'ueditor',
- components:{
- VueUeditorWrap
- },
- props: {
- content: '',
- // new_content:'',
- },
- data () {
- return {
- contents: this.content,
- myConfig: {
- autoHeightEnabled: false, // 编辑器不自动被内容撑高
- initialFrameHeight: 540, // 初始容器高度
- initialFrameWidth: '100%', // 初始容器宽度
- UEDITOR_HOME_URL: '/static/ueditor/',
- // 上传文件接口(这个地址是我为了方便各位体验文件上传功能搭建的临时接口,请勿在生产环境使用!!!)
- serverUrl: ``,
- toolbars: [
- [
- 'undo', //撤销
- 'redo',
- 'removeformat',//橡皮擦
- 'forecolor',
- 'bold', //加粗
- 'fontfamily', //字体
- 'fontsize', //字号
- 'underline', //下划线
- 'justifyleft', //居左对齐
- 'justifycenter', //居中对齐
- 'justifyright', //居右对齐
- 'justifyjustify', //两端对齐
- 'indent', //首行缩进
- 'formatmatch', //格式刷
- 'pasteplain',//纯文本粘贴
- 'inserttable',
- 'deletetable',
- 'insertparagraphbeforetable',
- 'insertrow',
- 'deleterow',
- 'insertcol',
- 'deletecol',
- 'mergecells',
- 'mergeright',
- 'mergedown',
- 'splittocells',
- 'splittorows',
- 'splittocols',
-
- ]
- ]
-
- }
- }
- },
- created(){
- console.log('111111',this.new_content,this.contents);
-
-
- }
- }
- </script>
-
- <style scoped>
-
- </style>
-
|