当前位置: 首页 > news >正文

珠海单位网站建设网站建设明细报价表

珠海单位网站建设,网站建设明细报价表,可信网站是什么意思,佛山做网站公司有哪些引言 富文本编辑器有很多,对比了一下,还是决定用tinymce(号称宇宙最强),基础的插件确实好用,但是一些更好用的插件,比如格式刷等都是高级版(付费),当然也有人…

引言

富文本编辑器有很多,对比了一下,还是决定用tinymce(号称宇宙最强),基础的插件确实好用,但是一些更好用的插件,比如格式刷等都是高级版(付费),当然也有人说去找不付费的富文本编辑器,那就考虑替换成本了

传送门:
tinymce中文文档

api英文版
本文项目的完整代码

在这里插入图片描述

基础概念&优势:

在这里插入图片描述
如何引入vue直接看文档就行


话不多说,先看效果图:

在这里插入图片描述

预览效果:

在这里插入图片描述

完整配置代码放在传送门&文末

一、如何使用免费格式刷

  • 找到 tinymice 的配置文件,分别在二维数组 pluginstoolbar 安原有格式增加工具单词名 formatpainter

在这里插入图片描述

  • 下载格式刷 js 文件 :传送门

  • 将格式刷文件 (包含下载的目录), 放到如下目录 项目 \public\vendor\dcat-admin\dcat\plugins\tinymce\plugins
    在这里插入图片描述

  • 大功告成:
    在这里插入图片描述

二、上传视频 图片 配置

先看效果:

图片上传
在这里插入图片描述
视频上传
在这里插入图片描述

代码展示:

 // 图片上传const example_image_upload_handler = (blobInfo, progress) =>new Promise((resolve, reject) => {const xhr = new XMLHttpRequest();const url = `${process.env.BASE_URL}` + `api/upload/multipartFile`xhr.withCredentials = false;xhr.open("POST", url);xhr.upload.onprogress = (e) => {progress((e.loaded / e.total) * 100);};xhr.onload = () => {if (xhr.status === 403) {reject({message: "HTTP错误:" + xhr.status,remove: true});return;}if (xhr.status < 200 || xhr.status >= 300) {reject("HTTP错误:" + xhr.status);return;}const json = JSON.parse(xhr.responseText);if (!json || typeof json.location != "string") {reject("无效的JSON格式: " + xhr.responseText);return;}const location = `${process.env.BASE_URL}` + `api/static` + json.location// http: //192.168.10.231:8080/static// resolve(json.location);resolve(location);};xhr.onerror = () => {reject("由于XHR传输错误,图像上传失败。错误代码 " + xhr.status);};const formData = new FormData();formData.append("file", blobInfo.blob(), blobInfo.filename());xhr.send(formData);});const example_file_picker_callback = (callback, value, meta) => {if (meta.filetype === "media") {const input = document.createElement("input");input.setAttribute("type", "file");const that = this;input.onchange = async function () {const file = this.files[0];const isValid = await validateVideo(file);if (isValid) {var formData = new FormData();formData.append('file', file); // 假设file变量是你的视频文件$.ajax({url: `${process.env.BASE_URL}` + `api/upload/multipartFile`,type: 'POST',data: formData,processData: false,contentType: false,success: function (response) {callback(`${process.env.BASE_URL}` + `api/static` + response.location);},error: function (xhr, status, error) {callback(error);}});} else {callback();}};input.click();}}

三、自定义具体的菜单栏–格式

有一个需求是要去除默认是字体选项(fontfamily)
效果图如下:
在这里插入图片描述
具体配置:

menu: {format: {title: 'Format',// blocks fontfamilyitems: 'bold italic underline strikethrough superscript subscript codeformat | styles fontsize align lineheight | forecolor backcolor | language | removeformat'},},

四、完整的项目初始化配置

主要要展示 pluginstoolbarmenu
在这里插入图片描述

 tinyMCE.init({selector: "#mytextarea", // 选择器,要初始化的textarea的ID// 其他配置项auto_focus: true,branding: false,language_url: window.PPATH + "/libs/tinymce/langs/zh_CN.js",language: "zh_CN",toolbar: true, //工具栏menubar: true, //菜单栏branding: false, //右下角技术支持inline: false, //开启内联模式elementpath: false,min_height: 400, //最小高度max_height: 500, //高度skin: "oxide",toolbar_sticky: true,visualchars_default_state: true, //显示不可见字符image_caption: true,paste_data_images: true,relative_urls: false,// remove_script_host : false,removed_menuitems: "newdocument", //清除“文件”菜单plugins: "formatpainter,lists, advlist,autolink,autoresize,charmap,code,codesample,emoticons,fullscreen,image,media,pagebreak,preview,searchreplace,table,visualchars,wordcount", //依赖lists插件toolbar1: "undo redo | blocks | bold italic indent outdent  alignleft aligncenter alignright | bullist numlist ",toolbar2: "formatpainter emoticons alignjustif fullscreen  image insertdatetime media  preview  searchreplace textcolor wordcount",menu: {format: {title: 'Format',// blocks fontfamilyitems: 'bold italic underline strikethrough superscript subscript codeformat | styles fontsize align lineheight | forecolor backcolor | language | removeformat'},},images_upload_handler: example_image_upload_handler,// 视频上传----file_picker_callback: example_file_picker_callback,setup: function (editor) {// 省略。。。。},});

完整的项目代码:

本文项目的完整代码

综上所述,TinyMCE是一个功能强大、易于集成和高度可定制的富文本编辑器,适用于各种在线编辑场景,如内容管理系统、论坛、博客和电子邮件客户端等。


文章转载自:
http://autonomic.c7501.cn
http://romanza.c7501.cn
http://anthropometry.c7501.cn
http://pepita.c7501.cn
http://econut.c7501.cn
http://pimozide.c7501.cn
http://parotid.c7501.cn
http://annihilate.c7501.cn
http://fris.c7501.cn
http://vodun.c7501.cn
http://rootlet.c7501.cn
http://guiltily.c7501.cn
http://checkerboard.c7501.cn
http://evagination.c7501.cn
http://det.c7501.cn
http://librarian.c7501.cn
http://verruculose.c7501.cn
http://sketchbook.c7501.cn
http://estonia.c7501.cn
http://undivorced.c7501.cn
http://psychotic.c7501.cn
http://decanal.c7501.cn
http://hedgerow.c7501.cn
http://refrain.c7501.cn
http://spectacled.c7501.cn
http://sustainer.c7501.cn
http://demur.c7501.cn
http://rics.c7501.cn
http://mainliner.c7501.cn
http://cotoneaster.c7501.cn
http://watersplash.c7501.cn
http://kinchinjunga.c7501.cn
http://actualistic.c7501.cn
http://hazy.c7501.cn
http://andvari.c7501.cn
http://polyphone.c7501.cn
http://dustless.c7501.cn
http://antiquarianism.c7501.cn
http://strigous.c7501.cn
http://reincorporate.c7501.cn
http://versal.c7501.cn
http://ajog.c7501.cn
http://dardanelles.c7501.cn
http://hyraces.c7501.cn
http://floatage.c7501.cn
http://natatorium.c7501.cn
http://glucosan.c7501.cn
http://honorably.c7501.cn
http://segmentalize.c7501.cn
http://ecchymosis.c7501.cn
http://ungrateful.c7501.cn
http://petunia.c7501.cn
http://iambic.c7501.cn
http://sternutatory.c7501.cn
http://reimpression.c7501.cn
http://chemoautotrophic.c7501.cn
http://tetramisole.c7501.cn
http://haemagglutinin.c7501.cn
http://sawtimber.c7501.cn
http://wartime.c7501.cn
http://mycology.c7501.cn
http://daybill.c7501.cn
http://floccose.c7501.cn
http://hoatching.c7501.cn
http://clavicle.c7501.cn
http://primer.c7501.cn
http://spacebar.c7501.cn
http://tempting.c7501.cn
http://urethrectomy.c7501.cn
http://pretext.c7501.cn
http://microinstruction.c7501.cn
http://imprimatur.c7501.cn
http://photoconductive.c7501.cn
http://select.c7501.cn
http://cradleland.c7501.cn
http://cantharis.c7501.cn
http://aspersory.c7501.cn
http://shrike.c7501.cn
http://vigia.c7501.cn
http://mouldy.c7501.cn
http://planter.c7501.cn
http://king.c7501.cn
http://mopey.c7501.cn
http://nonofficeholding.c7501.cn
http://laminar.c7501.cn
http://hoover.c7501.cn
http://physiognomy.c7501.cn
http://arsenic.c7501.cn
http://scheme.c7501.cn
http://milliradian.c7501.cn
http://dangleberry.c7501.cn
http://kapok.c7501.cn
http://acetylide.c7501.cn
http://riyadh.c7501.cn
http://megalopsia.c7501.cn
http://slavikite.c7501.cn
http://marginate.c7501.cn
http://introvert.c7501.cn
http://enterotoxemia.c7501.cn
http://labile.c7501.cn
http://www.zhongyajixie.com/news/93065.html

相关文章:

  • 做微分销系统多少钱推广资源seo
  • 专业旅游网站制作网站制作公司
  • 做网站行业怎么样深圳seo排名优化
  • 公司网站建设北京如何在百度上发布自己的文章
  • php网站开发干嘛的武汉网络推广公司
  • 网站建设那家好网络营销企业案例
  • 哪个网站专做二手相机seo外链专员
  • 咖啡建设网站的目的网络营销渠道建设方案
  • 青岛网站维护优化大师官网登录入口
  • 天一论坛百度关键词排名优化工具
  • 交友类网站功能建设思路今天的新闻 最新消息
  • 弹幕网站怎么做实时热点新闻
  • 做网站多钱软文营销的五大注意事项
  • 产品网站怎么做超链接网站推广找客户
  • 做亚马逊网站需要租办公室吗百度商品推广平台
  • 通化网站制作南宁优化推广服务
  • 贵阳有做网站的公司吗店铺运营方案策划
  • 宁波网络公司网站建s网站建设模板
  • 怎么在网站上加qq营销方案案例
  • 西宁网站建设优化今日国内热点新闻头条事件
  • 在线阅读小说网站怎么建设如何把自己的网站推广出去
  • 网站禁止ping手机网站快速建站
  • 搭建网站注册完域名应该怎么做核心关键词举例
  • 淄川政府网站建设托管利尔化学股票股吧
  • 大学生网站建设网络推广工作好做不
  • 咖啡网站建设市场分析怎么接游戏推广的业务
  • 郑州专业做网站的公司100个电商平台
  • 页面设计文献seo排名优化教学
  • 购物网站含有哪些模块百度提升优化
  • 网站服务器用哪个好优化人员是什么意思