成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁技術文章
文章詳情頁

如何在vue中使用kindeditor富文本編輯器

瀏覽:98日期:2022-10-18 11:47:58
第一步,下載依賴

yarn add kindeditor第二步,建立kindeditor.vue組件

<template> <div class='kindeditor'> <textarea : name='content' v-model='outContent'></textarea> </div></template><script>import ’../../node_modules/kindeditor/kindeditor-all.js’import ’../../node_modules/kindeditor/lang/zh-CN.js’import ’../../node_modules/kindeditor/themes/default/default.css’export default { name: ’kindeditor’, data () { return { editor: null, outContent: this.content } }, props: { content: { type: String, default: ’’ }, id: { type: String, required: true }, width: { type: String }, height: { type: String }, minWidth: { type: Number, default: 650 }, minHeight: { type: Number, default: 100 }, items: { type: Array, default: function () { return [ ’source’, ’|’, ’undo’, ’redo’, ’|’, ’preview’, ’print’, ’template’, ’code’, ’cut’, ’copy’, ’paste’, ’plainpaste’, ’wordpaste’, ’|’, ’justifyleft’, ’justifycenter’, ’justifyright’, ’justifyfull’, ’insertorderedlist’, ’insertunorderedlist’, ’indent’, ’outdent’, ’subscript’, ’superscript’, ’clearhtml’, ’quickformat’, ’selectall’, ’|’, ’fullscreen’, ’/’, ’formatblock’, ’fontname’, ’fontsize’, ’|’, ’forecolor’, ’hilitecolor’, ’bold’, ’italic’, ’underline’, ’strikethrough’, ’lineheight’, ’removeformat’, ’|’, ’image’, ’multiimage’, ’flash’, ’media’, ’insertfile’, ’table’, ’hr’, ’emoticons’, ’baidumap’, ’pagebreak’, ’anchor’, ’link’, ’unlink’, ’|’, ’about’ ] } }, noDisableItems: { type: Array, default: function () { return [’source’, ’fullscreen’] } }, filterMode: { type: Boolean, default: true }, htmlTags: { type: Object, default: function () { return { font: [’color’, ’size’, ’face’, ’.background-color’], span: [’style’], div: [’class’, ’align’, ’style’], table: [’class’, ’border’, ’cellspacing’, ’cellpadding’, ’width’, ’height’, ’align’, ’style’], ’td,th’: [’class’, ’align’, ’valign’, ’width’, ’height’, ’colspan’, ’rowspan’, ’bgcolor’, ’style’], a: [’class’, ’href’, ’target’, ’name’, ’style’], embed: [’src’, ’width’, ’height’, ’type’, ’loop’, ’autostart’, ’quality’, ’style’, ’align’, ’allowscriptaccess’, ’/’], img: [’src’, ’width’, ’height’, ’border’, ’alt’, ’title’, ’align’, ’style’, ’/’], hr: [’class’, ’/’], br: [’/’], ’p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6’: [’align’, ’style’], ’tbody,tr,strong,b,sub,sup,em,i,u,strike’: [] } } }, wellFormatMode: { type: Boolean, default: true }, resizeType: { type: Number, default: 2 }, themeType: { type: String, default: ’default’ }, langType: { type: String, default: ’zh-CN’ }, designMode: { type: Boolean, default: true }, fullscreenMode: { type: Boolean, default: false }, basePath: { type: String }, themesPath: { type: String }, pluginsPath: { type: String, default: ’’ }, langPath: { type: String }, minChangeSize: { type: Number, default: 5 }, loadStyleMode: { type: Boolean, default: true }, urlType: { type: String, default: ’’ }, newlineTag: { type: String, default: ’p’ }, pasteType: { type: Number, default: 2 }, dialogAlignType: { type: String, default: ’page’ }, shadowMode: { type: Boolean, default: true }, zIndex: { type: Number, default: 811213 }, useContextmenu: { type: Boolean, default: true }, syncType: { type: String, default: ’form’ }, indentChar: { type: String, default: ’t’ }, cssPath: { type: [ String, Array ] }, cssData: { type: String }, bodyClass: { type: String, default: ’ke-content’ }, colorTable: { type: Array }, afterCreate: { type: Function }, afterChange: { type: Function }, afterTab: { type: Function }, afterFocus: { type: Function }, afterBlur: { type: Function }, afterUpload: { type: Function }, uploadJson: { type: String }, fileManagerJson: { type: Function }, allowPreviewEmoticons: { type: Boolean, default: true }, allowImageUpload: { type: Boolean, default: true }, allowFlashUpload: { type: Boolean, default: true }, allowMediaUpload: { type: Boolean, default: true }, allowFileUpload: { type: Boolean, default: true }, allowFileManager: { type: Boolean, default: false }, fontSizeTable: { type: Array, default: function () { return [’9px’, ’10px’, ’12px’, ’14px’, ’16px’, ’18px’, ’24px’, ’32px’] } }, imageTabIndex: { type: Number, default: 0 }, formatUploadUrl: { type: Boolean, default: true }, fullscreenShortcut: { type: Boolean, default: false }, extraFileUploadParams: { type: Array, default: function () { return [] } }, filePostName: { type: String, default: ’imgFile’ }, fillDescAfterUploadImage: { type: Boolean, default: false }, afterSelectFile: { type: Function }, pagebreakHtml: { type: String, default: ’<hr style=”page-break-after: always;” class=”ke-pagebreak” />’ }, allowImageRemote: { type: Boolean, default: true }, autoHeightMode: { type: Boolean, default: false }, fixToolBar: { type: Boolean, default: false }, tabIndex: { type: Number } }, watch: { content (val) { this.editor && val !== this.outContent && this.editor.html(val) }, outContent (val) { this.$emit(’update:content’, val) this.$emit(’on-content-change’, val) } }, mounted () { var _this = this _this.editor = window.KindEditor.create(’#’ + this.id, { width: _this.width, height: _this.height, minWidth: _this.minWidth, minHeight: _this.minHeight, items: _this.items, noDisableItems: _this.noDisableItems, filterMode: _this.filterMode, htmlTags: _this.htmlTags, wellFormatMode: _this.wellFormatMode, resizeType: _this.resizeType, themeType: _this.themeType, langType: _this.langType, designMode: _this.designMode, fullscreenMode: _this.fullscreenMode, basePath: _this.basePath, themesPath: _this.cssPath, pluginsPath: _this.pluginsPath, langPath: _this.langPath, minChangeSize: _this.minChangeSize, loadStyleMode: _this.loadStyleMode, urlType: _this.urlType, newlineTag: _this.newlineTag, pasteType: _this.pasteType, dialogAlignType: _this.dialogAlignType, shadowMode: _this.shadowMode, zIndex: _this.zIndex, useContextmenu: _this.useContextmenu, syncType: _this.syncType, indentChar: _this.indentChar, cssPath: _this.cssPath, cssData: _this.cssData, bodyClass: _this.bodyClass, colorTable: _this.colorTable, afterCreate: _this.afterCreate, afterChange: function () { _this.afterChange _this.outContent = this.html() }, afterTab: _this.afterTab, afterFocus: _this.afterFocus, afterBlur: _this.afterBlur, afterUpload: _this.afterUpload, uploadJson: _this.uploadJson, fileManagerJson: _this.fileManagerJson, allowPreviewEmoticons: _this.allowPreviewEmoticons, allowImageUpload: _this.allowImageUpload, allowFlashUpload: _this.allowFlashUpload, allowMediaUpload: _this.allowMediaUpload, allowFileUpload: _this.allowFileUpload, allowFileManager: _this.allowFileManager, fontSizeTable: _this.fontSizeTable, imageTabIndex: _this.imageTabIndex, formatUploadUrl: _this.formatUploadUrl, fullscreenShortcut: _this.fullscreenShortcut, extraFileUploadParams: _this.extraFileUploadParams, filePostName: _this.filePostName, fillDescAfterUploadImage: _this.fillDescAfterUploadImage, afterSelectFile: _this.afterSelectFile, pagebreakHtml: _this.pagebreakHtml, allowImageRemote: _this.allowImageRemote, autoHeightMode: _this.autoHeightMode, fixToolBar: _this.fixToolBar, tabIndex: _this.tabIndex }) }}</script><style> </style>第三步,引入使用

<template> <div id='app'> <editor :content.sync='editorText' :afterChange='afterChange()' :loadStyleMode='false' @on-content-change='onContentChange'></editor> <div> editorTextCopy: {{ editorTextCopy }} </div> </div></template><script>import editor from ’./components/kindeditor.vue’export default { name: ’app’, components: { editor }, data () { return { editorText: ’直接初始化值’, // 雙向同步的變量 editorTextCopy: ’’ // content-change 事件回掉改變的對象 } }, methods: { onContentChange (val) { this.editorTextCopy = val; window.console.log(this.editorTextCopy) }, afterChange () { } }}</script>效果如下:

如何在vue中使用kindeditor富文本編輯器

以上就是vue中使用kindeditor富文本編輯器的詳細內容,更多關于vue kindeditor富文本編輯器的資料請關注好吧啦網其它相關文章!

標簽: Vue
相關文章:
成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久
午夜亚洲福利| 亚洲日本免费电影| 国产高清不卡二三区| 激情五月播播久久久精品| 精品在线播放午夜| 国产精品一区在线| 91美女片黄在线| 国产自产精品| 国产精品视频福利| 国产精品婷婷| 亚洲国产高清在线| 一区二区三区欧美亚洲| 亚洲午夜一区二区| 麻豆精品视频在线| 成人免费毛片嘿嘿连载视频| 欧美精品二区| 日韩欧美国产精品一区| 日韩小视频在线观看专区| 国产欧美一区二区三区沐欲| 亚洲欧美另类图片小说| 久久精品国产免费| 99精品视频在线免费观看| 亚洲欧洲日本一区二区三区| 久久久久久9| 欧美狂野另类xxxxoooo| 久久蜜桃av一区二区天堂| 亚洲摸摸操操av| 国产一区二区在线观看视频| 欧美日韩一区二区三区免费| 色久综合一二码| 久久久久久久一区| 国产成人av一区二区| 欧美在线免费视屏| 久久久精品综合| 成人伦理片在线| 国模大胆一区二区三区| 日本一区二区免费在线| 欧美不卡视频| 精品视频免费在线| 国产精品午夜免费| 久久69国产一区二区蜜臀| 在线欧美日韩精品| 日韩二区三区四区| 菠萝蜜视频在线观看一区| 国产亚洲综合在线| 毛片av一区二区| 久久精品在线| 国产欧美一区二区精品久导航| 成人国产视频在线观看| 精品国产免费久久| 舔着乳尖日韩一区| 91免费版pro下载短视频| 久久综合国产精品| 免费成人结看片| 欧美日本不卡| 成人午夜av电影| 337p日本欧洲亚洲大胆色噜噜| bt欧美亚洲午夜电影天堂| 在线视频欧美精品| 精品影视av免费| 91精品国产日韩91久久久久久| 一区二区成人在线视频| 国产日韩亚洲欧美精品| 无码av免费一区二区三区试看 | 日韩久久免费av| 成人午夜av影视| 国产女人18水真多18精品一级做| 欧美激情偷拍| 亚洲乱码国产乱码精品精的特点 | 国产午夜久久久久| 黄色成人在线网站| 精品国产一二三区| 欧美日韩免费精品| 一区二区在线观看免费| 久久综合亚州| 国产精品18久久久久久久网站| 日韩免费观看高清完整版在线观看| 国产成人精品亚洲日本在线桃色| 精品播放一区二区| 狠狠入ady亚洲精品| 亚洲一区在线看| 国产精品xvideos88| 一区二区三区加勒比av| 在线精品视频一区二区三四 | 精品福利av| 丝袜亚洲另类欧美| 国产精品毛片va一区二区三区| 日本亚洲一区二区| 日韩一区二区在线看| 欧美国产91| 调教+趴+乳夹+国产+精品| 欧美日韩国产a| 蜜桃av一区二区在线观看| 91精品国产综合久久久久久久| 秋霞午夜av一区二区三区| 欧美福利视频导航| 欧美精品偷拍| 天天操天天色综合| 精品日韩欧美在线| 高清视频一区二区| 在线成人免费观看| 欧美激情一区| 视频一区中文字幕| 日韩欧美电影一区| 亚洲伦伦在线| 亚洲欧美日韩系列| 久久精品九九| 国产91露脸合集magnet| 亚洲欧洲性图库| 欧美日韩岛国| 日韩不卡手机在线v区| 久久影院视频免费| 新67194成人永久网站| 亚洲一区二区成人在线观看| 3d动漫精品啪啪1区2区免费| 国产精品国码视频| 久久国产精品99久久久久久老狼 | 欧美黄色精品| 图片区小说区区亚洲影院| 精品国产乱码久久久久久影片| 9国产精品视频| 国产91在线观看| 亚洲精品一卡二卡| 日韩精品在线一区二区| 国产三区精品| 成人免费毛片片v| 国产精品麻豆欧美日韩ww| 成人中文字幕合集| 亚洲免费影视| 视频在线在亚洲| 国产高清久久久久| 亚洲欧洲精品一区二区三区波多野1战4 | 美洲天堂一区二卡三卡四卡视频 | 国产成人精品影院| 日本aⅴ精品一区二区三区| 国产精品国产三级国产aⅴ中文| 91麻豆国产精品久久| 免费成人在线观看视频| 亚洲精品自拍动漫在线| 久久久久9999亚洲精品| 日韩一区二区精品葵司在线| 色欧美日韩亚洲| 波多野结衣精品在线| 日韩成人dvd| 18成人在线观看| 精品国精品国产尤物美女| 久久国产一区二区| 波多野洁衣一区| 美女国产一区二区| 亚洲午夜在线电影| 欧美va亚洲va在线观看蝴蝶网| 亚洲欧美日韩在线综合| 欧美日韩综合精品| 国精品**一区二区三区在线蜜桃| 中文字幕制服丝袜一区二区三区| 欧美视频在线观看一区| 久久精工是国产品牌吗| 中文字幕在线播放不卡一区| 51精品视频一区二区三区| 亚洲综合另类| 欧美日本精品| 国产综合成人久久大片91| 日本vs亚洲vs韩国一区三区二区 | 97精品国产露脸对白| 678五月天丁香亚洲综合网| 国内在线观看一区二区三区| 久久er精品视频| 亚洲男同性恋视频| 久久天天做天天爱综合色| 91一区二区三区在线播放| 久久精品国产精品亚洲综合| 亚洲免费观看高清| 日韩一区二区在线看片| 538prom精品视频线放| 一本大道av伊人久久综合| 在线日本高清免费不卡| 不卡一区二区三区四区| 日韩国产精品久久| 丝袜a∨在线一区二区三区不卡| 中文字幕在线一区二区三区| 精品国产青草久久久久福利| 欧美日韩国产在线观看| 久久久久九九九| 久久精品中文| 国内精品一区二区| 成人av在线电影| 国产一区视频导航| 婷婷成人激情在线网| 亚洲一区二区中文在线| 国产精品三级av| 精品少妇一区二区三区在线视频| 欧美午夜免费电影| 极品中文字幕一区| 成人激情av网| 99天天综合性| 国产精品一区不卡| 极品尤物av久久免费看| 午夜不卡在线视频| 欧美经典三级视频一区二区三区| 国产女人aaa级久久久级|