From 85fb7cc0ce80d823607538b8139c223d79957ac0 Mon Sep 17 00:00:00 2001 From: cnspray Date: Wed, 4 Mar 2020 01:05:33 +0800 Subject: [PATCH 1/9] =?UTF-8?q?word=E8=BD=AC=E6=8D=A2=E4=B8=BAmd=E6=89=80?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit word转换为md所使用插件 --- static/word2md/说明.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/word2md/说明.md diff --git a/static/word2md/说明.md b/static/word2md/说明.md new file mode 100644 index 00000000..67aeb9e3 --- /dev/null +++ b/static/word2md/说明.md @@ -0,0 +1 @@ +word2md.js是使用官方的demo修改的,增加了上传图片处理。 From 483e9d8bf2339b6a8fbfe4e7beb9f7465a881ec1 Mon Sep 17 00:00:00 2001 From: cnspray Date: Wed, 4 Mar 2020 01:07:24 +0800 Subject: [PATCH 2/9] =?UTF-8?q?word=E8=BD=AC=E6=8D=A2=E4=B8=BAmarkdown?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mammoth将word转换为markdown不怎么样,使用turndown进行转换 word-html-markdown --- static/word2md/mammoth.browser.js | 32675 ++++++++++++++++++++++++ static/word2md/mammoth.browser.min.js | 18 + static/word2md/turndown-plugin-gfm.js | 165 + static/word2md/turndown.js | 908 + static/word2md/word2md.js | 132 + 5 files changed, 33898 insertions(+) create mode 100644 static/word2md/mammoth.browser.js create mode 100644 static/word2md/mammoth.browser.min.js create mode 100644 static/word2md/turndown-plugin-gfm.js create mode 100644 static/word2md/turndown.js create mode 100644 static/word2md/word2md.js diff --git a/static/word2md/mammoth.browser.js b/static/word2md/mammoth.browser.js new file mode 100644 index 00000000..cb8a33f9 --- /dev/null +++ b/static/word2md/mammoth.browser.js @@ -0,0 +1,32675 @@ +// Module: base64-js@1.2.0 +// License: MIT +// +// Module: bluebird@3.4.7 +// License: MIT +// +// Module: buffer-shims@1.0.0 +// License: MIT +// +// Module: buffer@4.9.1 +// License: MIT +// +// Module: core-util-is@1.0.2 +// License: MIT +// +// Module: events@1.1.1 +// License: MIT +// +// Module: ieee754@1.1.8 +// License: BSD-3-Clause +// +// Module: inherits@2.0.1 +// License: ISC +// +// Module: inherits@2.0.3 +// License: ISC +// +// Module: isarray@1.0.0 +// License: MIT +// +// Module: jszip@2.5.0 +// License: MIT or GPLv3 +// +// Module: lop@0.4.0 +// License: BSD +// +// Module: mammoth@1.4.9 +// License: BSD-2-Clause +// +// Module: option@0.2.3 +// License: BSD +// +// Module: pako@0.2.9 +// License: MIT +// +// Module: path-browserify@0.0.0 +// License: MIT +// +// Module: process-nextick-args@1.0.7 +// License: MIT +// +// Module: process@0.11.9 +// License: MIT +// +// Module: readable-stream@2.2.6 +// License: MIT +// +// Module: sax@1.1.6 +// License: ISC +// +// Module: stream-browserify@2.0.1 +// License: MIT +// +// Module: string_decoder@0.10.31 +// License: MIT +// +// Module: underscore@1.4.4 +// License: MIT +// +// Module: underscore@1.8.3 +// License: MIT +// +// Module: util-deprecate@1.0.2 +// License: MIT +// +// Module: util@0.10.3 +// License: MIT +// +// Module: xmlbuilder@10.0.0 +// License: MIT +// +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.mammoth = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o