{"_id":"mteditor","_rev":"55-a8e64b1d6ea74146e37a0e990a349679","name":"mteditor","description":"MTEditor超轻量Vue富文本编辑器，使用方式更简单，更符合你的习惯","dist-tags":{"latest":"2.2.9"},"versions":{"2.2.3":{"name":"mteditor","version":"2.2.3","author":"","license":"ISC","_id":"mteditor@2.2.3","maintainers":[{"name":"mengtuo","email":"mengtuo@outlook.com"}],"dist":{"shasum":"bcde7d748a018299a875ef4b6a86a56d8dbbd253","tarball":"https://registry.npmjs.org/mteditor/-/mteditor-2.2.3.tgz","fileCount":22,"integrity":"sha512-2t6Znz4yCU8+vgFFRvLViu4U+IuNtk7hIl2NL1DzZXlwS9Bqd4Z5CjBDmlwcMdjZmh14TpXjipLakmhw8AwPSA==","signatures":[{"sig":"MEQCIC9c27Rt4SEHujldNsXHD8CxcuMxQC9nzOzEfp3lNK+/AiA0Wyi1osDdj/CYeqdQDAoIVKGR5T/bh50NeLtY6EpoKQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154364},"main":"index.js","gitHead":"fa07dbbc5c3e947f00949d5181dafdd1c088c8df","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mengtuo","email":"mengtuo@outlook.com"},"repository":{"url":"https://gitee.com/mengtuo/mteditor.git","type":"git"},"_npmVersion":"10.2.3","description":"MTEditor超轻量Vue富文本编辑器，使用方式更简单，更符合你的习惯","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mteditor_2.2.3_1716284731319_0.9880916244232689","host":"s3://npm-registry-packages"}},"2.2.4":{"name":"mteditor","version":"2.2.4","author":"","license":"ISC","_id":"mteditor@2.2.4","maintainers":[{"name":"mengtuo","email":"mengtuo@outlook.com"}],"dist":{"shasum":"3cee04c9d2d4b99fb9c88da3c9c06dde62c0dc30","tarball":"https://registry.npmjs.org/mteditor/-/mteditor-2.2.4.tgz","fileCount":22,"integrity":"sha512-OwzKtLcQbUeL+PALeX3EnROG1IR+Nyrqr2UbFJ0ugzChGhNbdk/p+CpFmURkOFxjwF/2zpUqDR2UlxUilMc24w==","signatures":[{"sig":"MEUCIQCMs1pGWb+64py+z+B4s/1gLM1mJc9jg5N4/6UQDq2OAAIgG5Je8EIIEo9QaxFTo9b/JwofCdWVrH55kLnb/QT2bQo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154353},"main":"index.js","gitHead":"fa07dbbc5c3e947f00949d5181dafdd1c088c8df","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mengtuo","email":"mengtuo@outlook.com"},"repository":{"url":"https://gitee.com/mengtuo/mteditor.git","type":"git"},"_npmVersion":"10.2.3","description":"MTEditor超轻量Vue富文本编辑器，使用方式更简单，更符合你的习惯","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mteditor_2.2.4_1718868116058_0.19294042323463145","host":"s3://npm-registry-packages"}},"2.2.5":{"name":"mteditor","version":"2.2.5","author":"","license":"ISC","_id":"mteditor@2.2.5","dist":{"shasum":"083fc12276d954b40e99d3a0554742e091ad1286","tarball":"https://registry.npmjs.org/mteditor/-/mteditor-2.2.5.tgz","fileCount":22,"integrity":"sha512-Uu3bCa1s9tDNi25YgOvtM155PMjWYvgGscPfTB3eRWRu4aPW8GjlCNKRGjbOlB9Q7aFe2buIPbTvrIsmTnctBw==","signatures":[{"sig":"MEUCIQCwJIFhXI9OQvXyFLz/Ij0wCBCj38yx9rkTIQC/e1IwgwIgXFB//+L6UBP2hMxbrsPxgPFa/5QKZWmuoprMJA0150U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154737},"main":"index.js","gitHead":"16f90bedbc3041b2040525aeb7ae0e27defcec8b","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mengtuo","email":"mengtuo@outlook.com"},"repository":{"url":"https://gitee.com/mengtuo/mteditor.git","type":"git"},"_npmVersion":"10.2.3","description":"MTEditor超轻量Vue富文本编辑器，使用方式更简单，更符合你的习惯","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mteditor_2.2.5_1719023494014_0.4787750240528901","host":"s3://npm-registry-packages"}},"2.2.6":{"name":"mteditor","version":"2.2.6","author":"","license":"ISC","_id":"mteditor@2.2.6","dist":{"shasum":"1a4d6f30b4e3b192649495f6bf25d8ee72898535","tarball":"https://registry.npmjs.org/mteditor/-/mteditor-2.2.6.tgz","fileCount":22,"integrity":"sha512-jDlUdMZnsb2ZXTJY4DKAHdly98nN1bgkuFo9l87rQ32SLz2i+Ds9aOnicGDpE2bZTphdz9W67potEYMlfi58lg==","signatures":[{"sig":"MEYCIQDpZaD0SUOvFg9PZGhe4GhcsUrneqPc0PyRSixHbsPWVAIhANne8+aemHDlqMr5og7ps52ewskakeMOz1cp84Z0q9sT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155025},"main":"index.js","gitHead":"574e03f7428cd53824df59ff773cc1858587bd09","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mengtuo","email":"mengtuo@outlook.com"},"repository":{"url":"https://gitee.com/mengtuo/mteditor.git","type":"git"},"_npmVersion":"10.2.3","description":"MTEditor超轻量Vue富文本编辑器，使用方式更简单，更符合你的习惯","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mteditor_2.2.6_1719024688693_0.8373428262627236","host":"s3://npm-registry-packages"}},"2.2.7":{"name":"mteditor","version":"2.2.7","author":"","license":"ISC","_id":"mteditor@2.2.7","dist":{"shasum":"17a44f6b0291dfdcbe7d92333b89879129671db0","tarball":"https://registry.npmjs.org/mteditor/-/mteditor-2.2.7.tgz","fileCount":22,"integrity":"sha512-Go/Xm175oAHau8ehRuaXugh4sDscNRE9Kxjt/jCa4mSBpyW/mR5EA/8ekYiBXfbR0BouDM+zKTgOE7nI7eWJyg==","signatures":[{"sig":"MEYCIQDjr8B2wo1gQMveQYdR7zFf0COI6TZi0XL9oZJRZLWPlQIhALZL72BNLSdz75BFt64/8a2HuHGgneE8FFsxADUuJ7WY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155025},"main":"index.js","gitHead":"1d27ee88f03788bc5515eb0e72a3506461ce5813","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mengtuo","email":"mengtuo@outlook.com"},"repository":{"url":"https://gitee.com/mengtuo/mteditor.git","type":"git"},"_npmVersion":"10.2.3","description":"MTEditor超轻量Vue富文本编辑器，使用方式更简单，更符合你的习惯","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mteditor_2.2.7_1719025262338_0.17464894413118093","host":"s3://npm-registry-packages"}},"2.2.8":{"name":"mteditor","version":"2.2.8","author":"","license":"ISC","_id":"mteditor@2.2.8","dist":{"shasum":"da270be6d59158403adfe76ddfbda85f90689210","tarball":"https://registry.npmjs.org/mteditor/-/mteditor-2.2.8.tgz","fileCount":22,"integrity":"sha512-Pfl5B+/oGXjGM14yvlzBFK1BVXDD77IAxSfnZOzTARCtS6fet2yj456FuxOrDmA+O10TMXcCYAQouraL9z1IUA==","signatures":[{"sig":"MEUCIATfq12B3EnDgZIbajY5jzdL9IuA9BTUxIDjeMt1JRC0AiEA+KuP1M0FzcEMbjSB0ej+hlSIV1MqxSPaHa8mEmbxtvw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155096},"main":"index.js","gitHead":"488cd8cf77e373559f79452abd9ac536536bd81b","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mengtuo","email":"mengtuo@outlook.com"},"repository":{"url":"https://gitee.com/mengtuo/mteditor.git","type":"git"},"_npmVersion":"10.2.3","description":"MTEditor超轻量Vue富文本编辑器，使用方式更简单，更符合你的习惯","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mteditor_2.2.8_1719229430550_0.3927603375370743","host":"s3://npm-registry-packages"}},"2.2.9":{"name":"mteditor","version":"2.2.9","description":"MTEditor超轻量Vue富文本编辑器，使用方式更简单，更符合你的习惯","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","repository":{"type":"git","url":"https://gitee.com/mengtuo/mteditor.git"},"_id":"mteditor@2.2.9","gitHead":"d7c5c6e3f8371b4fad9078cf5930939a5d5aaf31","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-Os7MxbWkwjfqRawVburPwtcq021SoVH1qZ/dXnI+tf1tiLgffTUWRDiBBYIwcITJGfjyzOQtt5U102hEbfrzlw==","shasum":"e658a664784778db6c8a961068100129d687cbc7","tarball":"https://registry.npmjs.org/mteditor/-/mteditor-2.2.9.tgz","fileCount":22,"unpackedSize":155151,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJDWjFR4enO5/BjAHi4dTRBd7ef7FBawRcfBRcX+3mnAiAb7S4aPSiPNstcH52Uct6IjrDTXqqPWjOVLDEpIt+9EA=="}]},"_npmUser":{"name":"mengtuo","email":"mengtuo@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mteditor_2.2.9_1719564817979_0.8446089426002854"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-21T09:45:31.319Z","modified":"2024-06-28T08:53:38.288Z","1.0.0":"2018-12-06T09:49:38.128Z","1.0.1":"2018-12-17T13:37:18.293Z","1.0.2":"2018-12-17T13:46:43.144Z","1.0.3":"2018-12-18T16:52:35.919Z","1.0.4":"2018-12-19T05:58:10.237Z","1.0.5":"2019-01-15T08:35:58.946Z","1.0.6":"2019-01-15T09:49:30.377Z","1.0.7":"2019-01-16T03:38:41.292Z","1.0.8":"2019-01-17T00:30:43.350Z","1.0.9":"2019-01-31T07:05:49.575Z","1.1.0":"2019-03-10T15:29:13.299Z","1.1.1":"2019-03-11T05:59:27.338Z","1.1.2":"2019-03-11T06:31:02.489Z","1.1.4":"2019-03-12T04:48:55.344Z","1.1.5":"2019-03-12T14:44:52.111Z","1.1.6":"2019-03-12T16:15:37.615Z","1.1.7":"2019-03-13T05:46:32.910Z","1.1.8":"2019-03-13T07:14:21.600Z","1.1.9":"2019-03-13T08:13:23.374Z","1.1.10":"2019-03-13T16:23:24.417Z","1.2.0":"2019-03-13T23:04:44.212Z","1.2.1":"2019-03-13T23:49:50.285Z","2.0.0":"2021-03-05T11:01:11.315Z","2.0.1":"2021-03-05T12:48:39.355Z","2.0.2":"2021-03-05T13:06:35.651Z","2.0.3":"2021-03-05T13:28:25.507Z","2.0.4":"2021-03-05T13:30:00.268Z","2.0.5":"2021-03-05T13:35:12.947Z","2.0.6":"2021-03-07T12:55:46.232Z","2.0.7":"2021-03-07T13:25:51.783Z","2.0.8":"2021-03-08T06:04:24.093Z","2.0.9":"2021-03-08T07:05:33.700Z","2.1.0":"2021-03-08T08:36:58.532Z","2.1.1":"2021-03-08T09:53:53.511Z","2.1.2":"2021-03-09T09:35:46.119Z","2.1.3":"2021-05-15T03:22:56.733Z","2.1.4":"2021-05-15T14:44:38.568Z","2.1.5":"2021-05-16T16:07:28.496Z","2.1.6":"2021-05-16T16:17:45.699Z","2.1.7":"2021-05-16T16:28:58.598Z","2.1.8":"2021-05-16T22:47:26.403Z","2.1.9":"2021-05-16T23:10:12.227Z","2.2.0":"2021-05-17T14:39:04.831Z","2.2.1":"2021-05-17T14:53:43.638Z","2.2.2":"2021-05-17T15:11:31.546Z","2.2.3":"2024-05-21T09:45:31.464Z","2.2.4":"2024-06-20T07:21:56.238Z","2.2.5":"2024-06-22T02:31:34.222Z","2.2.6":"2024-06-22T02:51:28.845Z","2.2.7":"2024-06-22T03:01:02.553Z","2.2.8":"2024-06-24T11:43:50.740Z","2.2.9":"2024-06-28T08:53:38.123Z"},"maintainers":[{"name":"mengtuo","email":"mengtuo@outlook.com"}],"repository":{"type":"git","url":"https://gitee.com/mengtuo/mteditor.git"},"license":"ISC","readme":"# MTEditor\n\nMTEditor超轻量级Vue富文本编辑器，使用方式更符合你的习惯\n1. 大小只有 160K\n1. 图片功能，\n    - 本地图片，\n    - 网路图片\n    - 上传图片到自己的服务器，\n    - 右键调整图片在富文本中的百分比\n2. 表格功能\n    - 快速新建表格，可以通过右键对表格进行行列操作，例如新增行，删除行，以及删除整个表格。\n    - 表格的列是等宽的，\n\n# 维护\n单兵作战，一个富文本也没太多东西需要维护的。如果实在想加一些自定义功能，源码应该也容易看得懂。\n如果有疑问可以提 issue 或者加 qq群：519967151\n\n# 属性\n属性名|描述|示例\n---|---|---\nheight| 富文本高度| 500px\nwidth | 富文本宽度| 500px\nconfig | 工具栏配置 | 默认可以不设置，具体设置看以下config\n# 函数\n\n函数名|描述|\n---|:---:|\nuploadMethod| 图片上传的函数,详情请看示例\n\n# 头部配置,可按需分配\n```json\n    {\n        \"标题\": { \"command\": \"h\", \"icon\": \"fa fa-header\", \"title\": \"标题\", \"popup\": true, 'component': 'headerList' },\n        \"加粗\": { \"command\": \"bold\", \"icon\": \"fa fa-bold\", \"title\": \"加粗\" },\n        \"斜体\": { \"command\": \"italic\", \"icon\": \"fa fa-italic\", \"title\": \"斜体\" },\n        \"字体\": { \"command\": \"fontSize\", \"icon\": \"fa fa-font\", \"title\": \"字体\", \"popup\": true, 'component': 'fontList' },\n        \"下划线\": { \"command\": \"underline\", \"icon\": \"fa fa-underline\", \"title\": \"下划线\" },\n        \"删除线\": { \"command\": \"strikethrough\", \"icon\": \"fa fa-strikethrough\", \"title\": \"删除线\" },\n        \"居左\": { \"command\": \"justifyLeft\", \"icon\": \"fa fa-align-left\", \"title\": \"居左\" },\n        \"居中\": { \"command\": \"justifyCenter\", \"icon\": \"fa fa-align-center\", \"title\": \"居中\" },\n        \"居右\": { \"command\": \"justifyRight\", \"icon\": \"fa fa-align-right\", \"title\": \"居右\" },\n        \"两侧\": { \"command\": \"justifyFull\", \"icon\": \"fa fa-align-justify\", \"title\": \"两侧\" },\n        \"无序列表\": { \"command\": \"InsertUnorderedList\", \"icon\": \"fa fa-list-ul\", \"title\": \"无序列表\" },\n        \"有序列表\": { \"command\": \"insertOrderedList\", \"icon\": \"fa fa-list-ol\", \"title\": \"有序列表\" },\n        \"上标\": { \"command\": \"superscript\", \"icon\": \"fa fa-superscript\", \"title\": \"上标\" },\n        \"下标\": { \"command\": \"subscript\", \"icon\": \"fa fa-subscript\", \"title\": \"下标\" },\n        \"链接\":{\"command\":\"CreateLink\",\"icon\":\"fa fa-link\",\"title\":\"链接\",\"popup\":true,'component':'linkBox'},        \n        \"表格\": { \"command\": \"table\", \"icon\": \"fa fa-table\", \"title\": \"表格\", \"popup\": true, 'component': 'tableBox' },\n        \"图片\": { \"command\": \"img\", \"icon\": \"fa fa-image\", \"title\": \"图片\", \"popup\": true, 'component': 'imageBox' },\n        \"擦除\": { \"command\": \"removeFormat\", \"icon\": \"fa fa-eraser\", \"title\": \"擦除\" },\n        \"撤销\": { \"command\": \"undo\", \"icon\": \"fa fa-undo\", \"title\": \"撤销\" },\n        \"重做\": { \"command\": \"redo\", \"icon\": \"fa fa-repeat\", \"title\": \"重做\" }\n    }\n```\n\n# 使用方式\n\n1. 通过vue插件的方式导入，在main.js导入\n```html\nimport mtEditor from 'mteditor'\nVue.use(mtEditor)\n```\n2. 在组件中使用 \n```html\n<template>\n  <div id=\"app\">\n    <mt-editor\n      height=\"500px\"\n      width=\"100%\"\n      v-model=\"editorContent\"\n      :uploadMethod=\"uploadMethod\"\n    ></mt-editor>\n  </div>\n</template>\n\n<script>\nexport default {\n  name: 'App',\n  components: {},\n  data () {\n    return {\n      editorContent: '',\n      config: {\n        \"标题\": { \"command\": \"h\", \"icon\": \"fa fa-header\", \"title\": \"标题\", \"popup\": true, 'component': 'headerList' },\n        \"加粗\": { \"command\": \"bold\", \"icon\": \"fa fa-bold\", \"title\": \"加粗\" },\n        \"斜体\": { \"command\": \"italic\", \"icon\": \"fa fa-italic\", \"title\": \"斜体\" },\n        \"字体\": { \"command\": \"fontSize\", \"icon\": \"fa fa-font\", \"title\": \"字体\", \"popup\": true, 'component': 'fontList' },\n        \"下划线\": { \"command\": \"underline\", \"icon\": \"fa fa-underline\", \"title\": \"下划线\" },\n        \"删除线\": { \"command\": \"strikethrough\", \"icon\": \"fa fa-strikethrough\", \"title\": \"删除线\" },\n        \"居左\": { \"command\": \"justifyLeft\", \"icon\": \"fa fa-align-left\", \"title\": \"居左\" },\n        \"居中\": { \"command\": \"justifyCenter\", \"icon\": \"fa fa-align-center\", \"title\": \"居中\" },\n        \"居右\": { \"command\": \"justifyRight\", \"icon\": \"fa fa-align-right\", \"title\": \"居右\" },\n        \"两侧\": { \"command\": \"justifyFull\", \"icon\": \"fa fa-align-justify\", \"title\": \"两侧\" },\n        \"无序列表\": { \"command\": \"InsertUnorderedList\", \"icon\": \"fa fa-list-ul\", \"title\": \"无序列表\" },\n        \"有序列表\": { \"command\": \"insertOrderedList\", \"icon\": \"fa fa-list-ol\", \"title\": \"有序列表\" },\n        \"上标\": { \"command\": \"superscript\", \"icon\": \"fa fa-superscript\", \"title\": \"上标\" },\n        \"下标\": { \"command\": \"subscript\", \"icon\": \"fa fa-subscript\", \"title\": \"下标\" },\n        \"表格\": { \"command\": \"table\", \"icon\": \"fa fa-table\", \"title\": \"表格\", \"popup\": true, 'component': 'tableBox' },\n        \"图片\": { \"command\": \"img\", \"icon\": \"fa fa-image\", \"title\": \"图片\", \"popup\": true, 'component': 'imageBox' },\n        \"擦除\": { \"command\": \"removeFormat\", \"icon\": \"fa fa-eraser\", \"title\": \"擦除\" },\n        \"撤销\": { \"command\": \"undo\", \"icon\": \"fa fa-undo\", \"title\": \"撤销\" },\n        \"重做\": { \"command\": \"redo\", \"icon\": \"fa fa-repeat\", \"title\": \"重做\" }\n      }\n    }\n  },\n  methods: {\n    /**\n     * @description 上传图片函数，在该函数内完成图片的上传操作\n     * @param \n     *   params参数：该参数里包含了要上传的图片,由富文本调用uploadMethod方法时传递过来\n     *     {fd:fd}\n    */\n    uploadMethod (params) {\n      // 1 获取需要上传的图片formdata\n      let fd = params.fd;\n      // 2 拼接除了文件之外，接口需要的参数,如果没有则不需要再拼接，以下是例子\n      fd.append('username', 'zmt')\n      // 3.调用真实的图片上传接口，由于现在大部分接口都是promise封装的，我这里就用一个Promise来做示意\n      return new Promise((resolve) => {\n        /*\n          4. 将图片数据取出，组成以下格式，传给\n          {\n            imgURL: '图片地址'\n          }\n        */\n        resolve({\n          imgURL: '图片地址'\n        })\n      })\n    }\n  },\n}\n</script>\n\n<style>\n\n</style>\n\n```\n","readmeFilename":"readme.md"}