@opentiny/fluent-editor 3.20.3 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/config/editor.utils.es.js +7 -0
- package/es/config/editor.utils.es.js.map +1 -1
- package/es/config/icons.config.es.js +6 -0
- package/es/config/icons.config.es.js.map +1 -1
- package/es/config/index.es.js +6 -3
- package/es/config/index.es.js.map +1 -1
- package/es/config/types/editor-toolbar.interface.es.js +2 -0
- package/es/config/types/editor-toolbar.interface.es.js.map +1 -0
- package/es/config/types/index.es.js +1 -0
- package/es/config/types/index.es.js.map +1 -1
- package/es/custom-image/BlotFormatter.es.js +0 -1
- package/es/custom-image/BlotFormatter.es.js.map +1 -1
- package/es/fluent-editor.es.js +7 -6
- package/es/fluent-editor.es.js.map +1 -1
- package/es/fullscreen/handler.es.js +51 -0
- package/es/fullscreen/handler.es.js.map +1 -0
- package/es/index.es.js +3 -2
- package/es/link/formats/link.es.js +11 -6
- package/es/link/formats/link.es.js.map +1 -1
- package/es/link/index.es.js +3 -3
- package/es/link/index.es.js.map +1 -1
- package/es/link/modules/tooltip.es.js +22 -7
- package/es/link/modules/tooltip.es.js.map +1 -1
- package/lib/config/editor.utils.cjs.js +7 -0
- package/lib/config/editor.utils.cjs.js.map +1 -1
- package/lib/config/icons.config.cjs.js +6 -0
- package/lib/config/icons.config.cjs.js.map +1 -1
- package/lib/config/index.cjs.js +4 -1
- package/lib/config/index.cjs.js.map +1 -1
- package/lib/config/types/editor-toolbar.interface.cjs.js +2 -0
- package/lib/config/types/editor-toolbar.interface.cjs.js.map +1 -0
- package/lib/config/types/index.cjs.js +1 -0
- package/lib/config/types/index.cjs.js.map +1 -1
- package/lib/custom-image/BlotFormatter.cjs.js +0 -1
- package/lib/custom-image/BlotFormatter.cjs.js.map +1 -1
- package/lib/fluent-editor.cjs.js +7 -6
- package/lib/fluent-editor.cjs.js.map +1 -1
- package/lib/fullscreen/handler.cjs.js +51 -0
- package/lib/fullscreen/handler.cjs.js.map +1 -0
- package/lib/index.cjs.js +1 -0
- package/lib/index.cjs.js.map +1 -1
- package/lib/link/formats/link.cjs.js +10 -5
- package/lib/link/formats/link.cjs.js.map +1 -1
- package/lib/link/index.cjs.js +3 -3
- package/lib/link/index.cjs.js.map +1 -1
- package/lib/link/modules/tooltip.cjs.js +24 -9
- package/lib/link/modules/tooltip.cjs.js.map +1 -1
- package/package.json +4 -2
- package/style.css +28 -0
- package/types/attributors/index.d.ts +4 -0
- package/types/config/base64-image.d.ts +3 -0
- package/types/config/editor.config.d.ts +95 -0
- package/types/config/editor.utils.d.ts +42 -0
- package/types/config/i18n/en-us.d.ts +86 -0
- package/types/config/i18n/zh-cn.d.ts +86 -0
- package/types/config/icons.config.d.ts +34 -0
- package/types/config/index.d.ts +49 -0
- package/types/config/types/additional-toolbar-item.interface.d.ts +8 -0
- package/types/config/types/content-change.interface.d.ts +13 -0
- package/types/config/types/content-save.interface.d.ts +6 -0
- package/types/config/types/counter-option.interface.d.ts +9 -0
- package/types/config/types/editor-config.interface.d.ts +21 -0
- package/types/config/types/editor-modules.interface.d.ts +31 -0
- package/types/config/types/editor-toolbar.interface.d.ts +6 -0
- package/types/config/types/file-operation.interface.d.ts +12 -0
- package/types/config/types/focus-change.interface.d.ts +4 -0
- package/types/config/types/fullscreen-module.interface.d.ts +4 -0
- package/types/config/types/help-panel-item.interface.d.ts +5 -0
- package/types/config/types/help-panel-option.interface.d.ts +7 -0
- package/types/config/types/image-module.interface.d.ts +3 -0
- package/types/config/types/image-upload.interface.d.ts +7 -0
- package/types/config/types/index.d.ts +23 -0
- package/types/config/types/load-on-demand-module.interface.d.ts +5 -0
- package/types/config/types/mention-module.interface.d.ts +8 -0
- package/types/config/types/paste-change.interface.d.ts +6 -0
- package/types/config/types/quick-menu-module.interface.d.ts +3 -0
- package/types/config/types/range.interface.d.ts +4 -0
- package/types/config/types/registry-options.interface.d.ts +5 -0
- package/types/config/types/selection-change.interface.d.ts +8 -0
- package/types/config/types/toolbar-item.interface.d.ts +13 -0
- package/types/config/types/type.d.ts +5 -0
- package/types/config/types/validate-error.interface.d.ts +13 -0
- package/types/counter/index.d.ts +12 -0
- package/types/custom-clipboard.d.ts +26 -0
- package/types/custom-image/BlotFormatter.d.ts +24 -0
- package/types/custom-image/Options.d.ts +36 -0
- package/types/custom-image/actions/Action.d.ts +7 -0
- package/types/custom-image/actions/CustomResizeAction.d.ts +24 -0
- package/types/custom-image/actions/DeleteAction.d.ts +7 -0
- package/types/custom-image/image.d.ts +28 -0
- package/types/custom-image/specs/BlotSpec.d.ts +13 -0
- package/types/custom-image/specs/CustomImageSpec.d.ts +21 -0
- package/types/custom-image/specs/ImageSpec.d.ts +10 -0
- package/types/custom-uploader.d.ts +30 -0
- package/types/emoji/emoji-list/index.d.ts +1 -0
- package/types/emoji/emoji-list/people.d.ts +1 -0
- package/types/emoji/emoji-list.d.ts +2 -0
- package/types/emoji/emoji-map.d.ts +2 -0
- package/types/emoji/formats/emoji-blot.d.ts +13 -0
- package/types/emoji/index.d.ts +10 -0
- package/types/emoji/modules/emoji.d.ts +38 -0
- package/types/emoji/modules/toolbar-emoji.d.ts +8 -0
- package/types/emoji/utils.d.ts +1 -0
- package/types/file/formats/file.d.ts +15 -0
- package/types/file/index.d.ts +11 -0
- package/types/file/modules/file-bar.d.ts +14 -0
- package/types/fluent-editor.d.ts +9 -0
- package/types/format-painter/index.d.ts +15 -0
- package/types/fullscreen/handler.d.ts +3 -0
- package/types/global-link/constants.d.ts +3 -0
- package/types/global-link/formats/customer-widget-link.d.ts +14 -0
- package/types/global-link/formats/doc-link.d.ts +17 -0
- package/types/global-link/formats/wiki-link.d.ts +16 -0
- package/types/global-link/formats/work-item-link.d.ts +16 -0
- package/types/global-link/global-link-panel.d.ts +19 -0
- package/types/global-link/index.d.ts +18 -0
- package/types/global-link/utils/createTable.d.ts +1 -0
- package/types/index.d.ts +4 -0
- package/types/link/formats/link.d.ts +16 -0
- package/types/link/index.d.ts +6 -0
- package/types/link/modules/tooltip.d.ts +32 -0
- package/types/mention/Mention.d.ts +56 -0
- package/types/mention/MentionLink.d.ts +18 -0
- package/types/mention/constants.d.ts +3 -0
- package/types/quick-menu/index.d.ts +22 -0
- package/types/screenshot/index.d.ts +20 -0
- package/types/soft-break/index.d.ts +14 -0
- package/types/strike/index.d.ts +7 -0
- package/types/syntax/index.d.ts +14 -0
- package/types/table/better-table.d.ts +27 -0
- package/types/table/formats/header.d.ts +22 -0
- package/types/table/formats/list.d.ts +34 -0
- package/types/table/formats/table.d.ts +147 -0
- package/types/table/modules/table-column-tool.d.ts +23 -0
- package/types/table/modules/table-operation-menu.d.ts +32 -0
- package/types/table/modules/table-scroll-bar.d.ts +33 -0
- package/types/table/modules/table-selection.d.ts +37 -0
- package/types/table/table-config.d.ts +38 -0
- package/types/table/utils/index.d.ts +17 -0
- package/types/table/utils/node-matchers.d.ts +9 -0
- package/types/toolbar/better-picker.d.ts +1 -0
- package/types/toolbar/index.d.ts +8 -0
- package/types/utils/debounce.d.ts +6 -0
- package/types/utils/image.d.ts +1 -0
- package/types/utils/method.d.ts +7 -0
- package/types/utils/scroll-lock.d.ts +6 -0
- package/types/video/index.d.ts +16 -0
|
@@ -109,6 +109,12 @@ function sanitize(url, protocols) {
|
|
|
109
109
|
const protocol = anchor.href.slice(0, anchor.href.indexOf(":"));
|
|
110
110
|
return protocols.includes(protocol);
|
|
111
111
|
}
|
|
112
|
+
function hadProtocol(url) {
|
|
113
|
+
if (!url || !/^(?:f|ht)tps?\:\/\//.test(url)) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
112
118
|
function isInside(position, dom) {
|
|
113
119
|
const areaPosition = dom.getBoundingClientRect();
|
|
114
120
|
const { pageX, pageY } = position;
|
|
@@ -126,6 +132,7 @@ function isInside(position, dom) {
|
|
|
126
132
|
const isPureIE = !!document.documentMode;
|
|
127
133
|
export {
|
|
128
134
|
getEventComposedPath,
|
|
135
|
+
hadProtocol,
|
|
129
136
|
hexToRgbA,
|
|
130
137
|
imageFileToUrl,
|
|
131
138
|
imageUrlToFile,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.utils.es.js","sources":["../../../src/config/editor.utils.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Delta = Quill.import('delta')\r\n\r\n// color hex to rgba\r\nexport function hexToRgbA(hex: string) {\r\n let color\r\n if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {\r\n color = hex.substring(1).split('')\r\n if (color.length === 3) {\r\n color = [color[0], color[0], color[1], color[1], color[2], color[2]]\r\n }\r\n color = `0x${color.join('')}`\r\n return (\r\n `rgba(${\r\n [(color >> 16) & 255, (color >> 8) & 255, color & 255].join(',')\r\n },1)`\r\n )\r\n }\r\n}\r\n\r\n/**\r\n * 将File格式的图片转换成Url格式\r\n * @param imageFile File格式的图片\r\n */\r\nexport function imageFileToUrl(imageFile) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader()\r\n reader.readAsDataURL(imageFile)\r\n reader.onload = function (e) {\r\n resolve(e.target.result)\r\n }\r\n reader.onerror = reject\r\n }).catch((error) => {\r\n console.error('Error reading file:', error)\r\n })\r\n}\r\n\r\n/**\r\n * 将Url格式的图片转换成File格式\r\n * @param imageUrl 图片的URL\r\n */\r\nexport function imageUrlToFile(imageUrl, isErrorImage?: boolean) {\r\n return new Promise((resolve, reject) => {\r\n fetch(imageUrl, {\r\n method: 'get',\r\n mode: 'no-cors',\r\n })\r\n .then(res => res.blob())\r\n .then((blob) => {\r\n if (!blob.type.includes('image') || !blob.type) {\r\n return reject()\r\n }\r\n const fileType = blob.type.replace(/^.*\\//, '')\r\n const fileName = isErrorImage\r\n ? 'editorx-error-image.png'\r\n : `image-${new Date().getTime()}.${fileType}`\r\n const file = new File([blob], fileName, blob)\r\n resolve(file)\r\n })\r\n .catch(reject)\r\n })\r\n}\r\n\r\nexport function insideTable(range = null, quill = this.quill) {\r\n let currentRange = range\r\n if (!currentRange) {\r\n currentRange = quill.getSelection()\r\n }\r\n // fix: 原有formats方法无法判断表格内的list和head附近粘贴\r\n const [line] = quill.getLine(currentRange.index)\r\n return line && !!line.domNode.closest('table.quill-better-table')\r\n}\r\n\r\nexport function isNullOrUndefined(param) {\r\n return param === null || param === undefined\r\n}\r\n\r\n/**\r\n * omit\r\n * @param obj target Object\r\n * @param uselessKeys keys of removed properties\r\n * @return new Object without useless properties\r\n */\r\nexport function omit(obj, uselessKeys) {\r\n return (\r\n obj\r\n && Object.keys(obj).reduce((acc, key) => {\r\n return uselessKeys.includes(key) ? acc : { ...acc, [key]: obj[key] }\r\n }, {})\r\n )\r\n}\r\n\r\n/**\r\n * 将delta中的图片替换成制定的图片数组,用于图片上传到服务器的场景\r\n * @param delta 原始delta\r\n * @param imageUrls 图片数组\r\n * @param imagePlaceholder 标识是否是占位图的数组,与图片数组一一对应\r\n * @return 替换之后的delta\r\n */\r\nexport function replaceDeltaImage(delta, imageUrls, imagePlaceholder) {\r\n let imageIndex = 0\r\n return delta.reduce((newDelta, op) => {\r\n if (op.insert.image && !op.insert.image.hasExisted) {\r\n const attributes = imagePlaceholder[imageIndex]\r\n ? { ...op.attributes, width: 'auto', height: 225 } // 占位图片应该固定大小\r\n : op.attributes\r\n newDelta.insert({ image: imageUrls[imageIndex] }, attributes)\r\n imageIndex++\r\n }\r\n else {\r\n newDelta.insert(op.insert, op.attributes)\r\n }\r\n return newDelta\r\n }, new Delta())\r\n}\r\n\r\nexport function splitWithBreak(insertContent: string) {\r\n const lines = []\r\n const insertStr = insertContent\r\n let start = 0\r\n for (let i = 0; i < insertContent.length; i++) {\r\n if (insertStr.charAt(i) === '\\n') {\r\n if (i === 0) {\r\n lines.push('\\n')\r\n }\r\n else {\r\n lines.push(insertStr.substring(start, i))\r\n lines.push('\\n')\r\n }\r\n start = i + 1\r\n }\r\n }\r\n\r\n const tailStr = insertStr.substring(start)\r\n if (tailStr) {\r\n lines.push(tailStr)\r\n }\r\n\r\n return lines\r\n}\r\n\r\n/**\r\n * getEventComposedPath\r\n * compatibility fixed for Event.path/Event.composedPath\r\n * Event.path is only for chrome/opera\r\n * Event.composedPath is for Safari, FF\r\n * Neither for Micro Edge\r\n * @return an array of event.path\r\n */\r\nexport function getEventComposedPath(evt) {\r\n let path\r\n // chrome, opera, safari, firefox\r\n path = evt.path || (evt.composedPath && evt.composedPath())\r\n\r\n // other: edge\r\n if (path === undefined && evt.target) {\r\n path = []\r\n let target = evt.target\r\n path.push(target)\r\n\r\n while (target && target.parentNode) {\r\n target = target.parentNode\r\n path.push(target)\r\n }\r\n }\r\n\r\n return path\r\n}\r\n\r\nexport function sanitize(url, protocols) {\r\n const anchor = document.createElement('a')\r\n anchor.href = url\r\n const protocol = anchor.href.slice(0, anchor.href.indexOf(':'))\r\n return protocols.includes(protocol)\r\n}\r\n\r\nexport function isInside(position, dom) {\r\n const areaPosition = dom.getBoundingClientRect()\r\n const { pageX, pageY } = position\r\n // getBoundingClientRect是不考虑窗口滚动的\r\n const left = pageX - window.scrollX\r\n const top = pageY - window.scrollY\r\n const {\r\n left: areaLeft,\r\n top: areaTop,\r\n width: areaWidth,\r\n height: areaHeight,\r\n } = areaPosition\r\n const inside\r\n = left > areaLeft\r\n && left < areaLeft + areaWidth\r\n && top > areaTop\r\n && top < areaTop + areaHeight\r\n return inside\r\n}\r\n\r\n// Internet Explorer 6-11\r\nexport const isPureIE = !!document.documentMode\r\n"],"names":[],"mappings":";AAEA,MAAM,QAAQ,MAAM,OAAO,OAAO;AAG3B,SAAS,UAAU,KAAa;AACjC,MAAA;AACA,MAAA,2BAA2B,KAAK,GAAG,GAAG;AACxC,YAAQ,IAAI,UAAU,CAAC,EAAE,MAAM,EAAE;AAC7B,QAAA,MAAM,WAAW,GAAG;AACtB,cAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,C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UAAM,KAAK,OAAO;AAAA,EACpB;AAEO,SAAA;AACT;AAUO,SAAS,qBAAqB,KAAK;AACpC,MAAA;AAEJ,SAAO,IAAI,QAAS,IAAI,gBAAgB,IAAI;AAGxC,MAAA,SAAS,UAAa,IAAI,QAAQ;AACpC,WAAO,CAAA;AACP,QAAI,SAAS,IAAI;AACjB,SAAK,KAAK,MAAM;AAET,WAAA,UAAU,OAAO,YAAY;AAClC,eAAS,OAAO;AAChB,WAAK,KAAK,MAAM;AAAA,IAClB;AAAA,EACF;AAEO,SAAA;AACT;AAEgB,SAAA,SAAS,KAAK,WAAW;AACjC,QAAA,SAAS,SAAS,cAAc,GAAG;AACzC,SAAO,OAAO;AACR,QAAA,WAAW,OAAO,KAAK,MAAM,GAAG,OAAO,KAAK,QAAQ,GAAG,CAAC;AACvD,SAAA,UAAU,SAAS,QAAQ;AACpC;AAEgB,SAAA,SAAS,UAAU,KAAK;AAChC,QAAA,eAAe,IAAI;AACnB,QAAA,EAAE,OAAO,MAAU,IAAA;AAEnB,QAAA,OAAO,QAAQ,OAAO;AACtB,QAAA,MAAM,QAAQ,OAAO;AACrB,QAAA;AAAA,IACJ,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,EACN,IAAA;AACE,QAAA,SACF,OAAO,YACN,OAAO,WAAW,aAClB,MAAM,WACN,MAAM,UAAU;AACd,SAAA;AACT;AAGa,MAAA,WAAW,CAAC,CAAC,SAAS;"}
|
|
1
|
+
{"version":3,"file":"editor.utils.es.js","sources":["../../../src/config/editor.utils.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Delta = Quill.import('delta')\r\n\r\n// color hex to rgba\r\nexport function hexToRgbA(hex: string) {\r\n let color\r\n if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {\r\n color = hex.substring(1).split('')\r\n if (color.length === 3) {\r\n color = [color[0], color[0], color[1], color[1], color[2], color[2]]\r\n }\r\n color = `0x${color.join('')}`\r\n return (\r\n `rgba(${\r\n [(color >> 16) & 255, (color >> 8) & 255, color & 255].join(',')\r\n },1)`\r\n )\r\n }\r\n}\r\n\r\n/**\r\n * 将File格式的图片转换成Url格式\r\n * @param imageFile File格式的图片\r\n */\r\nexport function imageFileToUrl(imageFile) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader()\r\n reader.readAsDataURL(imageFile)\r\n reader.onload = function (e) {\r\n resolve(e.target.result)\r\n }\r\n reader.onerror = reject\r\n }).catch((error) => {\r\n console.error('Error reading file:', error)\r\n })\r\n}\r\n\r\n/**\r\n * 将Url格式的图片转换成File格式\r\n * @param imageUrl 图片的URL\r\n */\r\nexport function imageUrlToFile(imageUrl, isErrorImage?: boolean) {\r\n return new Promise((resolve, reject) => {\r\n fetch(imageUrl, {\r\n method: 'get',\r\n mode: 'no-cors',\r\n })\r\n .then(res => res.blob())\r\n .then((blob) => {\r\n if (!blob.type.includes('image') || !blob.type) {\r\n return reject()\r\n }\r\n const fileType = blob.type.replace(/^.*\\//, '')\r\n const fileName = isErrorImage\r\n ? 'editorx-error-image.png'\r\n : `image-${new Date().getTime()}.${fileType}`\r\n const file = new File([blob], fileName, blob)\r\n resolve(file)\r\n })\r\n .catch(reject)\r\n })\r\n}\r\n\r\nexport function insideTable(range = null, quill = this.quill) {\r\n let currentRange = range\r\n if (!currentRange) {\r\n currentRange = quill.getSelection()\r\n }\r\n // fix: 原有formats方法无法判断表格内的list和head附近粘贴\r\n const [line] = quill.getLine(currentRange.index)\r\n return line && !!line.domNode.closest('table.quill-better-table')\r\n}\r\n\r\nexport function isNullOrUndefined(param) {\r\n return param === null || param === undefined\r\n}\r\n\r\n/**\r\n * omit\r\n * @param obj target Object\r\n * @param uselessKeys keys of removed properties\r\n * @return new Object without useless properties\r\n */\r\nexport function omit(obj, uselessKeys) {\r\n return (\r\n obj\r\n && Object.keys(obj).reduce((acc, key) => {\r\n return uselessKeys.includes(key) ? acc : { ...acc, [key]: obj[key] }\r\n }, {})\r\n )\r\n}\r\n\r\n/**\r\n * 将delta中的图片替换成制定的图片数组,用于图片上传到服务器的场景\r\n * @param delta 原始delta\r\n * @param imageUrls 图片数组\r\n * @param imagePlaceholder 标识是否是占位图的数组,与图片数组一一对应\r\n * @return 替换之后的delta\r\n */\r\nexport function replaceDeltaImage(delta, imageUrls, imagePlaceholder) {\r\n let imageIndex = 0\r\n return delta.reduce((newDelta, op) => {\r\n if (op.insert.image && !op.insert.image.hasExisted) {\r\n const attributes = imagePlaceholder[imageIndex]\r\n ? { ...op.attributes, width: 'auto', height: 225 } // 占位图片应该固定大小\r\n : op.attributes\r\n newDelta.insert({ image: imageUrls[imageIndex] }, attributes)\r\n imageIndex++\r\n }\r\n else {\r\n newDelta.insert(op.insert, op.attributes)\r\n }\r\n return newDelta\r\n }, new Delta())\r\n}\r\n\r\nexport function splitWithBreak(insertContent: string) {\r\n const lines = []\r\n const insertStr = insertContent\r\n let start = 0\r\n for (let i = 0; i < insertContent.length; i++) {\r\n if (insertStr.charAt(i) === '\\n') {\r\n if (i === 0) {\r\n lines.push('\\n')\r\n }\r\n else {\r\n lines.push(insertStr.substring(start, i))\r\n lines.push('\\n')\r\n }\r\n start = i + 1\r\n }\r\n }\r\n\r\n const tailStr = insertStr.substring(start)\r\n if (tailStr) {\r\n lines.push(tailStr)\r\n }\r\n\r\n return lines\r\n}\r\n\r\n/**\r\n * getEventComposedPath\r\n * compatibility fixed for Event.path/Event.composedPath\r\n * Event.path is only for chrome/opera\r\n * Event.composedPath is for Safari, FF\r\n * Neither for Micro Edge\r\n * @return an array of event.path\r\n */\r\nexport function getEventComposedPath(evt) {\r\n let path\r\n // chrome, opera, safari, firefox\r\n path = evt.path || (evt.composedPath && evt.composedPath())\r\n\r\n // other: edge\r\n if (path === undefined && evt.target) {\r\n path = []\r\n let target = evt.target\r\n path.push(target)\r\n\r\n while (target && target.parentNode) {\r\n target = target.parentNode\r\n path.push(target)\r\n }\r\n }\r\n\r\n return path\r\n}\r\n\r\nexport function sanitize(url, protocols) {\r\n const anchor = document.createElement('a')\r\n anchor.href = url\r\n const protocol = anchor.href.slice(0, anchor.href.indexOf(':'))\r\n return protocols.includes(protocol)\r\n}\r\n\r\nexport function hadProtocol(url: string) {\r\n if (!url || !/^(?:f|ht)tps?\\:\\/\\//.test(url)) {\r\n return false\r\n }\r\n return true\r\n}\r\n\r\nexport function isInside(position, dom) {\r\n const areaPosition = dom.getBoundingClientRect()\r\n const { pageX, pageY } = position\r\n // getBoundingClientRect是不考虑窗口滚动的\r\n const left = pageX - window.scrollX\r\n const top = pageY - window.scrollY\r\n const {\r\n left: areaLeft,\r\n top: areaTop,\r\n width: areaWidth,\r\n height: areaHeight,\r\n } = areaPosition\r\n const inside\r\n = left > areaLeft\r\n && left < areaLeft + areaWidth\r\n && top > areaTop\r\n && top < areaTop + areaHeight\r\n return inside\r\n}\r\n\r\n// Internet Explorer 6-11\r\nexport const isPureIE = !!document.documentMode\r\n"],"names":[],"mappings":";AAEA,MAAM,QAAQ,MAAM,OAAO,OAAO;AAG3B,SAAS,UAAU,KAAa;AACjC,MAAA;AACA,MAAA,2BAA2B,KAAK,GAAG,GAAG;AACxC,YAAQ,IAAI,UAAU,CAAC,EAAE,MAAM,EAAE;AAC7B,QAAA,MAAM,WAAW,GAAG;AACtB,cAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;AAAA,IACrE;AACA,YAAQ,KAAK,MAAM,KAAK,EAAE,CAAC;AAC3B,WACE,QACE,CAAE,SAAS,KAAM,KAAM,SAAS,IAAK,KAAK,QAAQ,GAAG,EAAE,KAAK,GAAG,CACjE;AAAA,EAEJ;AACF;AAMO,SAAS,eAAe,WAAW;AACxC,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AAChC,UAAA,SAAS,IAAI;AACnB,WAAO,cAAc,SAAS;AACvB,WAAA,SAAS,SAAU,GAAG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EACF;AAEO,SAAA;AACT;AAEgB,SAAA,SAAS,KAAK,WAAW;AACjC,QAAA,SAAS,SAAS,cAAc,GAAG;AACzC,SAAO,OAAO;AACR,QAAA,WAAW,OAAO,KAAK,MAAM,GAAG,OAAO,KAAK,QAAQ,GAAG,CAAC;AACvD,SAAA,UAAU,SAAS,QAAQ;AACpC;AAEO,SAAS,YAAY,KAAa;AACvC,MAAI,CAAC,OAAO,CAAC,sBAAsB,KAAK,GAAG,GAAG;AACrC,WAAA;AAAA,EACT;AACO,SAAA;AACT;AAEgB,SAAA,SAAS,UAAU,KAAK;AAChC,QAAA,eAAe,IAAI;AACnB,QAAA,EAAE,OAAO,MAAU,IAAA;AAEnB,QAAA,OAAO,QAAQ,OAAO;AACtB,QAAA,MAAM,QAAQ,OAAO;AACrB,QAAA;AAAA,IACJ,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,EACN,IAAA;AACE,QAAA,SACF,OAAO,YACN,OAAO,WAAW,aAClB,MAAM,WACN,MAAM,UAAU;AACd,SAAA;AACT;AAGa,MAAA,WAAW,CAAC,CAAC,SAAS;"}
|
|
@@ -261,6 +261,11 @@ const GLOBAL_LINK_ICON = `<svg t="1721963743677" class="icon" viewBox="0 0 1024
|
|
|
261
261
|
const FULLSCREEN_ICON = `<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="100%" height="100%" viewBox="0 0 1024 1024" version="1.1">
|
|
262
262
|
<path fill="#333333" d="M64 384h96V160h224.2V64H64zM639.8 64v96H864v224h96V64zM864 864H639.8v96H960V639.61h-96zM160 639.61H64V960h320.2v-96H160z"/>
|
|
263
263
|
</svg>`;
|
|
264
|
+
const FULLSCREEN_EXIT_ICON = `
|
|
265
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
266
|
+
<path fill="currentColor" d="M6 21v-3H3v-2h5v5zm10 0v-5h5v2h-3v3zM3 8V6h3V3h2v5zm13 0V3h2v3h3v2z"/>
|
|
267
|
+
</svg>
|
|
268
|
+
`;
|
|
264
269
|
const TRIANGLE_DOWN_ICON = `<i class="icon-triangle-down"></i>`;
|
|
265
270
|
const FORMAT_PAINTER_ICON = `<svg viewBox="0 0 32 32"><path fill="currentColor" d="M28.83 23.17L23 17.33V13a1 1 0 0 0-.29-.71l-10-10a1 1 0 0 0-1.42 0l-9 9a1 1 0 0 0 0 1.42l10 10A1 1 0 0 0 13 23h4.34l5.83 5.84a4 4 0 0 0 5.66-5.66ZM6 10.41l2.29 2.3l1.42-1.42L7.41 9L9 7.41l4.29 4.3l1.42-1.42L10.41 6L12 4.41L18.59 11L11 18.59L4.41 12Zm21.41 17a2 2 0 0 1-2.82 0l-6.13-6.12a1.8 1.8 0 0 0-.71-.29h-4.34l-1-1L20 12.41l1 1v4.34a1 1 0 0 0 .29.7l6.12 6.14a2 2 0 0 1 0 2.82"/></svg>`;
|
|
266
271
|
export {
|
|
@@ -277,6 +282,7 @@ export {
|
|
|
277
282
|
EMOJI_ICON,
|
|
278
283
|
FILE_ICON,
|
|
279
284
|
FORMAT_PAINTER_ICON,
|
|
285
|
+
FULLSCREEN_EXIT_ICON,
|
|
280
286
|
FULLSCREEN_ICON,
|
|
281
287
|
GLOBAL_LINK_ICON,
|
|
282
288
|
HELP_ICON,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.config.es.js","sources":["../../../src/config/icons.config.ts"],"sourcesContent":["export const UNDO_ICON = `<svg width=\"16px\" height=\"14px\" viewBox=\"0 0 16 14\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(0.000000, -1.000000)\" fill=\"#293040\">\r\n <path d=\"M11,5 C13.7614237,5 16,7.23857625 16,10 C16,12.7614237 13.7614237,15 11,15 L7,15 L7,14 L11,14\r\n C13.209139,14 15,12.209139 15,10 C15,7.790861 13.209139,6 11,6 L5,6 L5,10 L0,5.5 L5,1 L5,5 L11,5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const REDO_ICON = `<svg width=\"16px\" height=\"14px\" viewBox=\"0 0 16 14\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(0.000000, -1.000000)\" fill=\"#293040\">\r\n <path d=\"M5,5 L11,5 L11,1 L16,5.5 L11,10 L11,6 L5,6 C2.790861,6 1,7.790861 1,10 C1,12.209139 2.790861,14 5,14 L9,14\r\n L9,15 L5,15 C2.23857625,15 0,12.7614237 0,10 C0,7.23857625 2.23857625,5 5,5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const CLEAN_ICON = `<svg width=\"16px\" height=\"15px\" viewBox=\"0 0 16 15\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g fill=\"#293040\">\r\n <path d=\"M4.32708124,14 L8.37150583,14 L10.5729409,11.5550586 L4.6297198,6.20375828 L1.25465311,9.95542661\r\n C1.09078634,10.1375782 1.0006437,10.3742369 1.00180556,10.6192474 C1.00295568,10.8617824 1.10621221,11.092615\r\n 1.28624979,11.2551297 L4.32708124,14 Z M16,14 L16,15 L3.93760008,15 L0.597250175,11.9923354 C0.217072683,11.6500221\r\n 1.59049582e-13,11.1091757 1.59428026e-13,10.6149383 C1.59806471e-13,10.1207008 0.183000942,9.64396706 0.513710349,9.27667705\r\n L8.56855175,0.330869394 L16,7.02217546 L9.71713856,14 L16,14 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const BOLD_ICON = `<svg width=\"12px\" height=\"16px\" viewBox=\"0 0 12 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-2.000000, 0.000000)\" fill=\"#293040\" fill-rule=\"nonzero\">\r\n <path d=\"M11.540636,7.0842147 C13.0068647,7.89340318 14,9.45459285 14,11.2477417 C14,13.8723415 11.8723415,16\r\n 9.2477417,16 L2,16 L2,7.99258423 L2,-5.06261699e-14 L9.00370789,-4.75175455e-14 C11.2107991,-4.79229815e-14 13,1.78920092\r\n 13,3.99629211 C13,5.24014846 12.4317244,6.35127692 11.540636,7.0842147 Z M3.5,1.5 L3.5,6.49258423 L9.00370789,6.49258423\r\n C10.382372,6.49258423 11.5,5.37495618 11.5,3.99629211 C11.5,2.61762805 10.382372,1.5 9.00370789,1.5 L3.5,1.5 Z M3.5,14.5\r\n L9.2477417,14.5 C11.0439144,14.5 12.5,13.0439144 12.5,11.2477417 C12.5,9.45156904 11.0439144,7.9954834 9.2477417,7.9954834\r\n L3.5,7.9954834 L3.5,14.5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const ITALIC_ICON = `<svg width=\"9px\" height=\"16px\" viewBox=\"0 0 9 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-4.000000, 0.000000)\" fill=\"#293040\">\r\n <path d=\"M10.2565501,1.5 L8.41332415,14.5 L12,14.5 L12,16 L4,16 L4,14.5 L6.90083611,14.5 L8.74406208,1.5 L5,1.5\r\n L5,0 L13,0 L13,1.5 L10.2565501,1.5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const UNDERLINE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <polygon fill=\"#293040\" points=\"2 14 14 14 14 16 2 16\"></polygon>\r\n <path d=\"M4.5,3 L4.5,7 C4.5,8.93299662 6.06700338,10.5 8,10.5 C9.93299662,10.5 11.5,8.93299662 11.5,7 L11.5,1.5\r\n L11.4998322,0 L13,0 L13,7 C13,9.76142375 10.7614237,12 8,12 C5.23857625,12 3,9.76142375 3,7 L3,0 L4.49893188,0\r\n L4.49893188,3 L4.5,3 Z\" fill=\"#293040\" fill-rule=\"nonzero\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const STRIKE_ICON = `<svg width=\"14px\" height=\"16px\" viewBox=\"0 0 14 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1.000000, 0.000000)\" fill=\"#293040\">\r\n <path d=\"M9.93321102,9 L1,9 L1,7 L3.84197169,7 C3.31015092,6.28495098 3,5.42507332 3,4.5 C3,2.01471863\r\n 5.23857625,0 8,0 C10.5736409,0 12.6931261,1.75002477 12.969484,4 L11.4507289,4 C11.1737591,2.60626201 9.76011738,1.5 8,1.5\r\n C6.03382604,1.5 4.5,2.88044344 4.5,4.5 C4.5,5.52604325 5.11562351,6.45611494 6.06678898,7 L15,7 L15,9 L12.1580283,9\r\n C12.6898491,9.71504902 13,10.5749267 13,11.5 C13,13.9852814 10.7614237,16 8,16 C5.42635908,16 3.30687393,14.2499752\r\n 3.03051599,12 L4.54927112,12 C4.82624092,13.393738 6.23988262,14.5 8,14.5 C9.96617396,14.5 11.5,13.1195566 11.5,11.5\r\n C11.5,10.4739568 10.8843765,9.54388506 9.93321102,9 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const COLOR_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <polygon fill=\"#293040\" points=\"2 14 14 14 14 16 2 16\"></polygon>\r\n <path d=\"M10.9166667,8.5 L5.08333333,8.5 L4.26618123,10.461165 L3.62338765,12 L2,12 L7,0 L9,0 L14,12 L12.3824972,12\r\n L11.5753038,10.0807292 L10.9166667,8.5 Z M10.2916667,7 L8,1.5 L5.70833333,7 L10.2916667,7 Z\"\r\n fill=\"#293040\" fill-rule=\"nonzero\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const BACKGROUND_COLOR_ICON = ` <svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M4.64447006,9.66583547 L3.17597929,8.33216965 L6.15933183,5.11039074 L5.42508645,4.44355783\r\n L9.39179153,1.0658141e-13 L16,6.00149616 L12.0332949,10.445054 L11.2990495,9.77822108 L8.31569698,13 L6.84720621,11.6663342\r\n L5.69344476,12.9587937 L2.36400649,12.9587937 L2,12.6282074 L4.64447006,9.66583547 Z M4.57134219,8.25840959\r\n L8.24256911,11.5925741 L10.5648041,9.11138818 L6.89357722,5.77722364 L4.57134219,8.25840959 Z M14.6046371,6.07525623\r\n L9.4649194,1.40742588 L6.82044935,4.36979777 L11.960167,9.03762811 L14.6046371,6.07525623 Z M2,14 L14,14 L14,16 L2,16 L2,14 Z\"\r\n fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const ALIGN_LEFT_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M0,0 L1.5,0 L1.5,16 L0,16 L0,0 Z M4,3 L13,3 L13,7 L4,7 L4,3 Z M5,4 L5,6 L12,6 L12,4 L5,4 Z M4,9 L16,9\r\n L16,13 L4,13 L4,9 Z M5,10 L5,12 L15,12 L15,10 L5,10 Z\" fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const ALIGN_CENTER_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M8.75,7 L8.75,9 L16,9 L16,13 L8.75,13 L8.75,16 L7.25,16 L7.25,13 L0,13 L0,9 L7.25,9 L7.25,7 L2,7\r\n L2,3 L7.25,3 L7.25,0 L8.75,0 L8.75,3 L14,3 L14,7 L8.75,7 Z M1,10 L1,12 L15,12 L15,10 L1,10 Z M3,4 L3,6 L13,6\r\n L13,4 L3,4 Z\" fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const ALIGN_RIGHT_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M14.5,0 L16,0 L16,16 L14.5,16 L14.5,0 Z M3,3 L12,3 L12,7 L3,7 L3,3 Z M4,4 L4,6 L11,6 L11,4 L4,4 Z\r\n M0,9 L12,9 L12,13 L0,13 L0,9 Z M1,10 L1,12 L11,12 L11,10 L1,10 Z\" fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const LIST_UNORDERED_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g fill=\"#293040\">\r\n <path d=\"M5,1 L16,1 L16,2.5 L5,2.5 L5,1 Z M2,4 C0.8954305,4 0,3.1045695 0,2 C0,0.8954305 0.8954305,0 2,0\r\n C3.1045695,0 4,0.8954305 4,2 C4,3.1045695 3.1045695,4 2,4 Z M2,3 C2.55228475,3 3,2.55228475 3,2 C3,1.44771525\r\n 2.55228475,1 2,1 C1.44771525,1 1,1.44771525 1,2 C1,2.55228475 1.44771525,3 2,3 Z M2,10 C0.8954305,10 0,9.1045695\r\n 0,8 C0,6.8954305 0.8954305,6 2,6 C3.1045695,6 4,6.8954305 4,8 C4,9.1045695 3.1045695,10 2,10 Z M2,9 C2.55228475,9\r\n 3,8.55228475 3,8 C3,7.44771525 2.55228475,7 2,7 C1.44771525,7 1,7.44771525 1,8 C1,8.55228475 1.44771525,9 2,9 Z\r\n M2,16 C0.8954305,16 0,15.1045695 0,14 C0,12.8954305 0.8954305,12 2,12 C3.1045695,12 4,12.8954305 4,14 C4,15.1045695\r\n 3.1045695,16 2,16 Z M2,15 C2.55228475,15 3,14.5522847 3,14 C3,13.4477153 2.55228475,13 2,13 C1.44771525,13 1,13.4477153\r\n 1,14 C1,14.5522847 1.44771525,15 2,15 Z M5,7 L16,7 L16,8.5 L5,8.5 L5,7 Z M5,13 L16,13 L16,14.5 L5,14.5 L5,13 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const LIST_ORDERED_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g fill=\"#293040\">\r\n <path d=\"M5,1 L16,1 L16,2.5 L5,2.5 L5,1 Z M0,0 L2,0 L2,3 L3,3 L3,4 L0,4 L0,3 L1,3 L1,1 L0,1 L0,0 Z M5,7 L16,7\r\n L16,8.5 L5,8.5 L5,7 Z M5,13 L16,13 L16,14.5 L5,14.5 L5,13 Z M0,15 L1.75,15 C1.88807119,15 2,14.8880712 2,14.75\r\n C2,14.6119288 1.88807119,14.5 1.75,14.5 L0,14.5 L0,13.5 L1.75,13.5 C1.88807119,13.5 2,13.3880712 2,13.25 C2,13.1119288\r\n 1.88807119,13 1.75,13 L0,13 L0,12 L1.5,12 C2.32842712,12 3,12.6715729 3,13.5 C3,13.6753177 2.96992289,13.8436105\r\n 2.91464715,14 C2.96992289,14.1563895 3,14.3246823 3,14.5 C3,15.3284271 2.32842712,16 1.5,16 L0,16 L0,15 Z M2,7.5\r\n C2,7.35127258 1.9375,7.22627258 1.84375,7.13845444 C1.76307119,7.05596441 1.63807119,7 1.5,7 C1.22385763,7 1,7.22385763\r\n 1,7.5 L1.62630326e-19,7.5 C0.147399902,6.5 0.647399902,6 1.5,6 C2.32842712,6 3,6.67157288 3,7.5 C3,8.07312512\r\n 2.50016007,8.55650475 2.22821045,8.74661255 C1.95626083,8.93672035 1.77325955,8.99789088 1.76769962,9 L3,9 L3,10\r\n L0,10 L1.62630326e-19,9 C0.619515577,8.77257137 1.06188822,8.55939591 1.32711792,8.36047363 C1.6371448,8.12795347\r\n 1.87259637,7.91592701 1.96143498,7.69289356 C1.98627694,7.633537 2,7.5683711 2,7.5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const LIST_CHECK_ICON = `<svg width=\"15px\" height=\"14px\" viewBox=\"0 0 15 14\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1058.000000, -97.000000)\">\r\n <g transform=\"translate(407.000000, 93.000000)\">\r\n <g transform=\"translate(650.000000, 2.000000)\">\r\n <rect x=\"0\" y=\"0\" width=\"16\" height=\"16\"></rect>\r\n <polygon fill=\"#293040\" fill-rule=\"nonzero\" points=\"14 15 14 9.37100497 15 9.37100497 15\r\n 16 1 16 1 2 10.1946467 2 10.1946467 3 2 3 2 15\"></polygon>\r\n <path d=\"M14.4525049,2.48740937 C14.7356009,2.1850362 15.8305911,3.21021745 15.5474951,3.51259063\r\n L8.45990379,11.0828057 L4.46558382,7.02621226 C4.17496481,6.73106236 4.17863783,6.25620283 4.47378774,5.96558382\r\n C4.76893764,5.67496481 5.24379717,5.67863783 5.53441618,5.97378774 L8.43263799,8.91719429 L14.4525049,2.48740937 Z\"\r\n fill=\"#293040\" fill-rule=\"nonzero\"></path>\r\n </g>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const CODE_BLOCK_ICON = `<svg t=\"1565073788159\" class=\"icon\" viewBox=\"0 0 1024 1024\" width=\"16\" height=\"16\">\r\n<path d=\"M110.78 469.52l70.44-39.24A60 60 0 0 0 212 377.9L212 212a120 120 0 0 1 120-120l60 0a30\r\n30 0 0 1 0 60L332 152a60 60 0 0 0-59.99999999 60l0 175.38a120 120 0 0\r\n1-63.48000001 105.9L173.42 512l35.1 18.72A120 120 0 0 1 272 636.56L272.00000001 812a60 60 0 0 0 59.99999999 60l60 0a30 30\r\n0 1 1 0 60L332 932a120 120 0 0 1-120-120l0-165.9a60\r\n60 0 0 0-30.78-52.38l-70.44-39.24a45 45 0 0 1 0-84.96z m742.44 1e-8a45 45 0 0 1 0 84.95999998l-70.44 39.24000001a60\r\n60 0 0 0-30.78000001 52.38L751.99999999 812a120 120 0 0 1-119.99999999 120L572 932a30 30\r\n0 1 1 0-60l60 0a60 60 0 0 0 60-60l0-175.38a120 120\r\n0 0 1 63.48-105.9L790.58 512l-35.1-18.72A120 120 0 0 1 692 387.44L692 212a60 60 0 0 0-60-60L572 152a30\r\n30 0 0 1 0-60l60 0a120 120 0 0 1 119.99999999 120l0 165.9a60 60 0 0 0 30.78000001 52.38l70.44 39.24000001z\"></path></svg>`\r\n\r\nexport const BLOCKQUOTE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(0.000000, 1.000000)\" fill=\"#000000\" fill-rule=\"nonzero\">\r\n <path d=\"M6.86733556,12.5574136 L6.86733556,7.99108138 L2.52931996,7.99108138 C2.41516165,5.02296544\r\n 3.10011148,3.42474916 5.72575251,2.0548495 L5.72575251,0 C1.84437012,1.36989967 -0.0963210702,3.88138239 0.0178372352,7.76276477\r\n L0.0178372352,12.5574136 L6.86733556,12.5574136 Z M16,12.5574136 L16,7.99108138 L11.6619844,7.99108138 C11.5478261,5.02296544\r\n 12.2327759,3.42474916 14.8584169,2.0548495 L14.8584169,0 C10.9770346,1.36989967 9.03634337,3.88138239 9.15050167,7.76276477\r\n L9.15050167,12.5574136 L16,12.5574136 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const IMAGE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1196.000000, -96.000000)\" fill=\"#293040\" fill-rule=\"nonzero\">\r\n <g transform=\"translate(407.000000, 93.000000)\">\r\n <path d=\"M804,4 L790,4 L790,11.940983 L794.058237,9.91186456 L798.536534,13.3949845 L801.014076,11.908459\r\n L804,13.8990748 L804,4 Z M803.72265,14.9160251 L800.985924,13.091541 L798.463466,14.6050155 L793.941763,11.0881354\r\n L790.223607,12.9472136 C790.151699,12.9831673 790.07527,13.000168 790,13.0001094 L790,18 L804,18 L804,15.0000529\r\n C803.90455,15.0001406 803.80803,14.9729453 803.72265,14.9160251 Z M789,19 L789,3 L805,3 L805,19 L789,19 Z M801,9\r\n C800.447715,9 800,8.55228475 800,8 C800,7.44771525 800.447715,7 801,7 C801.552285,7 802,7.44771525 802,8 C802,8.55228475\r\n 801.552285,9 801,9 Z\"></path>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const FILE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\" >\r\n<g id=\"icon/01\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M16,16 L1,16 L1,0 L12,0 L16,4 L16,16 Z M11,1 L2,1 L2,15 L15,15 L15,\r\n 5 L11,5 L11,1 Z M12,1.533 L12,4 L14.52,4 L12,1.533 Z\"\r\n id=\"Combined-Shape\" fill=\"#293040\" fill-rule=\"nonzero\">\r\n </path>\r\n <polygon id=\"path\" fill=\"#293040\" points=\"8 8 6 8 8.5 5 11 8 9 8 9 12 8 12\"></polygon>\r\n</g>\r\n</svg>`\r\n\r\nexport const TABLE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1227.000000, -96.000000)\" fill=\"#293040\">\r\n <g transform=\"translate(407.000000, 93.000000)\">\r\n <path d=\"M820,3 L836,3 L836,19 L820,19 L820,3 Z M821,4 L821,8 L835,8 L835,4 L821,4 Z M821,9 L821,13 L825,\r\n 13 L825,9 L821,9 Z M821,14 L821,18 L825,18 L825,14 L821,14 Z M826,9 L826,13 L830,13 L830,9 L826,9 Z M826,\r\n 14 L826,18 L830,18 L830,14 L826,14 Z M831,9 L831,13 L835,13 L835,9 L831,9 Z M831,14 L831,18 L835,18 L835,\r\n 14 L831,14 Z\"></path>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const LINK_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1258.000000, -96.000000)\" fill=\"#293040\" fill-rule=\"nonzero\">\r\n <g transform=\"translate(407.000000, 93.000000)\">\r\n <path d=\"M855.499,13.863 L861.863,7.499 L862.573,8.209 L856.209,14.573 L855.499,13.863 Z M854.646498,9.99452063\r\n C854.661947,10.0108615 854.677673,10.0270363 854.693676,10.0430391 L855.388521,10.7378841 L852.802248,13.3241571\r\n C851.732584,14.3938208 851.732584,16.1280884 852.802248,17.1977522 C853.871912,18.2674159 855.606179,18.2674159\r\n 856.675843,17.1977522 L859.262116,14.6114792 L859.956961,15.3063242 C859.972964,15.3223269 859.989138,15.3380528\r\n 860.005479,15.3535018 L857.468863,17.8901187 C855.989021,19.3699604 853.589723,19.3699604 852.109881,17.8901187\r\n C850.63004,16.4102769 850.63004,14.0109793 852.109881,12.5311375 L854.646498,9.99452063 Z M857.994521,6.64649819\r\n L860.531137,4.10988134 C862.010979,2.63003955 864.410277,2.63003955 865.890119,4.10988134 C867.36996,5.58972313\r\n 867.36996,7.98902073 865.890119,9.46886252 L863.353502,12.0054794 C863.338053,11.9891385 863.322327,11.9729637\r\n 863.306324,11.9569609 L862.611479,11.2621159 L865.197752,8.67584293 C866.267416,7.60617918 866.267416,5.87191157\r\n 865.197752,4.80224782 C864.128088,3.73258406 862.393821,3.73258406 861.324157,4.80224782 L858.737884,7.38852082\r\n L858.043039,6.69367584 C858.027036,6.67767307 858.010862,6.66194719 857.994521,6.64649819 Z\"></path>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const EMOJI_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M8,16 C3.581722,16 0,12.418278 0,8 C0,3.581722 3.581722,0 8,0 C12.418278,0 16,3.581722 16,8 C16,12.418278\r\n 12.418278,16 8,16 Z M8,15 C11.8659932,15 15,11.8659932 15,8 C15,4.13400675 11.8659932,1 8,1 C4.13400675,1 1,4.13400675\r\n 1,8 C1,11.8659932 4.13400675,15 8,15 Z M5,7 C4.44771525,7 4,6.55228475 4,6 C4,5.44771525 4.44771525,5 5,5 C5.55228475,5\r\n 6,5.44771525 6,6 C6,6.55228475 5.55228475,7 5,7 Z M11,7 C10.4477153,7 10,6.55228475 10,6 C10,5.44771525 10.4477153,5 11,5\r\n C11.5522847,5 12,5.44771525 12,6 C12,6.55228475 11.5522847,7 11,7 Z M4,10 L12,10 C11.5415129,11.7252272 9.9244686,13 8,13\r\n C6.0755314,13 4.45848714,11.7252272 4,10 Z\" fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const SCREENSHOT_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\" version=\"1.1\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1529.000000, -96.000000)\">\r\n <g transform=\"translate(1529.000000, 96.000000)\">\r\n <rect fill=\"#000000\" fill-rule=\"nonzero\" opacity=\"0\" x=\"0\" y=\"0\" width=\"16\" height=\"16\"></rect>\r\n <polyline stroke=\"currentColor\" points=\"16 14 2 14 2 0 2 0\"></polyline>\r\n <polyline stroke=\"currentColor\" points=\"4 2 14 2 14 12\"></polyline>\r\n <rect fill=\"currentColor\" x=\"0\" y=\"1.5\" width=\"2\" height=\"1\"></rect>\r\n <rect fill=\"currentColor\"\r\n transform=\"translate(14.000000, 15.000000)\r\n rotate(-90.000000)\r\n translate(-14.000000, -15.000000) \" x=\"13\" y=\"14.5\" width=\"2\" height=\"1\">\r\n </rect>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const CODE_ICON = `<svg t=\"1721956397010\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"4254\" width=\"20\" height=\"20\"><path d=\"M438.4 849.1l222.7-646.7c0.2-0.5 0.3-1.1 0.4-1.6L438.4 849.1z\" opacity=\".224\" p-id=\"4255\"></path><path d=\"M661.2 168.7h-67.5c-3.4 0-6.5 2.2-7.6 5.4L354.7 846c-0.3 0.8-0.4 1.7-0.4 2.6 0 4.4 3.6 8 8 8h67.8c3.4 0 6.5-2.2 7.6-5.4l0.7-2.1 223.1-648.3 7.4-21.4c0.3-0.8 0.4-1.7 0.4-2.6-0.1-4.5-3.6-8.1-8.1-8.1zM954.6 502.1c-0.8-1-1.7-1.9-2.7-2.7l-219-171.3c-3.5-2.7-8.5-2.1-11.2 1.4-1.1 1.4-1.7 3.1-1.7 4.9v81.3c0 2.5 1.1 4.8 3.1 6.3l115 90-115 90c-1.9 1.5-3.1 3.8-3.1 6.3v81.3c0 4.4 3.6 8 8 8 1.8 0 3.5-0.6 4.9-1.7l219-171.3c6.9-5.4 8.2-15.5 2.7-22.5zM291.1 328.1l-219 171.3c-1 0.8-1.9 1.7-2.7 2.7-5.4 7-4.2 17 2.7 22.5l219 171.3c1.4 1.1 3.1 1.7 4.9 1.7 4.4 0 8-3.6 8-8v-81.3c0-2.5-1.1-4.8-3.1-6.3l-115-90 115-90c1.9-1.5 3.1-3.8 3.1-6.3v-81.3c0-1.8-0.6-3.5-1.7-4.9-2.7-3.5-7.7-4.1-11.2-1.4z\" p-id=\"4256\"></path></svg>`\r\n\r\nexport const MENTION_ICON = `<i class=\"icon-set-keyword\"></i>`\r\n\r\nexport const QUICK_MENU_ICON = `<i class=\"icon-publish\"></i>`\r\n\r\nexport const SAVE_ICON = `<i class=\"icon-save\"></i>`\r\n\r\nexport const HELP_ICON = `<svg t=\"1721963829631\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"9764\" width=\"20\" height=\"20\"><path d=\"M512 74.666667C270.933333 74.666667 74.666667 270.933333 74.666667 512S270.933333 949.333333 512 949.333333 949.333333 753.066667 949.333333 512 753.066667 74.666667 512 74.666667z m0 810.666666c-204.8 0-373.333333-168.533333-373.333333-373.333333S307.2 138.666667 512 138.666667 885.333333 307.2 885.333333 512 716.8 885.333333 512 885.333333z\" fill=\"#000000\" p-id=\"9765\"></path><path d=\"M512 746.666667m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z\" fill=\"#000000\" p-id=\"9766\"></path><path d=\"M512 245.333333c-76.8 0-138.666667 61.866667-138.666667 138.666667 0 17.066667 14.933333 32 32 32s32-14.933333 32-32c0-40.533333 34.133333-74.666667 74.666667-74.666667s74.666667 34.133333 74.666667 74.666667c0 27.733333-53.333333 76.8-91.733334 100.266667-8.533333 6.4-14.933333 17.066667-14.933333 27.733333v106.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32v-89.6c34.133333-25.6 106.666667-83.2 106.666667-145.066667 0-76.8-61.866667-138.666667-138.666667-138.666667z\" fill=\"#000000\" p-id=\"9767\"></path></svg>`\r\n\r\nexport const SCROLL_TABLE_ICON = `<i class=\"icon-switch\"></i>`\r\n\r\nexport const GLOBAL_LINK_ICON = `<svg t=\"1721963743677\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"8628\" width=\"20\" height=\"20\"><path d=\"M713.130667 283.221333V228.352a9.159111 9.159111 0 0 0-9.130667-9.130667H265.102222a9.159111 9.159111 0 0 0-9.102222 9.130667v54.869333c0 5.034667 4.096 9.130667 9.130667 9.130667H704a9.159111 9.159111 0 0 0 9.130667-9.130667z m-448 100.579556a9.130667 9.130667 0 0 0-9.130667 9.130667v54.869333c0 5.006222 4.096 9.130667 9.130667 9.130667h210.289777a9.159111 9.159111 0 0 0 9.159112-9.130667v-54.869333a9.159111 9.159111 0 0 0-9.159112-9.130667H265.130667z m164.579555 516.551111H164.579556V95.800889h640v279.352889c0 5.034667 4.096 9.159111 9.130666 9.159111h64a9.159111 9.159111 0 0 0 9.130667-9.159111V50.090667c0-20.252444-16.327111-36.579556-36.551111-36.579556H118.840889c-20.195556 0-36.551111 16.327111-36.551111 36.579556v896c0 20.195556 16.327111 36.551111 36.551111 36.551111h310.869333a9.159111 9.159111 0 0 0 9.130667-9.130667v-64a9.159111 9.159111 0 0 0-9.130667-9.159111z\" fill=\"#000000\" fill-opacity=\".85\" p-id=\"8629\"></path><path d=\"M837.859556 656.298667l-107.861334 186.794666-68.977778-39.822222 107.861334-186.794667 68.977778 39.822223z\" fill=\"#000000\" p-id=\"8630\"></path><path d=\"M691.114667 514.844444a159.146667 159.146667 0 0 1 217.315555-58.225777 159.061333 159.061333 0 0 1 58.197334 217.315555l-55.637334 96.369778-68.977778-39.822222 55.637334-96.369778a79.416889 79.416889 0 1 0-137.557334-79.416889l-55.637333 96.369778-68.977778-39.822222 55.637334-96.369778V514.844444z m-28.558223 208.782223l-56.462222 97.792a79.416889 79.416889 0 0 0 137.557334 79.388444l56.462222-97.763555 68.977778 39.822222-56.462223 97.763555a159.061333 159.061333 0 1 1-275.484444-159.061333l56.433778-97.763556 68.977777 39.822223z\" fill=\"#000000\" p-id=\"8631\"></path></svg>`\r\n\r\nexport const FULLSCREEN_ICON = `<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon\" width=\"100%\" height=\"100%\" viewBox=\"0 0 1024 1024\" version=\"1.1\">\r\n <path fill=\"#333333\" d=\"M64 384h96V160h224.2V64H64zM639.8 64v96H864v224h96V64zM864 864H639.8v96H960V639.61h-96zM160 639.61H64V960h320.2v-96H160z\"/>\r\n</svg>`\r\n\r\nexport const TRIANGLE_DOWN_ICON = `<i class=\"icon-triangle-down\"></i>`\r\n\r\nexport const FORMAT_PAINTER_ICON = `<svg viewBox=\"0 0 32 32\"><path fill=\"currentColor\" d=\"M28.83 23.17L23 17.33V13a1 1 0 0 0-.29-.71l-10-10a1 1 0 0 0-1.42 0l-9 9a1 1 0 0 0 0 1.42l10 10A1 1 0 0 0 13 23h4.34l5.83 5.84a4 4 0 0 0 5.66-5.66ZM6 10.41l2.29 2.3l1.42-1.42L7.41 9L9 7.41l4.29 4.3l1.42-1.42L10.41 6L12 4.41L18.59 11L11 18.59L4.41 12Zm21.41 17a2 2 0 0 1-2.82 0l-6.13-6.12a1.8 1.8 0 0 0-.71-.29h-4.34l-1-1L20 12.41l1 1v4.34a1 1 0 0 0 .29.7l6.12 6.14a2 2 0 0 1 0 2.82\"/></svg>`\r\n"],"names":[],"mappings":"AAAO,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASlB,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASlB,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYnB,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAalB,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASpB,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASvB,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAapB,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASnB,MAAM,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW9B,MAAM,kBAAkB;AAAA;AAAA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MAAM,kBAAkB;AAExB,MAAM,YAAY;AAElB,MAAM,YAAY;AAElB,MAAM,oBAAoB;AAE1B,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;AAAA;AAAA;AAIxB,MAAM,qBAAqB;AAE3B,MAAM,sBAAsB;"}
|
|
1
|
+
{"version":3,"file":"icons.config.es.js","sources":["../../../src/config/icons.config.ts"],"sourcesContent":["export const UNDO_ICON = `<svg width=\"16px\" height=\"14px\" viewBox=\"0 0 16 14\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(0.000000, -1.000000)\" fill=\"#293040\">\r\n <path d=\"M11,5 C13.7614237,5 16,7.23857625 16,10 C16,12.7614237 13.7614237,15 11,15 L7,15 L7,14 L11,14\r\n C13.209139,14 15,12.209139 15,10 C15,7.790861 13.209139,6 11,6 L5,6 L5,10 L0,5.5 L5,1 L5,5 L11,5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const REDO_ICON = `<svg width=\"16px\" height=\"14px\" viewBox=\"0 0 16 14\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(0.000000, -1.000000)\" fill=\"#293040\">\r\n <path d=\"M5,5 L11,5 L11,1 L16,5.5 L11,10 L11,6 L5,6 C2.790861,6 1,7.790861 1,10 C1,12.209139 2.790861,14 5,14 L9,14\r\n L9,15 L5,15 C2.23857625,15 0,12.7614237 0,10 C0,7.23857625 2.23857625,5 5,5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const CLEAN_ICON = `<svg width=\"16px\" height=\"15px\" viewBox=\"0 0 16 15\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g fill=\"#293040\">\r\n <path d=\"M4.32708124,14 L8.37150583,14 L10.5729409,11.5550586 L4.6297198,6.20375828 L1.25465311,9.95542661\r\n C1.09078634,10.1375782 1.0006437,10.3742369 1.00180556,10.6192474 C1.00295568,10.8617824 1.10621221,11.092615\r\n 1.28624979,11.2551297 L4.32708124,14 Z M16,14 L16,15 L3.93760008,15 L0.597250175,11.9923354 C0.217072683,11.6500221\r\n 1.59049582e-13,11.1091757 1.59428026e-13,10.6149383 C1.59806471e-13,10.1207008 0.183000942,9.64396706 0.513710349,9.27667705\r\n L8.56855175,0.330869394 L16,7.02217546 L9.71713856,14 L16,14 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const BOLD_ICON = `<svg width=\"12px\" height=\"16px\" viewBox=\"0 0 12 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-2.000000, 0.000000)\" fill=\"#293040\" fill-rule=\"nonzero\">\r\n <path d=\"M11.540636,7.0842147 C13.0068647,7.89340318 14,9.45459285 14,11.2477417 C14,13.8723415 11.8723415,16\r\n 9.2477417,16 L2,16 L2,7.99258423 L2,-5.06261699e-14 L9.00370789,-4.75175455e-14 C11.2107991,-4.79229815e-14 13,1.78920092\r\n 13,3.99629211 C13,5.24014846 12.4317244,6.35127692 11.540636,7.0842147 Z M3.5,1.5 L3.5,6.49258423 L9.00370789,6.49258423\r\n C10.382372,6.49258423 11.5,5.37495618 11.5,3.99629211 C11.5,2.61762805 10.382372,1.5 9.00370789,1.5 L3.5,1.5 Z M3.5,14.5\r\n L9.2477417,14.5 C11.0439144,14.5 12.5,13.0439144 12.5,11.2477417 C12.5,9.45156904 11.0439144,7.9954834 9.2477417,7.9954834\r\n L3.5,7.9954834 L3.5,14.5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const ITALIC_ICON = `<svg width=\"9px\" height=\"16px\" viewBox=\"0 0 9 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-4.000000, 0.000000)\" fill=\"#293040\">\r\n <path d=\"M10.2565501,1.5 L8.41332415,14.5 L12,14.5 L12,16 L4,16 L4,14.5 L6.90083611,14.5 L8.74406208,1.5 L5,1.5\r\n L5,0 L13,0 L13,1.5 L10.2565501,1.5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const UNDERLINE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <polygon fill=\"#293040\" points=\"2 14 14 14 14 16 2 16\"></polygon>\r\n <path d=\"M4.5,3 L4.5,7 C4.5,8.93299662 6.06700338,10.5 8,10.5 C9.93299662,10.5 11.5,8.93299662 11.5,7 L11.5,1.5\r\n L11.4998322,0 L13,0 L13,7 C13,9.76142375 10.7614237,12 8,12 C5.23857625,12 3,9.76142375 3,7 L3,0 L4.49893188,0\r\n L4.49893188,3 L4.5,3 Z\" fill=\"#293040\" fill-rule=\"nonzero\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const STRIKE_ICON = `<svg width=\"14px\" height=\"16px\" viewBox=\"0 0 14 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1.000000, 0.000000)\" fill=\"#293040\">\r\n <path d=\"M9.93321102,9 L1,9 L1,7 L3.84197169,7 C3.31015092,6.28495098 3,5.42507332 3,4.5 C3,2.01471863\r\n 5.23857625,0 8,0 C10.5736409,0 12.6931261,1.75002477 12.969484,4 L11.4507289,4 C11.1737591,2.60626201 9.76011738,1.5 8,1.5\r\n C6.03382604,1.5 4.5,2.88044344 4.5,4.5 C4.5,5.52604325 5.11562351,6.45611494 6.06678898,7 L15,7 L15,9 L12.1580283,9\r\n C12.6898491,9.71504902 13,10.5749267 13,11.5 C13,13.9852814 10.7614237,16 8,16 C5.42635908,16 3.30687393,14.2499752\r\n 3.03051599,12 L4.54927112,12 C4.82624092,13.393738 6.23988262,14.5 8,14.5 C9.96617396,14.5 11.5,13.1195566 11.5,11.5\r\n C11.5,10.4739568 10.8843765,9.54388506 9.93321102,9 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const COLOR_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <polygon fill=\"#293040\" points=\"2 14 14 14 14 16 2 16\"></polygon>\r\n <path d=\"M10.9166667,8.5 L5.08333333,8.5 L4.26618123,10.461165 L3.62338765,12 L2,12 L7,0 L9,0 L14,12 L12.3824972,12\r\n L11.5753038,10.0807292 L10.9166667,8.5 Z M10.2916667,7 L8,1.5 L5.70833333,7 L10.2916667,7 Z\"\r\n fill=\"#293040\" fill-rule=\"nonzero\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const BACKGROUND_COLOR_ICON = ` <svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M4.64447006,9.66583547 L3.17597929,8.33216965 L6.15933183,5.11039074 L5.42508645,4.44355783\r\n L9.39179153,1.0658141e-13 L16,6.00149616 L12.0332949,10.445054 L11.2990495,9.77822108 L8.31569698,13 L6.84720621,11.6663342\r\n L5.69344476,12.9587937 L2.36400649,12.9587937 L2,12.6282074 L4.64447006,9.66583547 Z M4.57134219,8.25840959\r\n L8.24256911,11.5925741 L10.5648041,9.11138818 L6.89357722,5.77722364 L4.57134219,8.25840959 Z M14.6046371,6.07525623\r\n L9.4649194,1.40742588 L6.82044935,4.36979777 L11.960167,9.03762811 L14.6046371,6.07525623 Z M2,14 L14,14 L14,16 L2,16 L2,14 Z\"\r\n fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const ALIGN_LEFT_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M0,0 L1.5,0 L1.5,16 L0,16 L0,0 Z M4,3 L13,3 L13,7 L4,7 L4,3 Z M5,4 L5,6 L12,6 L12,4 L5,4 Z M4,9 L16,9\r\n L16,13 L4,13 L4,9 Z M5,10 L5,12 L15,12 L15,10 L5,10 Z\" fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const ALIGN_CENTER_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M8.75,7 L8.75,9 L16,9 L16,13 L8.75,13 L8.75,16 L7.25,16 L7.25,13 L0,13 L0,9 L7.25,9 L7.25,7 L2,7\r\n L2,3 L7.25,3 L7.25,0 L8.75,0 L8.75,3 L14,3 L14,7 L8.75,7 Z M1,10 L1,12 L15,12 L15,10 L1,10 Z M3,4 L3,6 L13,6\r\n L13,4 L3,4 Z\" fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const ALIGN_RIGHT_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M14.5,0 L16,0 L16,16 L14.5,16 L14.5,0 Z M3,3 L12,3 L12,7 L3,7 L3,3 Z M4,4 L4,6 L11,6 L11,4 L4,4 Z\r\n M0,9 L12,9 L12,13 L0,13 L0,9 Z M1,10 L1,12 L11,12 L11,10 L1,10 Z\" fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const LIST_UNORDERED_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g fill=\"#293040\">\r\n <path d=\"M5,1 L16,1 L16,2.5 L5,2.5 L5,1 Z M2,4 C0.8954305,4 0,3.1045695 0,2 C0,0.8954305 0.8954305,0 2,0\r\n C3.1045695,0 4,0.8954305 4,2 C4,3.1045695 3.1045695,4 2,4 Z M2,3 C2.55228475,3 3,2.55228475 3,2 C3,1.44771525\r\n 2.55228475,1 2,1 C1.44771525,1 1,1.44771525 1,2 C1,2.55228475 1.44771525,3 2,3 Z M2,10 C0.8954305,10 0,9.1045695\r\n 0,8 C0,6.8954305 0.8954305,6 2,6 C3.1045695,6 4,6.8954305 4,8 C4,9.1045695 3.1045695,10 2,10 Z M2,9 C2.55228475,9\r\n 3,8.55228475 3,8 C3,7.44771525 2.55228475,7 2,7 C1.44771525,7 1,7.44771525 1,8 C1,8.55228475 1.44771525,9 2,9 Z\r\n M2,16 C0.8954305,16 0,15.1045695 0,14 C0,12.8954305 0.8954305,12 2,12 C3.1045695,12 4,12.8954305 4,14 C4,15.1045695\r\n 3.1045695,16 2,16 Z M2,15 C2.55228475,15 3,14.5522847 3,14 C3,13.4477153 2.55228475,13 2,13 C1.44771525,13 1,13.4477153\r\n 1,14 C1,14.5522847 1.44771525,15 2,15 Z M5,7 L16,7 L16,8.5 L5,8.5 L5,7 Z M5,13 L16,13 L16,14.5 L5,14.5 L5,13 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const LIST_ORDERED_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g fill=\"#293040\">\r\n <path d=\"M5,1 L16,1 L16,2.5 L5,2.5 L5,1 Z M0,0 L2,0 L2,3 L3,3 L3,4 L0,4 L0,3 L1,3 L1,1 L0,1 L0,0 Z M5,7 L16,7\r\n L16,8.5 L5,8.5 L5,7 Z M5,13 L16,13 L16,14.5 L5,14.5 L5,13 Z M0,15 L1.75,15 C1.88807119,15 2,14.8880712 2,14.75\r\n C2,14.6119288 1.88807119,14.5 1.75,14.5 L0,14.5 L0,13.5 L1.75,13.5 C1.88807119,13.5 2,13.3880712 2,13.25 C2,13.1119288\r\n 1.88807119,13 1.75,13 L0,13 L0,12 L1.5,12 C2.32842712,12 3,12.6715729 3,13.5 C3,13.6753177 2.96992289,13.8436105\r\n 2.91464715,14 C2.96992289,14.1563895 3,14.3246823 3,14.5 C3,15.3284271 2.32842712,16 1.5,16 L0,16 L0,15 Z M2,7.5\r\n C2,7.35127258 1.9375,7.22627258 1.84375,7.13845444 C1.76307119,7.05596441 1.63807119,7 1.5,7 C1.22385763,7 1,7.22385763\r\n 1,7.5 L1.62630326e-19,7.5 C0.147399902,6.5 0.647399902,6 1.5,6 C2.32842712,6 3,6.67157288 3,7.5 C3,8.07312512\r\n 2.50016007,8.55650475 2.22821045,8.74661255 C1.95626083,8.93672035 1.77325955,8.99789088 1.76769962,9 L3,9 L3,10\r\n L0,10 L1.62630326e-19,9 C0.619515577,8.77257137 1.06188822,8.55939591 1.32711792,8.36047363 C1.6371448,8.12795347\r\n 1.87259637,7.91592701 1.96143498,7.69289356 C1.98627694,7.633537 2,7.5683711 2,7.5 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const LIST_CHECK_ICON = `<svg width=\"15px\" height=\"14px\" viewBox=\"0 0 15 14\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1058.000000, -97.000000)\">\r\n <g transform=\"translate(407.000000, 93.000000)\">\r\n <g transform=\"translate(650.000000, 2.000000)\">\r\n <rect x=\"0\" y=\"0\" width=\"16\" height=\"16\"></rect>\r\n <polygon fill=\"#293040\" fill-rule=\"nonzero\" points=\"14 15 14 9.37100497 15 9.37100497 15\r\n 16 1 16 1 2 10.1946467 2 10.1946467 3 2 3 2 15\"></polygon>\r\n <path d=\"M14.4525049,2.48740937 C14.7356009,2.1850362 15.8305911,3.21021745 15.5474951,3.51259063\r\n L8.45990379,11.0828057 L4.46558382,7.02621226 C4.17496481,6.73106236 4.17863783,6.25620283 4.47378774,5.96558382\r\n C4.76893764,5.67496481 5.24379717,5.67863783 5.53441618,5.97378774 L8.43263799,8.91719429 L14.4525049,2.48740937 Z\"\r\n fill=\"#293040\" fill-rule=\"nonzero\"></path>\r\n </g>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const CODE_BLOCK_ICON = `<svg t=\"1565073788159\" class=\"icon\" viewBox=\"0 0 1024 1024\" width=\"16\" height=\"16\">\r\n<path d=\"M110.78 469.52l70.44-39.24A60 60 0 0 0 212 377.9L212 212a120 120 0 0 1 120-120l60 0a30\r\n30 0 0 1 0 60L332 152a60 60 0 0 0-59.99999999 60l0 175.38a120 120 0 0\r\n1-63.48000001 105.9L173.42 512l35.1 18.72A120 120 0 0 1 272 636.56L272.00000001 812a60 60 0 0 0 59.99999999 60l60 0a30 30\r\n0 1 1 0 60L332 932a120 120 0 0 1-120-120l0-165.9a60\r\n60 0 0 0-30.78-52.38l-70.44-39.24a45 45 0 0 1 0-84.96z m742.44 1e-8a45 45 0 0 1 0 84.95999998l-70.44 39.24000001a60\r\n60 0 0 0-30.78000001 52.38L751.99999999 812a120 120 0 0 1-119.99999999 120L572 932a30 30\r\n0 1 1 0-60l60 0a60 60 0 0 0 60-60l0-175.38a120 120\r\n0 0 1 63.48-105.9L790.58 512l-35.1-18.72A120 120 0 0 1 692 387.44L692 212a60 60 0 0 0-60-60L572 152a30\r\n30 0 0 1 0-60l60 0a120 120 0 0 1 119.99999999 120l0 165.9a60 60 0 0 0 30.78000001 52.38l70.44 39.24000001z\"></path></svg>`\r\n\r\nexport const BLOCKQUOTE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(0.000000, 1.000000)\" fill=\"#000000\" fill-rule=\"nonzero\">\r\n <path d=\"M6.86733556,12.5574136 L6.86733556,7.99108138 L2.52931996,7.99108138 C2.41516165,5.02296544\r\n 3.10011148,3.42474916 5.72575251,2.0548495 L5.72575251,0 C1.84437012,1.36989967 -0.0963210702,3.88138239 0.0178372352,7.76276477\r\n L0.0178372352,12.5574136 L6.86733556,12.5574136 Z M16,12.5574136 L16,7.99108138 L11.6619844,7.99108138 C11.5478261,5.02296544\r\n 12.2327759,3.42474916 14.8584169,2.0548495 L14.8584169,0 C10.9770346,1.36989967 9.03634337,3.88138239 9.15050167,7.76276477\r\n L9.15050167,12.5574136 L16,12.5574136 Z\"></path>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const IMAGE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1196.000000, -96.000000)\" fill=\"#293040\" fill-rule=\"nonzero\">\r\n <g transform=\"translate(407.000000, 93.000000)\">\r\n <path d=\"M804,4 L790,4 L790,11.940983 L794.058237,9.91186456 L798.536534,13.3949845 L801.014076,11.908459\r\n L804,13.8990748 L804,4 Z M803.72265,14.9160251 L800.985924,13.091541 L798.463466,14.6050155 L793.941763,11.0881354\r\n L790.223607,12.9472136 C790.151699,12.9831673 790.07527,13.000168 790,13.0001094 L790,18 L804,18 L804,15.0000529\r\n C803.90455,15.0001406 803.80803,14.9729453 803.72265,14.9160251 Z M789,19 L789,3 L805,3 L805,19 L789,19 Z M801,9\r\n C800.447715,9 800,8.55228475 800,8 C800,7.44771525 800.447715,7 801,7 C801.552285,7 802,7.44771525 802,8 C802,8.55228475\r\n 801.552285,9 801,9 Z\"></path>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const FILE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\" >\r\n<g id=\"icon/01\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M16,16 L1,16 L1,0 L12,0 L16,4 L16,16 Z M11,1 L2,1 L2,15 L15,15 L15,\r\n 5 L11,5 L11,1 Z M12,1.533 L12,4 L14.52,4 L12,1.533 Z\"\r\n id=\"Combined-Shape\" fill=\"#293040\" fill-rule=\"nonzero\">\r\n </path>\r\n <polygon id=\"path\" fill=\"#293040\" points=\"8 8 6 8 8.5 5 11 8 9 8 9 12 8 12\"></polygon>\r\n</g>\r\n</svg>`\r\n\r\nexport const TABLE_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1227.000000, -96.000000)\" fill=\"#293040\">\r\n <g transform=\"translate(407.000000, 93.000000)\">\r\n <path d=\"M820,3 L836,3 L836,19 L820,19 L820,3 Z M821,4 L821,8 L835,8 L835,4 L821,4 Z M821,9 L821,13 L825,\r\n 13 L825,9 L821,9 Z M821,14 L821,18 L825,18 L825,14 L821,14 Z M826,9 L826,13 L830,13 L830,9 L826,9 Z M826,\r\n 14 L826,18 L830,18 L830,14 L826,14 Z M831,9 L831,13 L835,13 L835,9 L831,9 Z M831,14 L831,18 L835,18 L835,\r\n 14 L831,14 Z\"></path>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const LINK_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1258.000000, -96.000000)\" fill=\"#293040\" fill-rule=\"nonzero\">\r\n <g transform=\"translate(407.000000, 93.000000)\">\r\n <path d=\"M855.499,13.863 L861.863,7.499 L862.573,8.209 L856.209,14.573 L855.499,13.863 Z M854.646498,9.99452063\r\n C854.661947,10.0108615 854.677673,10.0270363 854.693676,10.0430391 L855.388521,10.7378841 L852.802248,13.3241571\r\n C851.732584,14.3938208 851.732584,16.1280884 852.802248,17.1977522 C853.871912,18.2674159 855.606179,18.2674159\r\n 856.675843,17.1977522 L859.262116,14.6114792 L859.956961,15.3063242 C859.972964,15.3223269 859.989138,15.3380528\r\n 860.005479,15.3535018 L857.468863,17.8901187 C855.989021,19.3699604 853.589723,19.3699604 852.109881,17.8901187\r\n C850.63004,16.4102769 850.63004,14.0109793 852.109881,12.5311375 L854.646498,9.99452063 Z M857.994521,6.64649819\r\n L860.531137,4.10988134 C862.010979,2.63003955 864.410277,2.63003955 865.890119,4.10988134 C867.36996,5.58972313\r\n 867.36996,7.98902073 865.890119,9.46886252 L863.353502,12.0054794 C863.338053,11.9891385 863.322327,11.9729637\r\n 863.306324,11.9569609 L862.611479,11.2621159 L865.197752,8.67584293 C866.267416,7.60617918 866.267416,5.87191157\r\n 865.197752,4.80224782 C864.128088,3.73258406 862.393821,3.73258406 861.324157,4.80224782 L858.737884,7.38852082\r\n L858.043039,6.69367584 C858.027036,6.67767307 858.010862,6.66194719 857.994521,6.64649819 Z\"></path>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const EMOJI_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path d=\"M8,16 C3.581722,16 0,12.418278 0,8 C0,3.581722 3.581722,0 8,0 C12.418278,0 16,3.581722 16,8 C16,12.418278\r\n 12.418278,16 8,16 Z M8,15 C11.8659932,15 15,11.8659932 15,8 C15,4.13400675 11.8659932,1 8,1 C4.13400675,1 1,4.13400675\r\n 1,8 C1,11.8659932 4.13400675,15 8,15 Z M5,7 C4.44771525,7 4,6.55228475 4,6 C4,5.44771525 4.44771525,5 5,5 C5.55228475,5\r\n 6,5.44771525 6,6 C6,6.55228475 5.55228475,7 5,7 Z M11,7 C10.4477153,7 10,6.55228475 10,6 C10,5.44771525 10.4477153,5 11,5\r\n C11.5522847,5 12,5.44771525 12,6 C12,6.55228475 11.5522847,7 11,7 Z M4,10 L12,10 C11.5415129,11.7252272 9.9244686,13 8,13\r\n C6.0755314,13 4.45848714,11.7252272 4,10 Z\" fill=\"#293040\"></path>\r\n</g>\r\n</svg>`\r\n\r\nexport const SCREENSHOT_ICON = `<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\" version=\"1.1\">\r\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(-1529.000000, -96.000000)\">\r\n <g transform=\"translate(1529.000000, 96.000000)\">\r\n <rect fill=\"#000000\" fill-rule=\"nonzero\" opacity=\"0\" x=\"0\" y=\"0\" width=\"16\" height=\"16\"></rect>\r\n <polyline stroke=\"currentColor\" points=\"16 14 2 14 2 0 2 0\"></polyline>\r\n <polyline stroke=\"currentColor\" points=\"4 2 14 2 14 12\"></polyline>\r\n <rect fill=\"currentColor\" x=\"0\" y=\"1.5\" width=\"2\" height=\"1\"></rect>\r\n <rect fill=\"currentColor\"\r\n transform=\"translate(14.000000, 15.000000)\r\n rotate(-90.000000)\r\n translate(-14.000000, -15.000000) \" x=\"13\" y=\"14.5\" width=\"2\" height=\"1\">\r\n </rect>\r\n </g>\r\n </g>\r\n</g>\r\n</svg>`\r\n\r\nexport const CODE_ICON = `<svg t=\"1721956397010\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"4254\" width=\"20\" height=\"20\"><path d=\"M438.4 849.1l222.7-646.7c0.2-0.5 0.3-1.1 0.4-1.6L438.4 849.1z\" opacity=\".224\" p-id=\"4255\"></path><path d=\"M661.2 168.7h-67.5c-3.4 0-6.5 2.2-7.6 5.4L354.7 846c-0.3 0.8-0.4 1.7-0.4 2.6 0 4.4 3.6 8 8 8h67.8c3.4 0 6.5-2.2 7.6-5.4l0.7-2.1 223.1-648.3 7.4-21.4c0.3-0.8 0.4-1.7 0.4-2.6-0.1-4.5-3.6-8.1-8.1-8.1zM954.6 502.1c-0.8-1-1.7-1.9-2.7-2.7l-219-171.3c-3.5-2.7-8.5-2.1-11.2 1.4-1.1 1.4-1.7 3.1-1.7 4.9v81.3c0 2.5 1.1 4.8 3.1 6.3l115 90-115 90c-1.9 1.5-3.1 3.8-3.1 6.3v81.3c0 4.4 3.6 8 8 8 1.8 0 3.5-0.6 4.9-1.7l219-171.3c6.9-5.4 8.2-15.5 2.7-22.5zM291.1 328.1l-219 171.3c-1 0.8-1.9 1.7-2.7 2.7-5.4 7-4.2 17 2.7 22.5l219 171.3c1.4 1.1 3.1 1.7 4.9 1.7 4.4 0 8-3.6 8-8v-81.3c0-2.5-1.1-4.8-3.1-6.3l-115-90 115-90c1.9-1.5 3.1-3.8 3.1-6.3v-81.3c0-1.8-0.6-3.5-1.7-4.9-2.7-3.5-7.7-4.1-11.2-1.4z\" p-id=\"4256\"></path></svg>`\r\n\r\nexport const MENTION_ICON = `<i class=\"icon-set-keyword\"></i>`\r\n\r\nexport const QUICK_MENU_ICON = `<i class=\"icon-publish\"></i>`\r\n\r\nexport const SAVE_ICON = `<i class=\"icon-save\"></i>`\r\n\r\nexport const HELP_ICON = `<svg t=\"1721963829631\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"9764\" width=\"20\" height=\"20\"><path d=\"M512 74.666667C270.933333 74.666667 74.666667 270.933333 74.666667 512S270.933333 949.333333 512 949.333333 949.333333 753.066667 949.333333 512 753.066667 74.666667 512 74.666667z m0 810.666666c-204.8 0-373.333333-168.533333-373.333333-373.333333S307.2 138.666667 512 138.666667 885.333333 307.2 885.333333 512 716.8 885.333333 512 885.333333z\" fill=\"#000000\" p-id=\"9765\"></path><path d=\"M512 746.666667m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z\" fill=\"#000000\" p-id=\"9766\"></path><path d=\"M512 245.333333c-76.8 0-138.666667 61.866667-138.666667 138.666667 0 17.066667 14.933333 32 32 32s32-14.933333 32-32c0-40.533333 34.133333-74.666667 74.666667-74.666667s74.666667 34.133333 74.666667 74.666667c0 27.733333-53.333333 76.8-91.733334 100.266667-8.533333 6.4-14.933333 17.066667-14.933333 27.733333v106.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32v-89.6c34.133333-25.6 106.666667-83.2 106.666667-145.066667 0-76.8-61.866667-138.666667-138.666667-138.666667z\" fill=\"#000000\" p-id=\"9767\"></path></svg>`\r\n\r\nexport const SCROLL_TABLE_ICON = `<i class=\"icon-switch\"></i>`\r\n\r\nexport const GLOBAL_LINK_ICON = `<svg t=\"1721963743677\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"8628\" width=\"20\" height=\"20\"><path d=\"M713.130667 283.221333V228.352a9.159111 9.159111 0 0 0-9.130667-9.130667H265.102222a9.159111 9.159111 0 0 0-9.102222 9.130667v54.869333c0 5.034667 4.096 9.130667 9.130667 9.130667H704a9.159111 9.159111 0 0 0 9.130667-9.130667z m-448 100.579556a9.130667 9.130667 0 0 0-9.130667 9.130667v54.869333c0 5.006222 4.096 9.130667 9.130667 9.130667h210.289777a9.159111 9.159111 0 0 0 9.159112-9.130667v-54.869333a9.159111 9.159111 0 0 0-9.159112-9.130667H265.130667z m164.579555 516.551111H164.579556V95.800889h640v279.352889c0 5.034667 4.096 9.159111 9.130666 9.159111h64a9.159111 9.159111 0 0 0 9.130667-9.159111V50.090667c0-20.252444-16.327111-36.579556-36.551111-36.579556H118.840889c-20.195556 0-36.551111 16.327111-36.551111 36.579556v896c0 20.195556 16.327111 36.551111 36.551111 36.551111h310.869333a9.159111 9.159111 0 0 0 9.130667-9.130667v-64a9.159111 9.159111 0 0 0-9.130667-9.159111z\" fill=\"#000000\" fill-opacity=\".85\" p-id=\"8629\"></path><path d=\"M837.859556 656.298667l-107.861334 186.794666-68.977778-39.822222 107.861334-186.794667 68.977778 39.822223z\" fill=\"#000000\" p-id=\"8630\"></path><path d=\"M691.114667 514.844444a159.146667 159.146667 0 0 1 217.315555-58.225777 159.061333 159.061333 0 0 1 58.197334 217.315555l-55.637334 96.369778-68.977778-39.822222 55.637334-96.369778a79.416889 79.416889 0 1 0-137.557334-79.416889l-55.637333 96.369778-68.977778-39.822222 55.637334-96.369778V514.844444z m-28.558223 208.782223l-56.462222 97.792a79.416889 79.416889 0 0 0 137.557334 79.388444l56.462222-97.763555 68.977778 39.822222-56.462223 97.763555a159.061333 159.061333 0 1 1-275.484444-159.061333l56.433778-97.763556 68.977777 39.822223z\" fill=\"#000000\" p-id=\"8631\"></path></svg>`\r\n\r\nexport const FULLSCREEN_ICON = `<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon\" width=\"100%\" height=\"100%\" viewBox=\"0 0 1024 1024\" version=\"1.1\">\r\n <path fill=\"#333333\" d=\"M64 384h96V160h224.2V64H64zM639.8 64v96H864v224h96V64zM864 864H639.8v96H960V639.61h-96zM160 639.61H64V960h320.2v-96H160z\"/>\r\n</svg>`\r\n\r\nexport const FULLSCREEN_EXIT_ICON = `\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\">\r\n <path fill=\"currentColor\" d=\"M6 21v-3H3v-2h5v5zm10 0v-5h5v2h-3v3zM3 8V6h3V3h2v5zm13 0V3h2v3h3v2z\"/>\r\n </svg>\r\n`\r\n\r\nexport const TRIANGLE_DOWN_ICON = `<i class=\"icon-triangle-down\"></i>`\r\n\r\nexport const FORMAT_PAINTER_ICON = `<svg viewBox=\"0 0 32 32\"><path fill=\"currentColor\" d=\"M28.83 23.17L23 17.33V13a1 1 0 0 0-.29-.71l-10-10a1 1 0 0 0-1.42 0l-9 9a1 1 0 0 0 0 1.42l10 10A1 1 0 0 0 13 23h4.34l5.83 5.84a4 4 0 0 0 5.66-5.66ZM6 10.41l2.29 2.3l1.42-1.42L7.41 9L9 7.41l4.29 4.3l1.42-1.42L10.41 6L12 4.41L18.59 11L11 18.59L4.41 12Zm21.41 17a2 2 0 0 1-2.82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AAAA;AAAA;AAAA;AAAA;AAAA;AAkBxB,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWxB,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYxB,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAenB,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUlB,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAanB,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBlB,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWnB,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBxB,MAAM,YAAY;AAElB,MAAM,eAAe;AAErB,MAAM,kBAAkB;AAExB,MAAM,YAAY;AAElB,MAAM,YAAY;AAElB,MAAM,oBAAoB;AAE1B,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;AAAA;AAAA;AAIxB,MAAM,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAM7B,MAAM,qBAAqB;AAE3B,MAAM,sBAAsB;"}
|
package/es/config/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isNullOrUndefined } from "./editor.utils.es.js";
|
|
2
1
|
import { LANG_CONF } from "./editor.config.es.js";
|
|
3
2
|
import { AUDIO_VIDEO_UPLOADER_MIME_TYPES, BIG_DELTA_LIMIT, COMPRESSED_UPLOADER_MIME_TYPES, DOC_UPLOADER_MIME_TYPES, FILE_UPLOADER_MIME_TYPES, IMAGE_UPLOADER_MIME_TYPES, OTHER_FILE_UPLOADER_MIME_TYPES, PPT_UPLOADER_MIME_TYPES, XSL_UPLOADER_MIME_TYPES } from "./editor.config.es.js";
|
|
4
|
-
import {
|
|
3
|
+
import { isNullOrUndefined } from "./editor.utils.es.js";
|
|
4
|
+
import { UNDO_ICON, REDO_ICON, CLEAN_ICON, BOLD_ICON, ITALIC_ICON, UNDERLINE_ICON, STRIKE_ICON, COLOR_ICON, TRIANGLE_DOWN_ICON, BACKGROUND_COLOR_ICON, ALIGN_LEFT_ICON, ALIGN_CENTER_ICON, ALIGN_RIGHT_ICON, LIST_UNORDERED_ICON, LIST_ORDERED_ICON, LIST_CHECK_ICON, CODE_ICON, CODE_BLOCK_ICON, BLOCKQUOTE_ICON, IMAGE_ICON, FILE_ICON, TABLE_ICON, LINK_ICON, GLOBAL_LINK_ICON, FULLSCREEN_ICON, FULLSCREEN_EXIT_ICON, EMOJI_ICON, HELP_ICON, SCREENSHOT_ICON, FORMAT_PAINTER_ICON } from "./icons.config.es.js";
|
|
5
5
|
const ICONS_CONFIG = {
|
|
6
6
|
"undo": UNDO_ICON,
|
|
7
7
|
"redo": REDO_ICON,
|
|
@@ -41,6 +41,7 @@ const ICONS_CONFIG = {
|
|
|
41
41
|
"link": LINK_ICON,
|
|
42
42
|
"global-link": GLOBAL_LINK_ICON,
|
|
43
43
|
"fullscreen": FULLSCREEN_ICON,
|
|
44
|
+
"fullscreen-exit": FULLSCREEN_EXIT_ICON,
|
|
44
45
|
"emoji": EMOJI_ICON,
|
|
45
46
|
"help": HELP_ICON,
|
|
46
47
|
"screenshot": SCREENSHOT_ICON,
|
|
@@ -121,6 +122,7 @@ function getListValue(value, preListValue) {
|
|
|
121
122
|
}
|
|
122
123
|
return curListValue;
|
|
123
124
|
}
|
|
125
|
+
const namespace = "fe";
|
|
124
126
|
export {
|
|
125
127
|
AUDIO_VIDEO_UPLOADER_MIME_TYPES,
|
|
126
128
|
BIG_DELTA_LIMIT,
|
|
@@ -135,6 +137,7 @@ export {
|
|
|
135
137
|
TABLE_RIGHT_MENU_CONFIG,
|
|
136
138
|
XSL_UPLOADER_MIME_TYPES,
|
|
137
139
|
getListValue,
|
|
138
|
-
inputFile
|
|
140
|
+
inputFile,
|
|
141
|
+
namespace
|
|
139
142
|
};
|
|
140
143
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../src/config/index.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../src/config/index.ts"],"sourcesContent":["import { LANG_CONF } from './editor.config'\r\nimport { isNullOrUndefined } from './editor.utils'\r\nimport {\r\n ALIGN_CENTER_ICON,\r\n ALIGN_LEFT_ICON,\r\n ALIGN_RIGHT_ICON,\r\n BACKGROUND_COLOR_ICON,\r\n BLOCKQUOTE_ICON,\r\n BOLD_ICON,\r\n CLEAN_ICON,\r\n CODE_BLOCK_ICON,\r\n CODE_ICON,\r\n COLOR_ICON,\r\n EMOJI_ICON,\r\n FILE_ICON,\r\n FORMAT_PAINTER_ICON,\r\n FULLSCREEN_EXIT_ICON,\r\n FULLSCREEN_ICON,\r\n GLOBAL_LINK_ICON,\r\n HELP_ICON,\r\n IMAGE_ICON,\r\n ITALIC_ICON,\r\n LINK_ICON,\r\n LIST_CHECK_ICON,\r\n LIST_ORDERED_ICON,\r\n LIST_UNORDERED_ICON,\r\n REDO_ICON,\r\n SCREENSHOT_ICON,\r\n STRIKE_ICON,\r\n TABLE_ICON,\r\n TRIANGLE_DOWN_ICON,\r\n UNDERLINE_ICON,\r\n UNDO_ICON,\r\n} from './icons.config'\r\n\r\nexport * from './editor.config'\r\n\r\nexport const ICONS_CONFIG: { [key: string]: any } = {\r\n 'undo': UNDO_ICON,\r\n 'redo': REDO_ICON,\r\n 'clean': CLEAN_ICON,\r\n\r\n 'bold': BOLD_ICON,\r\n 'italic': ITALIC_ICON,\r\n 'underline': UNDERLINE_ICON,\r\n 'strike': STRIKE_ICON,\r\n\r\n 'font': '',\r\n 'size': '',\r\n\r\n 'color': `<span class=\"ql-color-inner\">\r\n ${COLOR_ICON}\r\n ${TRIANGLE_DOWN_ICON}\r\n <span class=\"current-color-line\"></span>\r\n </span>`,\r\n 'background': `<span class=\"ql-color-inner\">\r\n ${BACKGROUND_COLOR_ICON}\r\n ${TRIANGLE_DOWN_ICON}\r\n <span class=\"current-color-line color-line-background\"></span>\r\n </span>`,\r\n\r\n 'align': {\r\n '': ALIGN_LEFT_ICON,\r\n 'center': ALIGN_CENTER_ICON,\r\n 'right': ALIGN_RIGHT_ICON,\r\n },\r\n 'list': {\r\n bullet: LIST_UNORDERED_ICON,\r\n ordered: LIST_ORDERED_ICON,\r\n check: LIST_CHECK_ICON,\r\n },\r\n\r\n 'code': CODE_ICON,\r\n 'code-block': CODE_BLOCK_ICON,\r\n 'blockquote': BLOCKQUOTE_ICON,\r\n\r\n 'image': IMAGE_ICON,\r\n 'file': FILE_ICON,\r\n 'better-table': TABLE_ICON,\r\n 'link': LINK_ICON,\r\n 'global-link': GLOBAL_LINK_ICON,\r\n 'fullscreen': FULLSCREEN_ICON,\r\n 'fullscreen-exit': FULLSCREEN_EXIT_ICON,\r\n 'emoji': EMOJI_ICON,\r\n 'help': HELP_ICON,\r\n 'screenshot': SCREENSHOT_ICON,\r\n 'format-painter': FORMAT_PAINTER_ICON,\r\n}\r\n\r\nexport const TABLE_RIGHT_MENU_CONFIG = {\r\n copyCells: {\r\n text: LANG_CONF['copy-cells'],\r\n },\r\n copyTable: {\r\n text: LANG_CONF['copy-table'],\r\n },\r\n cutCells: {\r\n text: LANG_CONF['cut-cells'],\r\n },\r\n emptyCells: {\r\n text: LANG_CONF['empty-cells'],\r\n },\r\n insertRowUp: {\r\n text: LANG_CONF['insert-row-up'],\r\n },\r\n insertRowDown: {\r\n text: LANG_CONF['insert-row-down'],\r\n },\r\n insertColumnLeft: {\r\n text: LANG_CONF['insert-column-left'],\r\n },\r\n insertColumnRight: {\r\n text: LANG_CONF['insert-column-right'],\r\n },\r\n mergeCells: {\r\n text: LANG_CONF['merge-cells'],\r\n },\r\n unmergeCells: {\r\n text: LANG_CONF['unmerge-cells'],\r\n },\r\n deleteRow: {\r\n text: LANG_CONF['delete-row'],\r\n },\r\n deleteColumn: {\r\n text: LANG_CONF['delete-column'],\r\n },\r\n deleteTable: {\r\n text: LANG_CONF['delete-table'],\r\n },\r\n}\r\n\r\n// 触发上传\r\nexport function inputFile(type, accept) {\r\n const defaultMIMETypes = this.quill.uploader.options[type].join(', ')\r\n const mimeTypes = accept || defaultMIMETypes\r\n let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`)\r\n if (isNullOrUndefined(fileInput)) {\r\n fileInput = document.createElement('input')\r\n fileInput.classList.add(`ql-${type}`)\r\n fileInput.setAttribute('type', 'file')\r\n fileInput.setAttribute('accept', mimeTypes)\r\n if (\r\n this.quill.uploader.options.enableMultiUpload === true\r\n || (this.quill.uploader.options.enableMultiUpload.file && type === 'file')\r\n || (this.quill.uploader.options.enableMultiUpload.image && type === 'image')\r\n ) {\r\n fileInput.setAttribute('multiple', '')\r\n }\r\n fileInput.addEventListener('change', () => {\r\n const range = this.quill.getSelection(true)\r\n this.quill.uploader.upload(range, fileInput.files, type === 'file')\r\n fileInput.value = ''\r\n })\r\n this.container.appendChild(fileInput)\r\n }\r\n fileInput.click()\r\n}\r\n\r\nexport function getListValue(value, preListValue) {\r\n let curListValue = value\r\n if (preListValue && preListValue === value) {\r\n curListValue = false\r\n }\r\n else if (value === 'check') {\r\n if (preListValue === 'checked' || preListValue === 'unchecked') {\r\n curListValue = false\r\n }\r\n else {\r\n curListValue = 'unchecked'\r\n }\r\n }\r\n return curListValue\r\n}\r\n/** css namespace */\r\nexport const namespace = 'fe'\r\n"],"names":[],"mappings":";;;;AAqCO,MAAM,eAAuC;AAAA,EAClD,QAAQ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C,qBAAA;AAAA,IAAA,OAEZ;AACY,qBAAA;AAAA,IACjB;AAAA,EACF;AACO,SAAA;AACT;AAEO,MAAM,YAAY;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-toolbar.interface.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -4,6 +4,7 @@ import "./content-save.interface.es.js";
|
|
|
4
4
|
import "./counter-option.interface.es.js";
|
|
5
5
|
import "./editor-config.interface.es.js";
|
|
6
6
|
import "./editor-modules.interface.es.js";
|
|
7
|
+
import "./editor-toolbar.interface.es.js";
|
|
7
8
|
import "./file-operation.interface.es.js";
|
|
8
9
|
import "./focus-change.interface.es.js";
|
|
9
10
|
import "./fullscreen-module.interface.es.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -28,7 +28,6 @@ class BlotFormatter {
|
|
|
28
28
|
Object.assign(this.overlay.style, this.options.overlay.style);
|
|
29
29
|
}
|
|
30
30
|
document.execCommand("enableObjectResizing", false, "false");
|
|
31
|
-
this.quill.root.parentNode.style.position = this.quill.root.parentNode.style.position || "relative";
|
|
32
31
|
this.quill.root.addEventListener("click", this.onClick);
|
|
33
32
|
this.specs = this.options.specs.map((SpecClass) => new SpecClass(this));
|
|
34
33
|
this.specs.forEach((spec) => spec.init());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlotFormatter.es.js","sources":["../../../src/custom-image/BlotFormatter.ts"],"sourcesContent":["import type Action from './actions/Action'\r\nimport type { Options } from './Options'\r\nimport type BlotSpec from './specs/BlotSpec'\r\nimport { merge as deepmerge } from 'lodash-es'\r\nimport Quill from 'quill'\r\nimport ImageBlot, { ImageContainerBlot } from './image'\r\nimport DefaultOptions from './Options'\r\nimport { CustomImageSpec } from './specs/CustomImageSpec'\r\n\r\nconst dontMerge = (_destination: Array<any>, source: Array<any>) => source\r\n\r\n// @dynamic\r\nexport default class BlotFormatter {\r\n quill: any\r\n options: Options\r\n currentSpec: BlotSpec\r\n specs: BlotSpec[]\r\n overlay: HTMLElement\r\n actions: Action[]\r\n observer: any\r\n\r\n static register() {\r\n Quill.register('formats/image', ImageBlot, true)\r\n Quill.register('formats/image-container', ImageContainerBlot, true)\r\n Quill.register('modules/image-spec', CustomImageSpec, true)\r\n }\r\n\r\n constructor(quill: any, options: any = {}) {\r\n this.quill = quill\r\n this.options = deepmerge(DefaultOptions, options, { arrayMerge: dontMerge })\r\n this.currentSpec = null\r\n this.actions = []\r\n this.overlay = document.createElement('div')\r\n this.overlay.classList.add(this.options.overlay.className)\r\n if (this.options.overlay.style) {\r\n Object.assign(this.overlay.style, this.options.overlay.style)\r\n }\r\n\r\n // disable native image resizing on firefox\r\n document.execCommand('enableObjectResizing', false, 'false') // eslint-disable-next-line-line no-undef\r\n this.quill.root.
|
|
1
|
+
{"version":3,"file":"BlotFormatter.es.js","sources":["../../../src/custom-image/BlotFormatter.ts"],"sourcesContent":["import type Action from './actions/Action'\r\nimport type { Options } from './Options'\r\nimport type BlotSpec from './specs/BlotSpec'\r\nimport { merge as deepmerge } from 'lodash-es'\r\nimport Quill from 'quill'\r\nimport ImageBlot, { ImageContainerBlot } from './image'\r\nimport DefaultOptions from './Options'\r\nimport { CustomImageSpec } from './specs/CustomImageSpec'\r\n\r\nconst dontMerge = (_destination: Array<any>, source: Array<any>) => source\r\n\r\n// @dynamic\r\nexport default class BlotFormatter {\r\n quill: any\r\n options: Options\r\n currentSpec: BlotSpec\r\n specs: BlotSpec[]\r\n overlay: HTMLElement\r\n actions: Action[]\r\n observer: any\r\n\r\n static register() {\r\n Quill.register('formats/image', ImageBlot, true)\r\n Quill.register('formats/image-container', ImageContainerBlot, true)\r\n Quill.register('modules/image-spec', CustomImageSpec, true)\r\n }\r\n\r\n constructor(quill: any, options: any = {}) {\r\n this.quill = quill\r\n this.options = deepmerge(DefaultOptions, options, { arrayMerge: dontMerge })\r\n this.currentSpec = null\r\n this.actions = []\r\n this.overlay = document.createElement('div')\r\n this.overlay.classList.add(this.options.overlay.className)\r\n if (this.options.overlay.style) {\r\n Object.assign(this.overlay.style, this.options.overlay.style)\r\n }\r\n\r\n // disable native image resizing on firefox\r\n document.execCommand('enableObjectResizing', false, 'false') // eslint-disable-next-line-line no-undef\r\n this.quill.root.addEventListener('click', this.onClick)\r\n this.specs = this.options.specs.map((SpecClass: any) => new SpecClass(this))\r\n this.specs.forEach(spec => spec.init())\r\n }\r\n\r\n show(spec: BlotSpec) {\r\n this.currentSpec = spec\r\n this.currentSpec.setSelection()\r\n this.setUserSelect('none')\r\n this.quill.root.parentNode.appendChild(this.overlay)\r\n this.repositionOverlay()\r\n this.createActions(spec)\r\n\r\n // fix: 图片对齐之后,虚线外框应该跟随移动\r\n const imageDom = spec.getTargetElement()\r\n const win: any = window\r\n const MutationObserver = win.MutationObserver || win.WebKitMutationObserver || win.MozMutationObserver\r\n const element = imageDom.parentNode\r\n this.observer = new MutationObserver((mutationList) => {\r\n for (const mutation of mutationList) {\r\n const target = mutation.target\r\n const image = target.querySelector('img')\r\n if (image) {\r\n this.repositionOverlay()\r\n }\r\n }\r\n })\r\n this.observer.observe(element, {\r\n attributes: true,\r\n attributeFilter: ['class'],\r\n attributeOldValue: true,\r\n subtree: true,\r\n })\r\n document.body.addEventListener('click', this.hideImageOverlay, true)\r\n }\r\n\r\n hide() {\r\n if (!this.currentSpec) {\r\n return\r\n }\r\n\r\n const imgDom = this.currentSpec.getTargetElement()\r\n if (imgDom) {\r\n imgDom.classList.remove('current-select-img')\r\n }\r\n\r\n this.currentSpec.onHide()\r\n this.currentSpec = null\r\n this.quill.root.parentNode.removeChild(this.overlay)\r\n this.overlay.style.setProperty('display', 'none')\r\n this.setUserSelect('')\r\n this.destroyActions()\r\n }\r\n\r\n update() {\r\n this.repositionOverlay()\r\n this.actions.forEach(action => action.onUpdate())\r\n }\r\n\r\n createActions(spec: BlotSpec) {\r\n this.actions = spec.getActions().map((ActionClass: any) => {\r\n const action: Action = new ActionClass(this)\r\n action.onCreate()\r\n return action\r\n })\r\n }\r\n\r\n destroyActions() {\r\n this.actions.forEach((action: Action) => action.onDestroy())\r\n this.actions = []\r\n }\r\n\r\n repositionOverlay() {\r\n if (!this.currentSpec) {\r\n return\r\n }\r\n\r\n const overlayTarget = this.currentSpec.getOverlayElement()\r\n if (!overlayTarget) {\r\n return\r\n }\r\n\r\n const parent: HTMLElement = this.quill.root.parentNode\r\n const specRect = overlayTarget.getBoundingClientRect()\r\n const parentRect = parent.getBoundingClientRect()\r\n\r\n Object.assign(this.overlay.style, {\r\n display: 'block',\r\n left: `${specRect.left - parentRect.left - 1 + parent.scrollLeft}px`,\r\n top: `${specRect.top - parentRect.top + parent.scrollTop}px`,\r\n width: `${specRect.width}px`,\r\n height: `${specRect.height}px`,\r\n })\r\n }\r\n\r\n setUserSelect(value: string) {\r\n const props: string[] = [\r\n 'userSelect',\r\n 'mozUserSelect',\r\n 'webkitUserSelect',\r\n 'msUserSelect',\r\n ]\r\n\r\n props.forEach((prop: string) => {\r\n // set on contenteditable element and <html>\r\n this.quill.root.style.setProperty(prop, value)\r\n if (document.documentElement) {\r\n document.documentElement.style.setProperty(prop, value)\r\n }\r\n })\r\n }\r\n\r\n onClick = () => {\r\n this.hide()\r\n }\r\n\r\n hideImageOverlay = (event) => {\r\n const target = event.target\r\n const isBlotFormatter = target?.classList?.contains('blot-formatter__overlay')\r\n // 点击图片操作框之外应该将其销毁\r\n if (!isBlotFormatter) {\r\n this.hide()\r\n }\r\n document.body.removeEventListener('click', this.hideImageOverlay)\r\n }\r\n}\r\n"],"names":["deepmerge","ImageBlot","ImageContainerBlot"],"mappings":";;;;;AASA,MAAM,YAAY,CAAC,cAA0B,WAAuB;AAGpE,MAAqB,cAAc;AAAA,EAejC,YAAY,OA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A,oBAAoB;AACd,QAAA,CAAC,KAAK,aAAa;AACrB;AAAA,IACF;AAEM,UAAA,gBAAgB,KAAK,YAAY,kBAAkB;AACzD,QAAI,CAAC,eAAe;AAClB;AAAA,IACF;AAEM,UAAA,SAAsB,KAAK,MAAM,KAAK;AACtC,UAAA,WAAW,cAAc;AACzB,UAAA,aAAa,OAAO;AAEnB,WAAA,OAAO,KAAK,QAAQ,OAAO;AAAA,MAChC,SAAS;AAAA,MACT,MAAM,GAAG,SAAS,OAAO,WAAW,OAAO,IAAI,OAAO,UAAU;AAAA,MAChE,KAAK,GAAG,SAAS,MAAM,WAAW,MAAM,OAAO,SAAS;AAAA,MACxD,OAAO,GAAG,SAAS,KAAK;AAAA,MACxB,QAAQ,GAAG,SAAS,MAAM;AAAA,IAAA,CAC3B;AAAA,EACH;AAAA,EAEA,cAAc,OAAe;AAC3B,UAAM,QAAkB;AAAA,MACtB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAGI,UAAA,QAAQ,CAAC,SAAiB;AAE9B,WAAK,MAAM,KAAK,MAAM,YAAY,MAAM,KAAK;AAC7C,UAAI,SAAS,iBAAiB;AAC5B,iBAAS,gBAAgB,MAAM,YAAY,MAAM,KAAK;AAAA,MACxD;AAAA,IAAA,CACD;AAAA,EACH;AAeF;"}
|
package/es/fluent-editor.es.js
CHANGED
|
@@ -9,6 +9,7 @@ import CustomUploader from "./custom-uploader.es.js";
|
|
|
9
9
|
import Emoji from "./emoji/index.es.js";
|
|
10
10
|
import FileModule from "./file/index.es.js";
|
|
11
11
|
import { FormatPainter } from "./format-painter/index.es.js";
|
|
12
|
+
import { fullscreenHandler } from "./fullscreen/handler.es.js";
|
|
12
13
|
import Link from "./link/index.es.js";
|
|
13
14
|
import Mention from "./mention/Mention.es.js";
|
|
14
15
|
import { Screenshot } from "./screenshot/index.es.js";
|
|
@@ -25,13 +26,13 @@ import { TextIndentStyle } from "./attributors/text-indent.es.js";
|
|
|
25
26
|
class FluentEditor extends Quill {
|
|
26
27
|
constructor(container, options = {}) {
|
|
27
28
|
super(container, options);
|
|
29
|
+
this.isFullscreen = false;
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
const registerModules = function() {
|
|
31
|
-
const Icons = Quill.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Icons[iconKey] = ICONS_CONFIG[iconKey];
|
|
33
|
+
const Icons = Quill.import("ui/icons");
|
|
34
|
+
Object.entries(ICONS_CONFIG).forEach(([key, icon]) => {
|
|
35
|
+
Icons[key] = icon;
|
|
35
36
|
});
|
|
36
37
|
const SnowTheme = Quill.imports["themes/snow"];
|
|
37
38
|
SnowTheme.DEFAULTS = {
|
|
@@ -65,8 +66,7 @@ const registerModules = function() {
|
|
|
65
66
|
},
|
|
66
67
|
"emoji": function() {
|
|
67
68
|
},
|
|
68
|
-
"fullscreen":
|
|
69
|
-
},
|
|
69
|
+
"fullscreen": fullscreenHandler,
|
|
70
70
|
"list": function(value) {
|
|
71
71
|
var _a, _b;
|
|
72
72
|
const range = this.quill.getSelection();
|
|
@@ -160,6 +160,7 @@ const registerModules = function() {
|
|
|
160
160
|
};
|
|
161
161
|
const FluentEditor$1 = registerModules();
|
|
162
162
|
export {
|
|
163
|
+
FluentEditor,
|
|
163
164
|
FluentEditor$1 as default
|
|
164
165
|
};
|
|
165
166
|
//# sourceMappingURL=fluent-editor.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluent-editor.es.js","sources":["../../src/fluent-editor.ts"],"sourcesContent":["import type { Module, Parchment as TypeParchment } from 'quill'\r\nimport type { IEditorConfig } from './config/types'\r\nimport Quill from 'quill'\r\nimport { FontStyle, LineHeightStyle, SizeStyle, TextIndentStyle } from './attributors'\r\nimport { getListValue, ICONS_CONFIG, inputFile, TABLE_RIGHT_MENU_CONFIG } from './config'\r\nimport Counter from './counter' // 字符统计\r\nimport CustomClipboard from './custom-clipboard' // 粘贴板\r\nimport CustomImage from './custom-image/BlotFormatter' // 图片\r\nimport { CustomImageSpec } from './custom-image/specs/CustomImageSpec' // 图片拉伸模块\r\nimport CustomUploader from './custom-uploader' // 上传\r\nimport Emoji from './emoji' // 表情\r\nimport FileModule from './file' // 文件\r\nimport { FormatPainter } from './format-painter'\r\nimport Link from './link' // 超链接\r\nimport Mention from './mention/Mention' // @提醒\r\nimport { Screenshot } from './screenshot'// 截图\r\nimport SoftBreak from './soft-break' // 软回车\r\nimport Strike from './strike' // 删除线\r\nimport CustomSyntax from './syntax' // 代码块高亮\r\nimport BetterTable from './table/better-table' // 表格\r\nimport Toolbar from './toolbar' // 工具栏\r\nimport Video from './video' // 视频\r\n// import GlobalLink from './global-link' // 全局链接\r\n// import QuickMenu from './quick-menu' // 快捷菜单\r\n\r\
|
|
1
|
+
{"version":3,"file":"fluent-editor.es.js","sources":["../../src/fluent-editor.ts"],"sourcesContent":["import type { Module, Parchment as TypeParchment } from 'quill'\r\nimport type { IEditorConfig } from './config/types'\r\nimport Quill from 'quill'\r\nimport { FontStyle, LineHeightStyle, SizeStyle, TextIndentStyle } from './attributors'\r\nimport { getListValue, ICONS_CONFIG, inputFile, TABLE_RIGHT_MENU_CONFIG } from './config'\r\nimport Counter from './counter' // 字符统计\r\nimport CustomClipboard from './custom-clipboard' // 粘贴板\r\nimport CustomImage from './custom-image/BlotFormatter' // 图片\r\nimport { CustomImageSpec } from './custom-image/specs/CustomImageSpec' // 图片拉伸模块\r\nimport CustomUploader from './custom-uploader' // 上传\r\nimport Emoji from './emoji' // 表情\r\nimport FileModule from './file' // 文件\r\nimport { FormatPainter } from './format-painter'\r\nimport { fullscreenHandler } from './fullscreen/handler'\r\nimport Link from './link' // 超链接\r\nimport Mention from './mention/Mention' // @提醒\r\nimport { Screenshot } from './screenshot'// 截图\r\nimport SoftBreak from './soft-break' // 软回车\r\nimport Strike from './strike' // 删除线\r\nimport CustomSyntax from './syntax' // 代码块高亮\r\nimport BetterTable from './table/better-table' // 表格\r\nimport Toolbar from './toolbar' // 工具栏\r\nimport Video from './video' // 视频\r\n// import GlobalLink from './global-link' // 全局链接\r\n// import QuickMenu from './quick-menu' // 快捷菜单\r\n\r\nexport class FluentEditor extends Quill {\r\n isFullscreen: boolean = false\r\n constructor(container: HTMLElement | string, options: IEditorConfig = {}) {\r\n super(container, options)\r\n }\r\n}\r\n\r\nconst registerModules = function () {\r\n const Icons = Quill.import('ui/icons')\r\n Object.entries(ICONS_CONFIG).forEach(([key, icon]) => {\r\n Icons[key] = icon\r\n })\r\n\r\n const SnowTheme = Quill.imports['themes/snow'] as typeof Module\r\n SnowTheme.DEFAULTS = {\r\n modules: {\r\n 'keyboard': {\r\n bindings: {\r\n ...BetterTable.keyboardBindings,\r\n },\r\n },\r\n 'toolbar': {\r\n handlers: {\r\n ...(SnowTheme.DEFAULTS as Record<string, any>).modules.toolbar.handlers,\r\n 'undo': function () {\r\n this.quill.history.undo()\r\n },\r\n 'redo': function () {\r\n this.quill.history.redo()\r\n },\r\n 'better-table': function () {\r\n this.quill.getModule('better-table').insertTable(3, 3)\r\n },\r\n 'file': function () {\r\n const accept = this.quill.options?.uploadOption?.fileAccept\r\n inputFile.call(this, 'file', accept)\r\n },\r\n 'image': function () {\r\n const accept = this.quill.options?.uploadOption?.imageAccept\r\n inputFile.call(this, 'image', accept)\r\n },\r\n 'emoji': function () {},\r\n 'fullscreen': fullscreenHandler,\r\n 'list': function (value) {\r\n const range = this.quill.getSelection()\r\n const formats = this.quill.getFormat(range)\r\n const preListValue = Array.isArray(formats.list) ? formats.list[0]?.value : formats.list?.value\r\n const curListValue = getListValue(value, preListValue)\r\n // 如果设置list的选区中有表格,判断第一个table-col位置,将表格前的内容设置为list格式\r\n const lines = this.quill.getLines(range.index, range.length)\r\n const tableCols = lines.filter(line => line.statics.blotName === 'table-col' && !line.prev)\r\n if (tableCols.length) {\r\n let start = range.index\r\n // 遍历table-col群组,以之获取表格,将表格前选区设置为对应list格式\r\n tableCols.forEach((item, index) => {\r\n const table = item.domNode.closest('table.quill-better-table')\r\n const tableBlot = Quill.find(table) as TypeParchment.Blot\r\n const tableLength = tableBlot.length()\r\n const tableStart = this.quill.getIndex(item)\r\n const tableEnd = tableStart + tableLength\r\n const beforeTableRangeLength = tableStart - start\r\n // 在表格前设置列表\r\n this.quill.setSelection(start, beforeTableRangeLength, Quill.sources.SILENT)\r\n this.quill.format('list', curListValue, Quill.sources.USER)\r\n table.parentNode.classList.remove('quill-better-table-selected')\r\n // 当前表格末尾为下一个选取的开始\r\n start = tableEnd\r\n if (index === tableCols.length - 1) {\r\n // 将最后一个表格之后所有选区内容设置list格式\r\n this.quill.setSelection(tableEnd, range.index + range.length - tableEnd)\r\n this.quill.format('list', curListValue, Quill.sources.USER)\r\n }\r\n })\r\n }\r\n else {\r\n this.quill.format('list', curListValue, Quill.sources.USER)\r\n }\r\n },\r\n [FormatPainter.toolName]: FormatPainter,\r\n [Screenshot.toolName]: Screenshot,\r\n },\r\n },\r\n 'better-table': {\r\n operationMenu: {\r\n items: TABLE_RIGHT_MENU_CONFIG,\r\n color: true,\r\n },\r\n },\r\n 'image': {\r\n specs: [CustomImageSpec],\r\n overlay: {\r\n style: {\r\n border: '1px dashed rgb(68, 68, 68)',\r\n },\r\n },\r\n align: {\r\n icons: {\r\n left: '<i class=\"icon-text-align-left\"></i>',\r\n center: '<i class=\"icon-text-align-center\"></i>',\r\n right: '<i class=\"icon-text-align-right\"></i>',\r\n },\r\n },\r\n },\r\n },\r\n }\r\n\r\n FluentEditor.register(\r\n {\r\n 'modules/toolbar': Toolbar,\r\n 'modules/mention': Mention,\r\n 'modules/better-table': BetterTable,\r\n 'modules/clipboard': CustomClipboard,\r\n 'modules/uploader': CustomUploader, // 三者关联性最强\r\n 'modules/image': CustomImage, // 三者关联性最强\r\n 'modules/file': FileModule, // 三者关联性最强\r\n 'modules/counter': Counter,\r\n 'modules/emoji-toolbar': Emoji.ToolbarEmoji,\r\n 'modules/emoji-shortname': Emoji.ShortNameEmoji,\r\n // 'modules/global-link': GlobalLink,//暂未开发\r\n 'modules/link': Link, // 报错\r\n // 'modules/quickmenu': QuickMenu,//暂未开发\r\n 'modules/syntax': CustomSyntax,\r\n\r\n 'formats/strike': Strike,\r\n 'formats/softBreak': SoftBreak,\r\n 'formats/video': Video,\r\n 'formats/emoji': Emoji.EmojiBlot,\r\n 'formats/font': FontStyle,\r\n 'formats/size': SizeStyle,\r\n 'formats/line-height': LineHeightStyle,\r\n 'formats/text-indent': TextIndentStyle,\r\n },\r\n true, // 覆盖内部模块\r\n )\r\n\r\n return FluentEditor\r\n}\r\n\r\nexport default registerModules()\r\n"],"names":["Toolbar","CustomImage","Strike"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,MAAM,qBAAqB,MAAM;AAAA,EAEtC,YAAY,WAAiC,UAAyB,IAAI;AACxE,UAAM,WAAW,OAAO;AAFF,SAAA,eAAA;AAAA,EAGxB;AACF;AAEA,MAAM,kBAAkB,WAAY;AAC5B,QAAA,QAAQ,MAAM,OAAO,UAAU;AAC9B,SAAA,QAAQ,YAAY,EAAE,QAAQ,CAAC,CAAC,KAAK,IAAI,MAAM;AACpD,UAAM,GAAG,IAAI;AAAA,EAAA,CACd;AAEK,QAAA,YAAY,MAAM,QAAQ,aAAa;AAC7C,YAAU,WAAW;AAAA,IACnB,SAAS;AAAA,MACP,YAAY;AAAA,QACV,UAAU;AAAA,UACR,GAAG,YAAY;AAAA,QACjB;AAAA,MACF;AAAA,MACA,WAAW;AAAA,QACT,UAAU;AAAA,UACR,GAAI,UAAU,SAAiC,QAAQ,QAAQ;AAAA,UAC/D,QAAQ,WAAY;AACb,iBAAA,MAAM,QAAQ;UACrB;AAAA,UACA,QAAQ,WAAY;AACb,iBAAA,MAAM,QAAQ;UACrB;AAAA,UACA,gBAAgB,WAAY;AAC1B,iBAAK,MAAM,UAAU,cAAc,EAAE,YAAY,GAAG,CAAC;AAAA,UACvD;AAAA,UACA,QAAQ,WAAY;;AAClB,kBAAM,UAAS,gBAAK,MAAM,YAAX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BAAe,gBAAgB;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { namespace, ICONS_CONFIG } from "../config/index.es.js";
|
|
2
|
+
import { lockScroll } from "../utils/scroll-lock.es.js";
|
|
3
|
+
let exitEscHandlerBindToolbar;
|
|
4
|
+
let resizeHandlerBindToolbar;
|
|
5
|
+
let cleanLock;
|
|
6
|
+
let originScrollTop = 0;
|
|
7
|
+
function exitEscHandler(toolbar, e) {
|
|
8
|
+
if (e.code === "Escape") {
|
|
9
|
+
exitFullscreen(toolbar);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function updateToolbarHeight(toolbar) {
|
|
13
|
+
const toolbarRect = toolbar.container.getBoundingClientRect();
|
|
14
|
+
toolbar.quill.container.style.setProperty(`--${namespace}-top`, `${toolbarRect.height}px`);
|
|
15
|
+
}
|
|
16
|
+
function intoFullscreen(toolbar) {
|
|
17
|
+
toolbar.quill.isFullscreen = true;
|
|
18
|
+
originScrollTop = document.documentElement.scrollTop;
|
|
19
|
+
toolbar.container.classList.add("fullscreen");
|
|
20
|
+
toolbar.quill.container.classList.add("fullscreen");
|
|
21
|
+
cleanLock = lockScroll();
|
|
22
|
+
resizeHandlerBindToolbar();
|
|
23
|
+
const [, btn] = toolbar.controls.find((item) => item[0] === "fullscreen");
|
|
24
|
+
btn.innerHTML = ICONS_CONFIG["fullscreen-exit"];
|
|
25
|
+
window.addEventListener("resize", resizeHandlerBindToolbar);
|
|
26
|
+
document.addEventListener("keydown", exitEscHandlerBindToolbar);
|
|
27
|
+
}
|
|
28
|
+
function exitFullscreen(toolbar) {
|
|
29
|
+
toolbar.quill.isFullscreen = false;
|
|
30
|
+
toolbar.container.classList.remove("fullscreen");
|
|
31
|
+
toolbar.quill.container.classList.remove("fullscreen");
|
|
32
|
+
cleanLock();
|
|
33
|
+
document.documentElement.scrollTop = originScrollTop;
|
|
34
|
+
const [, btn] = toolbar.controls.find((item) => item[0] === "fullscreen");
|
|
35
|
+
btn.innerHTML = ICONS_CONFIG.fullscreen;
|
|
36
|
+
window.removeEventListener("resize", resizeHandlerBindToolbar);
|
|
37
|
+
document.removeEventListener("keydown", exitEscHandlerBindToolbar);
|
|
38
|
+
}
|
|
39
|
+
function fullscreenHandler() {
|
|
40
|
+
if (this.quill.isFullscreen) {
|
|
41
|
+
exitFullscreen(this);
|
|
42
|
+
} else {
|
|
43
|
+
exitEscHandlerBindToolbar = exitEscHandler.bind(void 0, this);
|
|
44
|
+
resizeHandlerBindToolbar = updateToolbarHeight.bind(void 0, this);
|
|
45
|
+
intoFullscreen(this);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
fullscreenHandler
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=handler.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.es.js","sources":["../../../src/fullscreen/handler.ts"],"sourcesContent":["import type { FluentEditorToolbar } from '../config/types'\r\nimport { ICONS_CONFIG, namespace } from '../config'\r\nimport { lockScroll } from '../utils/scroll-lock'\r\n\r\nlet exitEscHandlerBindToolbar: (e: KeyboardEvent) => void\r\nlet resizeHandlerBindToolbar: () => void\r\nlet cleanLock: ReturnType<typeof lockScroll>\r\nlet originScrollTop = 0\r\nfunction exitEscHandler(toolbar: FluentEditorToolbar, e: KeyboardEvent) {\r\n if (e.code === 'Escape') {\r\n exitFullscreen(toolbar)\r\n }\r\n}\r\nfunction updateToolbarHeight(toolbar: FluentEditorToolbar) {\r\n const toolbarRect = toolbar.container.getBoundingClientRect()\r\n toolbar.quill.container.style.setProperty(`--${namespace}-top`, `${toolbarRect.height}px`)\r\n}\r\nfunction intoFullscreen(toolbar: FluentEditorToolbar) {\r\n toolbar.quill.isFullscreen = true\r\n originScrollTop = document.documentElement.scrollTop\r\n toolbar.container.classList.add('fullscreen')\r\n toolbar.quill.container.classList.add('fullscreen')\r\n cleanLock = lockScroll()\r\n resizeHandlerBindToolbar()\r\n const [, btn] = toolbar.controls.find(item => item[0] === 'fullscreen')\r\n btn.innerHTML = ICONS_CONFIG['fullscreen-exit']\r\n window.addEventListener('resize', resizeHandlerBindToolbar)\r\n document.addEventListener('keydown', exitEscHandlerBindToolbar)\r\n}\r\nfunction exitFullscreen(toolbar: FluentEditorToolbar) {\r\n toolbar.quill.isFullscreen = false\r\n toolbar.container.classList.remove('fullscreen')\r\n toolbar.quill.container.classList.remove('fullscreen')\r\n cleanLock()\r\n document.documentElement.scrollTop = originScrollTop\r\n const [, btn] = toolbar.controls.find(item => item[0] === 'fullscreen')\r\n btn.innerHTML = ICONS_CONFIG.fullscreen\r\n window.removeEventListener('resize', resizeHandlerBindToolbar)\r\n document.removeEventListener('keydown', exitEscHandlerBindToolbar)\r\n}\r\nexport function fullscreenHandler(this: FluentEditorToolbar) {\r\n if (this.quill.isFullscreen) {\r\n exitFullscreen(this)\r\n }\r\n else {\r\n exitEscHandlerBindToolbar = exitEscHandler.bind(undefined, this)\r\n resizeHandlerBindToolbar = updateToolbarHeight.bind(undefined, this)\r\n intoFullscreen(this)\r\n }\r\n}\r\n"],"names":[],"mappings":";;AAIA,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI,kBAAkB;AACtB,SAAS,eAAe,SAA8B,GAAkB;AAClE,MAAA,EAAE,SAAS,UAAU;AACvB,mBAAe,OAAO;AAAA,EACxB;AACF;AACA,SAAS,oBAAoB,SAA8B;AACnD,QAAA,cAAc,QAAQ,UAAU,sBAAsB;AACpD,UAAA,MAAM,UAAU,MAAM,YAAY,KAAK,SAAS,QAAQ,GAAG,YAAY,MAAM,IAAI;AAC3F;AACA,SAAS,eAAe,SAA8B;AACpD,UAAQ,MAAM,eAAe;AAC7B,oBAAkB,SAAS,gBAAgB;AACnC,UAAA,UAAU,UAAU,IAAI,YAAY;AAC5C,UAAQ,MAAM,UAAU,UAAU,IAAI,YAAY;AAClD,cAAY,WAAW;AACE;AACnB,QAAA,GAAG,GAAG,IAAI,QAAQ,SAAS,KAAK,CAAQ,SAAA,KAAK,CAAC,MAAM,YAAY;AAClE,MAAA,YAAY,aAAa,iBAAiB;AACvC,SAAA,iBAAiB,UAAU,wBAAwB;AACjD,WAAA,iBAAiB,WAAW,yBAAyB;AAChE;AACA,SAAS,eAAe,SAA8B;AACpD,UAAQ,MAAM,eAAe;AACrB,UAAA,UAAU,UAAU,OAAO,YAAY;AAC/C,UAAQ,MAAM,UAAU,UAAU,OAAO,YAAY;AAC3C;AACV,WAAS,gBAAgB,YAAY;AAC/B,QAAA,GAAG,GAAG,IAAI,QAAQ,SAAS,KAAK,CAAQ,SAAA,KAAK,CAAC,MAAM,YAAY;AACtE,MAAI,YAAY,aAAa;AACtB,SAAA,oBAAoB,UAAU,wBAAwB;AACpD,WAAA,oBAAoB,WAAW,yBAAyB;AACnE;AACO,SAAS,oBAA6C;AACvD,MAAA,KAAK,MAAM,cAAc;AAC3B,mBAAe,IAAI;AAAA,EAAA,OAEhB;AACyB,gCAAA,eAAe,KAAK,QAAW,IAAI;AACpC,+BAAA,oBAAoB,KAAK,QAAW,IAAI;AACnE,mBAAe,IAAI;AAAA,EACrB;AACF;"}
|
package/es/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import FluentEditor from "./fluent-editor.es.js";
|
|
2
|
-
import { ICONS_CONFIG, TABLE_RIGHT_MENU_CONFIG, getListValue, inputFile } from "./config/index.es.js";
|
|
2
|
+
import { ICONS_CONFIG, TABLE_RIGHT_MENU_CONFIG, getListValue, inputFile, namespace } from "./config/index.es.js";
|
|
3
3
|
import { AUDIO_VIDEO_UPLOADER_MIME_TYPES, BIG_DELTA_LIMIT, COMPRESSED_UPLOADER_MIME_TYPES, DOC_UPLOADER_MIME_TYPES, FILE_UPLOADER_MIME_TYPES, IMAGE_UPLOADER_MIME_TYPES, LANG_CONF, OTHER_FILE_UPLOADER_MIME_TYPES, PPT_UPLOADER_MIME_TYPES, XSL_UPLOADER_MIME_TYPES } from "./config/editor.config.es.js";
|
|
4
4
|
export {
|
|
5
5
|
AUDIO_VIDEO_UPLOADER_MIME_TYPES,
|
|
@@ -16,6 +16,7 @@ export {
|
|
|
16
16
|
XSL_UPLOADER_MIME_TYPES,
|
|
17
17
|
FluentEditor as default,
|
|
18
18
|
getListValue,
|
|
19
|
-
inputFile
|
|
19
|
+
inputFile,
|
|
20
|
+
namespace
|
|
20
21
|
};
|
|
21
22
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
var _a;
|
|
1
2
|
import Quill from "quill";
|
|
2
|
-
import { sanitize } from "../../config/editor.utils.es.js";
|
|
3
|
-
const Inline = Quill.
|
|
4
|
-
let Link$1 = class
|
|
3
|
+
import { hadProtocol, sanitize } from "../../config/editor.utils.es.js";
|
|
4
|
+
const Inline = Quill.import("blots/inline");
|
|
5
|
+
let Link$1 = (_a = class extends Inline {
|
|
5
6
|
static create(value) {
|
|
6
7
|
const node = super.create(value);
|
|
7
|
-
|
|
8
|
+
let href = value;
|
|
9
|
+
if (!hadProtocol(href) && this.autoProtocol) {
|
|
10
|
+
href = `${this.autoProtocol}://${value}`;
|
|
11
|
+
}
|
|
12
|
+
href = this.sanitize(href);
|
|
8
13
|
node.setAttribute("href", href);
|
|
9
14
|
node.setAttribute("target", "_blank");
|
|
10
15
|
return node;
|
|
@@ -19,10 +24,10 @@ let Link$1 = class Link extends Inline {
|
|
|
19
24
|
if (name !== this.statics.blotName || [false, null].includes(value)) {
|
|
20
25
|
super.format(name, value);
|
|
21
26
|
} else {
|
|
22
|
-
this.domNode.setAttribute("href",
|
|
27
|
+
this.domNode.setAttribute("href", _a.sanitize(value));
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
|
-
};
|
|
30
|
+
}, _a.autoProtocol = "", _a);
|
|
26
31
|
Link$1.blotName = "link";
|
|
27
32
|
Link$1.tagName = "A";
|
|
28
33
|
Link$1.SANITIZED_URL = "about:blank";
|