@toast-ui/editor 3.1.1 → 3.1.4
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/dist/esm/i18n/ar.js +2 -2
- package/dist/esm/i18n/cs-cz.js +2 -2
- package/dist/esm/i18n/de-de.js +4 -4
- package/dist/esm/i18n/en-us.js +3 -3
- package/dist/esm/i18n/es-es.js +2 -2
- package/dist/esm/i18n/fi-fi.js +2 -2
- package/dist/esm/i18n/fr-fr.js +2 -2
- package/dist/esm/i18n/gl-es.js +2 -2
- package/dist/esm/i18n/hr-hr.js +2 -2
- package/dist/esm/i18n/i18n.js +4 -5
- package/dist/esm/i18n/it-it.js +2 -2
- package/dist/esm/i18n/ja-jp.js +3 -3
- package/dist/esm/i18n/ko-kr.js +3 -3
- package/dist/esm/i18n/nb-no.js +2 -2
- package/dist/esm/i18n/nl-nl.js +3 -3
- package/dist/esm/i18n/pl-pl.js +2 -2
- package/dist/esm/i18n/pt-br.js +2 -2
- package/dist/esm/i18n/ru-ru.js +2 -2
- package/dist/esm/i18n/sv-se.js +2 -2
- package/dist/esm/i18n/tr-tr.js +2 -2
- package/dist/esm/i18n/uk-ua.js +2 -2
- package/dist/esm/i18n/zh-cn.js +3 -3
- package/dist/esm/i18n/zh-tw.js +2 -2
- package/dist/esm/index.js +990 -703
- package/dist/esm/indexViewer.js +34 -18
- package/dist/i18n/ar.js +6 -6
- package/dist/i18n/cs-cz.js +6 -6
- package/dist/i18n/de-de.js +8 -8
- package/dist/i18n/es-es.js +6 -6
- package/dist/i18n/fi-fi.js +6 -6
- package/dist/i18n/fr-fr.js +6 -6
- package/dist/i18n/gl-es.js +6 -6
- package/dist/i18n/hr-hr.js +6 -6
- package/dist/i18n/it-it.js +6 -6
- package/dist/i18n/ja-jp.js +7 -7
- package/dist/i18n/ko-kr.js +7 -7
- package/dist/i18n/nb-no.js +6 -6
- package/dist/i18n/nl-nl.js +7 -7
- package/dist/i18n/pl-pl.js +6 -6
- package/dist/i18n/pt-br.js +6 -6
- package/dist/i18n/ru-ru.js +6 -6
- package/dist/i18n/sv-se.js +6 -6
- package/dist/i18n/tr-tr.js +6 -6
- package/dist/i18n/uk-ua.js +6 -6
- package/dist/i18n/zh-cn.js +7 -7
- package/dist/i18n/zh-tw.js +6 -6
- package/dist/toastui-editor-only.css +2 -2
- package/dist/toastui-editor-viewer.css +7 -7
- package/dist/toastui-editor-viewer.js +98 -43
- package/dist/toastui-editor.css +7 -7
- package/dist/toastui-editor.js +1021 -726
- package/package.json +4 -3
- package/types/editor.d.ts +9 -1
- package/types/event.d.ts +2 -0
- package/types/index.d.ts +1 -1
- package/types/spec.d.ts +1 -1
- package/types/ui.d.ts +22 -20
- package/types/wysiwyg.d.ts +2 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @toast-ui/editor
|
|
3
|
-
* @version 3.1.
|
|
4
|
-
* @author NHN FE Development Lab <dl_javascript@nhn.com>
|
|
3
|
+
* @version 3.1.4 | Thu Apr 14 2022
|
|
4
|
+
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
7
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
8
8
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
9
|
-
module.exports = factory(require("prosemirror-model"), require("prosemirror-state"), require("prosemirror-view"));
|
|
9
|
+
module.exports = factory(require("prosemirror-inputrules"), require("prosemirror-model"), require("prosemirror-state"), require("prosemirror-view"));
|
|
10
10
|
else if(typeof define === 'function' && define.amd)
|
|
11
|
-
define(["prosemirror-model", "prosemirror-state", "prosemirror-view"], factory);
|
|
11
|
+
define(["prosemirror-inputrules", "prosemirror-model", "prosemirror-state", "prosemirror-view"], factory);
|
|
12
12
|
else if(typeof exports === 'object')
|
|
13
|
-
exports["toastui"] = factory(require("prosemirror-model"), require("prosemirror-state"), require("prosemirror-view"));
|
|
13
|
+
exports["toastui"] = factory(require("prosemirror-inputrules"), require("prosemirror-model"), require("prosemirror-state"), require("prosemirror-view"));
|
|
14
14
|
else
|
|
15
|
-
root["toastui"] = root["toastui"] || {}, root["toastui"]["Editor"] = factory(root[undefined], root[undefined], root[undefined]);
|
|
16
|
-
})(self, function(
|
|
15
|
+
root["toastui"] = root["toastui"] || {}, root["toastui"]["Editor"] = factory(root[undefined], root[undefined], root[undefined], root[undefined]);
|
|
16
|
+
})(self, function(__WEBPACK_EXTERNAL_MODULE__479__, __WEBPACK_EXTERNAL_MODULE__43__, __WEBPACK_EXTERNAL_MODULE__814__, __WEBPACK_EXTERNAL_MODULE__311__) {
|
|
17
17
|
return /******/ (function() { // webpackBootstrap
|
|
18
18
|
/******/ var __webpack_modules__ = ({
|
|
19
19
|
|
|
@@ -2714,27 +2714,35 @@ module.exports = isUndefined;
|
|
|
2714
2714
|
|
|
2715
2715
|
/***/ }),
|
|
2716
2716
|
|
|
2717
|
-
/***/
|
|
2717
|
+
/***/ 479:
|
|
2718
2718
|
/***/ (function(module) {
|
|
2719
2719
|
|
|
2720
2720
|
"use strict";
|
|
2721
|
-
module.exports =
|
|
2721
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__479__;
|
|
2722
2722
|
|
|
2723
2723
|
/***/ }),
|
|
2724
2724
|
|
|
2725
|
-
/***/
|
|
2725
|
+
/***/ 43:
|
|
2726
2726
|
/***/ (function(module) {
|
|
2727
2727
|
|
|
2728
2728
|
"use strict";
|
|
2729
|
-
module.exports =
|
|
2729
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__43__;
|
|
2730
2730
|
|
|
2731
2731
|
/***/ }),
|
|
2732
2732
|
|
|
2733
|
-
/***/
|
|
2733
|
+
/***/ 814:
|
|
2734
2734
|
/***/ (function(module) {
|
|
2735
2735
|
|
|
2736
2736
|
"use strict";
|
|
2737
|
-
module.exports =
|
|
2737
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__814__;
|
|
2738
|
+
|
|
2739
|
+
/***/ }),
|
|
2740
|
+
|
|
2741
|
+
/***/ 311:
|
|
2742
|
+
/***/ (function(module) {
|
|
2743
|
+
|
|
2744
|
+
"use strict";
|
|
2745
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__311__;
|
|
2738
2746
|
|
|
2739
2747
|
/***/ })
|
|
2740
2748
|
|
|
@@ -9061,7 +9069,7 @@ var InlineParser = /** @class */ (function () {
|
|
|
9061
9069
|
var literal = textNode.literal || '';
|
|
9062
9070
|
var info = literal.split(/\s/)[0];
|
|
9063
9071
|
newNode.info = info;
|
|
9064
|
-
if (literal.length
|
|
9072
|
+
if (literal.length <= info.length) {
|
|
9065
9073
|
textNode.unlink();
|
|
9066
9074
|
}
|
|
9067
9075
|
else {
|
|
@@ -11496,7 +11504,6 @@ function filterDisallowedTags(str) {
|
|
|
11496
11504
|
}
|
|
11497
11505
|
return str;
|
|
11498
11506
|
}
|
|
11499
|
-
var CUSTOM_SYNTAX_LENGTH = 4;
|
|
11500
11507
|
var baseConvertors = {
|
|
11501
11508
|
heading: function (node, _a) {
|
|
11502
11509
|
var entering = _a.entering;
|
|
@@ -11687,7 +11694,7 @@ var baseConvertors = {
|
|
|
11687
11694
|
];
|
|
11688
11695
|
},
|
|
11689
11696
|
customInline: function (node, context, convertors) {
|
|
11690
|
-
var _a = node,
|
|
11697
|
+
var _a = node, info = _a.info, firstChild = _a.firstChild;
|
|
11691
11698
|
var nomalizedInfo = info.trim().toLowerCase();
|
|
11692
11699
|
var customConvertor = convertors[nomalizedInfo];
|
|
11693
11700
|
var entering = context.entering;
|
|
@@ -11699,13 +11706,10 @@ var baseConvertors = {
|
|
|
11699
11706
|
console.warn("[@toast-ui/editor] - The error occurred when " + nomalizedInfo + " inline node was parsed in markdown renderer: " + e);
|
|
11700
11707
|
}
|
|
11701
11708
|
}
|
|
11702
|
-
var text = sourcepos[1][1] - sourcepos[0][1] + 1 === info.length + CUSTOM_SYNTAX_LENGTH
|
|
11703
|
-
? ''
|
|
11704
|
-
: info + " ";
|
|
11705
11709
|
return entering
|
|
11706
11710
|
? [
|
|
11707
11711
|
{ type: 'openTag', tagName: 'span' },
|
|
11708
|
-
{ type: 'text', content: "$$" +
|
|
11712
|
+
{ type: 'text', content: "$$" + info + (firstChild ? ' ' : '') },
|
|
11709
11713
|
]
|
|
11710
11714
|
: [
|
|
11711
11715
|
{ type: 'text', content: '$$' },
|
|
@@ -12072,6 +12076,7 @@ var CLOSE_TAG = "</(" + TAG_NAME + ")\\s*[>]";
|
|
|
12072
12076
|
var constants_HTML_TAG = "(?:" + constants_OPEN_TAG + "|" + CLOSE_TAG + ")";
|
|
12073
12077
|
var reHTMLTag = new RegExp("^" + constants_HTML_TAG, 'i');
|
|
12074
12078
|
var constants_reBR = /<br\s*\/*>/i;
|
|
12079
|
+
var reHTMLComment = /<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/;
|
|
12075
12080
|
var constants_ALTERNATIVE_TAG_FOR_BR = '</p><p>';
|
|
12076
12081
|
|
|
12077
12082
|
// EXTERNAL MODULE: ../../node_modules/tui-code-snippet/type/isNull.js
|
|
@@ -12087,9 +12092,33 @@ var request_sendHostname = __webpack_require__(391);
|
|
|
12087
12092
|
var isMac = /Mac/.test(navigator.platform);
|
|
12088
12093
|
var reSpaceMoreThanOne = /[\u0020]+/g;
|
|
12089
12094
|
var common_reEscapeChars = /[>(){}[\]+-.!#|]/g;
|
|
12090
|
-
var reEscapeHTML = /<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[
|
|
12095
|
+
var reEscapeHTML = /<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g;
|
|
12091
12096
|
var reEscapeBackSlash = /\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g;
|
|
12092
12097
|
var reEscapePairedChars = /[*_~`]/g;
|
|
12098
|
+
var reMdImageSyntax = /!\[.*\]\(.*\)/g;
|
|
12099
|
+
var reEscapedCharInLinkSyntax = /[[\]]/g; //
|
|
12100
|
+
var common_XMLSPECIAL = '[&<>"]';
|
|
12101
|
+
var common_reXmlSpecial = new RegExp(common_XMLSPECIAL, 'g');
|
|
12102
|
+
function common_replaceUnsafeChar(char) {
|
|
12103
|
+
switch (char) {
|
|
12104
|
+
case '&':
|
|
12105
|
+
return '&';
|
|
12106
|
+
case '<':
|
|
12107
|
+
return '<';
|
|
12108
|
+
case '>':
|
|
12109
|
+
return '>';
|
|
12110
|
+
case '"':
|
|
12111
|
+
return '"';
|
|
12112
|
+
default:
|
|
12113
|
+
return char;
|
|
12114
|
+
}
|
|
12115
|
+
}
|
|
12116
|
+
function common_escapeXml(text) {
|
|
12117
|
+
if (common_reXmlSpecial.test(text)) {
|
|
12118
|
+
return text.replace(common_reXmlSpecial, common_replaceUnsafeChar);
|
|
12119
|
+
}
|
|
12120
|
+
return text;
|
|
12121
|
+
}
|
|
12093
12122
|
function sendHostName() {
|
|
12094
12123
|
sendHostname('editor', 'UA-129966929-1');
|
|
12095
12124
|
}
|
|
@@ -12139,6 +12168,18 @@ function isNeedEscapeText(text) {
|
|
|
12139
12168
|
});
|
|
12140
12169
|
return needEscape;
|
|
12141
12170
|
}
|
|
12171
|
+
function escapeTextForLink(text) {
|
|
12172
|
+
var imageSyntaxRanges = [];
|
|
12173
|
+
var result = reMdImageSyntax.exec(text);
|
|
12174
|
+
while (result) {
|
|
12175
|
+
imageSyntaxRanges.push([result.index, result.index + result[0].length]);
|
|
12176
|
+
result = reMdImageSyntax.exec(text);
|
|
12177
|
+
}
|
|
12178
|
+
return text.replace(reEscapedCharInLinkSyntax, function (matched, offset) {
|
|
12179
|
+
var isDelimiter = imageSyntaxRanges.some(function (range) { return offset > range[0] && offset < range[1]; });
|
|
12180
|
+
return isDelimiter ? matched : "\\" + matched;
|
|
12181
|
+
});
|
|
12182
|
+
}
|
|
12142
12183
|
function common_escape(text) {
|
|
12143
12184
|
var replacer = function (matched) { return "\\" + matched; };
|
|
12144
12185
|
var escapedText = text.replace(reSpaceMoreThanOne, ' ');
|
|
@@ -12795,7 +12836,7 @@ function sanitizeHTML(html, options) {
|
|
|
12795
12836
|
|
|
12796
12837
|
function getChildrenHTML(node, typeName) {
|
|
12797
12838
|
return node
|
|
12798
|
-
.literal.replace(new RegExp("(<\\s*" + typeName + "[^>]
|
|
12839
|
+
.literal.replace(new RegExp("(<\\s*" + typeName + "[^>]*>)|(</" + typeName + "\\s*[>])", 'ig'), '')
|
|
12799
12840
|
.trim();
|
|
12800
12841
|
}
|
|
12801
12842
|
function getHTMLAttrsByHTMLString(html) {
|
|
@@ -13053,14 +13094,6 @@ function isBlankLine(doc, index) {
|
|
|
13053
13094
|
var pmNode = doc.child(index);
|
|
13054
13095
|
return !pmNode.childCount || (pmNode.childCount === 1 && !((_a = pmNode.firstChild.text) === null || _a === void 0 ? void 0 : _a.trim()));
|
|
13055
13096
|
}
|
|
13056
|
-
function getNextNonBlankElement(mdNode) {
|
|
13057
|
-
var next = mdNode.next, parent = mdNode.parent;
|
|
13058
|
-
while (!next && parent) {
|
|
13059
|
-
next = parent.next;
|
|
13060
|
-
parent = parent.parent;
|
|
13061
|
-
}
|
|
13062
|
-
return next ? document.querySelector("[data-nodeid=\"" + next.id + "\"]") : null;
|
|
13063
|
-
}
|
|
13064
13097
|
function getEditorRangeHeightInfo(doc, mdNode, children) {
|
|
13065
13098
|
var start = getMdStartLine(mdNode) - 1;
|
|
13066
13099
|
var end = getMdEndLine(mdNode) - 1;
|
|
@@ -13128,11 +13161,11 @@ function getAdditionalPos(scrollTop, offsetTop, height, targetNodeHeight) {
|
|
|
13128
13161
|
var ratio = Math.min((scrollTop - offsetTop) / height, 1);
|
|
13129
13162
|
return ratio * targetNodeHeight;
|
|
13130
13163
|
}
|
|
13131
|
-
function getParentNodeObj(mdNode) {
|
|
13132
|
-
var el =
|
|
13164
|
+
function getParentNodeObj(previewContent, mdNode) {
|
|
13165
|
+
var el = previewContent.querySelector("[data-nodeid=\"" + mdNode.id + "\"]");
|
|
13133
13166
|
while (!el || isStyledInlineNode(mdNode)) {
|
|
13134
13167
|
mdNode = mdNode.parent;
|
|
13135
|
-
el =
|
|
13168
|
+
el = previewContent.querySelector("[data-nodeid=\"" + mdNode.id + "\"]");
|
|
13136
13169
|
}
|
|
13137
13170
|
return getNonNestableNodeObj({ mdNode: mdNode, el: el });
|
|
13138
13171
|
}
|
|
@@ -13237,10 +13270,16 @@ var MarkdownPreview = /** @class */ (function () {
|
|
|
13237
13270
|
this.sanitizer = sanitizer;
|
|
13238
13271
|
this.initEvent(highlight);
|
|
13239
13272
|
this.initContentSection();
|
|
13273
|
+
// To prevent overflowing contents in the viewer
|
|
13274
|
+
if (this.isViewer) {
|
|
13275
|
+
this.previewContent.style.overflowWrap = 'break-word';
|
|
13276
|
+
}
|
|
13240
13277
|
}
|
|
13241
13278
|
MarkdownPreview.prototype.initContentSection = function () {
|
|
13242
13279
|
this.previewContent = createElementWith("<div class=\"" + cls('contents') + "\"></div>");
|
|
13243
|
-
|
|
13280
|
+
if (!this.isViewer) {
|
|
13281
|
+
this.el.appendChild(this.previewContent);
|
|
13282
|
+
}
|
|
13244
13283
|
};
|
|
13245
13284
|
MarkdownPreview.prototype.toggleActive = function (active) {
|
|
13246
13285
|
toggleClass(this.el, 'active', active);
|
|
@@ -13248,6 +13287,9 @@ var MarkdownPreview = /** @class */ (function () {
|
|
|
13248
13287
|
MarkdownPreview.prototype.initEvent = function (highlight) {
|
|
13249
13288
|
var _this = this;
|
|
13250
13289
|
this.eventEmitter.listen('updatePreview', this.update.bind(this));
|
|
13290
|
+
if (this.isViewer) {
|
|
13291
|
+
return;
|
|
13292
|
+
}
|
|
13251
13293
|
if (highlight) {
|
|
13252
13294
|
this.eventEmitter.listen('changeToolbarState', function (_a) {
|
|
13253
13295
|
var mdNode = _a.mdNode, cursorPos = _a.cursorPos;
|
|
@@ -13361,11 +13403,13 @@ var MarkdownPreview = /** @class */ (function () {
|
|
|
13361
13403
|
/* harmony default export */ var mdPreview = (MarkdownPreview);
|
|
13362
13404
|
|
|
13363
13405
|
// EXTERNAL MODULE: external {"commonjs":"prosemirror-state","commonjs2":"prosemirror-state","amd":"prosemirror-state"}
|
|
13364
|
-
var external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_ = __webpack_require__(
|
|
13406
|
+
var external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_ = __webpack_require__(814);
|
|
13407
|
+
// EXTERNAL MODULE: external {"commonjs":"prosemirror-inputrules","commonjs2":"prosemirror-inputrules","amd":"prosemirror-inputrules"}
|
|
13408
|
+
var external_commonjs_prosemirror_inputrules_commonjs2_prosemirror_inputrules_amd_prosemirror_inputrules_ = __webpack_require__(479);
|
|
13365
13409
|
// EXTERNAL MODULE: external {"commonjs":"prosemirror-view","commonjs2":"prosemirror-view","amd":"prosemirror-view"}
|
|
13366
|
-
var external_commonjs_prosemirror_view_commonjs2_prosemirror_view_amd_prosemirror_view_ = __webpack_require__(
|
|
13410
|
+
var external_commonjs_prosemirror_view_commonjs2_prosemirror_view_amd_prosemirror_view_ = __webpack_require__(311);
|
|
13367
13411
|
// EXTERNAL MODULE: external {"commonjs":"prosemirror-model","commonjs2":"prosemirror-model","amd":"prosemirror-model"}
|
|
13368
|
-
var external_commonjs_prosemirror_model_commonjs2_prosemirror_model_amd_prosemirror_model_ = __webpack_require__(
|
|
13412
|
+
var external_commonjs_prosemirror_model_commonjs2_prosemirror_model_amd_prosemirror_model_ = __webpack_require__(43);
|
|
13369
13413
|
// EXTERNAL MODULE: ../../node_modules/tui-code-snippet/array/inArray.js
|
|
13370
13414
|
var inArray = __webpack_require__(928);
|
|
13371
13415
|
var inArray_default = /*#__PURE__*/__webpack_require__.n(inArray);
|
|
@@ -13430,7 +13474,7 @@ var map_Map = /** @class */ (function () {
|
|
|
13430
13474
|
;// CONCATENATED MODULE: ./src/i18n/i18n.ts
|
|
13431
13475
|
/**
|
|
13432
13476
|
* @fileoverview Implements i18n
|
|
13433
|
-
* @author NHN FE Development Lab <dl_javascript@nhn.com>
|
|
13477
|
+
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
13434
13478
|
*/
|
|
13435
13479
|
|
|
13436
13480
|
|
|
@@ -13654,7 +13698,10 @@ var TableOffsetMap = /** @class */ (function () {
|
|
|
13654
13698
|
};
|
|
13655
13699
|
TableOffsetMap.prototype.getNodeAndPos = function (rowIdx, colIdx) {
|
|
13656
13700
|
var cellInfo = this.rowInfo[rowIdx][colIdx];
|
|
13657
|
-
return {
|
|
13701
|
+
return {
|
|
13702
|
+
node: this.table.nodeAt(cellInfo.offset - this.tableStartOffset),
|
|
13703
|
+
pos: cellInfo.offset,
|
|
13704
|
+
};
|
|
13658
13705
|
};
|
|
13659
13706
|
TableOffsetMap.prototype.extendedRowspan = function (rowIdx, colIdx) {
|
|
13660
13707
|
return false;
|
|
@@ -13755,11 +13802,13 @@ function mixinTableOffsetMapPrototype(offsetMapMixin, createOffsetMapMixin) {
|
|
|
13755
13802
|
|
|
13756
13803
|
|
|
13757
13804
|
|
|
13805
|
+
|
|
13758
13806
|
function execPlugin(plugin, eventEmitter, usageStatistics) {
|
|
13759
|
-
var pmState = { Plugin: external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_.Plugin, Selection: external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_.Selection, TextSelection: external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_.TextSelection };
|
|
13807
|
+
var pmState = { Plugin: external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_.Plugin, PluginKey: external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_.PluginKey, Selection: external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_.Selection, TextSelection: external_commonjs_prosemirror_state_commonjs2_prosemirror_state_amd_prosemirror_state_.TextSelection };
|
|
13760
13808
|
var pmView = { Decoration: external_commonjs_prosemirror_view_commonjs2_prosemirror_view_amd_prosemirror_view_.Decoration, DecorationSet: external_commonjs_prosemirror_view_commonjs2_prosemirror_view_amd_prosemirror_view_.DecorationSet };
|
|
13761
13809
|
var pmModel = { Fragment: external_commonjs_prosemirror_model_commonjs2_prosemirror_model_amd_prosemirror_model_.Fragment };
|
|
13762
|
-
var
|
|
13810
|
+
var pmRules = { InputRule: external_commonjs_prosemirror_inputrules_commonjs2_prosemirror_inputrules_amd_prosemirror_inputrules_.InputRule, inputRules: external_commonjs_prosemirror_inputrules_commonjs2_prosemirror_inputrules_amd_prosemirror_inputrules_.inputRules, undoInputRule: external_commonjs_prosemirror_inputrules_commonjs2_prosemirror_inputrules_amd_prosemirror_inputrules_.undoInputRule };
|
|
13811
|
+
var context = { eventEmitter: eventEmitter, usageStatistics: usageStatistics, pmState: pmState, pmView: pmView, pmModel: pmModel, pmRules: pmRules, i18n: i18n };
|
|
13763
13812
|
if (isArray_default()(plugin)) {
|
|
13764
13813
|
var pluginFn = plugin[0], _a = plugin[1], options = _a === void 0 ? {} : _a;
|
|
13765
13814
|
return pluginFn(context, options);
|
|
@@ -13842,6 +13891,7 @@ var eventTypeList = [
|
|
|
13842
13891
|
'mixinTableOffsetMapPrototype',
|
|
13843
13892
|
'setFocusedNode',
|
|
13844
13893
|
'removePopupWidget',
|
|
13894
|
+
'query',
|
|
13845
13895
|
// provide event for user
|
|
13846
13896
|
'openPopup',
|
|
13847
13897
|
'closePopup',
|
|
@@ -13849,6 +13899,7 @@ var eventTypeList = [
|
|
|
13849
13899
|
'beforePreviewRender',
|
|
13850
13900
|
'beforeConvertWysiwygToMarkdown',
|
|
13851
13901
|
'load',
|
|
13902
|
+
'loadUI',
|
|
13852
13903
|
'change',
|
|
13853
13904
|
'caretChange',
|
|
13854
13905
|
'destroy',
|
|
@@ -14127,7 +14178,7 @@ var ToastUIEditorViewer = /** @class */ (function () {
|
|
|
14127
14178
|
customParser: markdownParsers,
|
|
14128
14179
|
});
|
|
14129
14180
|
this.preview = new mdPreview(this.eventEmitter, tslib_es6_assign(tslib_es6_assign({}, rendererOptions), { isViewer: true }));
|
|
14130
|
-
on_default()(this.preview.
|
|
14181
|
+
on_default()(this.preview.previewContent, 'mousedown', this.toggleTask.bind(this));
|
|
14131
14182
|
if (initialValue) {
|
|
14132
14183
|
this.setMarkdown(initialValue);
|
|
14133
14184
|
}
|
|
@@ -14149,6 +14200,10 @@ var ToastUIEditorViewer = /** @class */ (function () {
|
|
|
14149
14200
|
element.hasAttribute(TASK_ATTR_NAME) &&
|
|
14150
14201
|
isPositionInBox(style, ev.offsetX, ev.offsetY)) {
|
|
14151
14202
|
toggleClass(element, TASK_CHECKED_CLASS_NAME);
|
|
14203
|
+
this.eventEmitter.emit('change', {
|
|
14204
|
+
source: 'viewer',
|
|
14205
|
+
date: ev,
|
|
14206
|
+
});
|
|
14152
14207
|
}
|
|
14153
14208
|
};
|
|
14154
14209
|
/**
|
|
@@ -14226,7 +14281,7 @@ var ToastUIEditorViewer = /** @class */ (function () {
|
|
|
14226
14281
|
/* harmony default export */ var indexViewer = (viewer);
|
|
14227
14282
|
|
|
14228
14283
|
}();
|
|
14229
|
-
__webpack_exports__ = __webpack_exports__
|
|
14284
|
+
__webpack_exports__ = __webpack_exports__["default"];
|
|
14230
14285
|
/******/ return __webpack_exports__;
|
|
14231
14286
|
/******/ })()
|
|
14232
14287
|
;
|
package/dist/toastui-editor.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @toast-ui/editor
|
|
3
|
-
* @version 3.1.
|
|
4
|
-
* @author NHN FE Development Lab <dl_javascript@nhn.com>
|
|
3
|
+
* @version 3.1.4 | Thu Apr 14 2022
|
|
4
|
+
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
7
|
.ProseMirror {
|
|
@@ -1260,7 +1260,7 @@ table.ProseMirror-selectednode {
|
|
|
1260
1260
|
right: 0px;
|
|
1261
1261
|
border-radius: 50%;
|
|
1262
1262
|
border: 1px solid #c9ccd5;
|
|
1263
|
-
background: #fff url(
|
|
1263
|
+
background: #fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj4KICAgICAgICA8ZyBzdHJva2U9IiM1NTUiIHN0cm9rZS13aWR0aD0iMS41Ij4KICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICA8Zz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNy42NjUgMTUuMDdsLTEuODE5LS4wMDJjLTEuNDg2IDAtMi42OTItMS4yMjgtMi42OTItMi43NDR2LS4xOTJjMC0xLjUxNSAxLjIwNi0yLjc0NCAyLjY5Mi0yLjc0NGgzLjg0NmMxLjQ4NyAwIDIuNjkyIDEuMjI5IDIuNjkyIDIuNzQ0di4xOTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDAwIC00NTgxKSB0cmFuc2xhdGUoOTk1IDQ1NzYpIHRyYW5zbGF0ZSg1IDUpIHNjYWxlKDEgLTEpIHJvdGF0ZSg0NSAzNy4yOTMgMCkiLz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTIuMzI2IDQuOTM0bDEuODIyLjAwMmMxLjQ4NyAwIDIuNjkzIDEuMjI4IDIuNjkzIDIuNzQ0di4xOTJjMCAxLjUxNS0xLjIwNiAyLjc0NC0yLjY5MyAyLjc0NGgtMy44NDVjLTEuNDg3IDAtMi42OTItMS4yMjktMi42OTItMi43NDRWNy42OCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwMDAgLTQ1ODEpIHRyYW5zbGF0ZSg5OTUgNDU3NikgdHJhbnNsYXRlKDUgNSkgc2NhbGUoMSAtMSkgcm90YXRlKDQ1IDMwLjk5NiAwKSIvPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K) no-repeat;
|
|
1264
1264
|
background-position: center;
|
|
1265
1265
|
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
|
|
1266
1266
|
cursor: pointer;
|
|
@@ -1287,11 +1287,11 @@ table.ProseMirror-selectednode {
|
|
|
1287
1287
|
left: 0;
|
|
1288
1288
|
top: 1px;
|
|
1289
1289
|
cursor: pointer;
|
|
1290
|
-
background: transparent url(
|
|
1290
|
+
background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgZmlsbD0iI0ZGRiIgc3Ryb2tlPSIjQ0NDIj4KICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAzMCAtMjk2KSB0cmFuc2xhdGUoNzg4IDE5MikgdHJhbnNsYXRlKDI0MiAxMDQpIj4KICAgICAgICAgICAgICAgICAgICA8cmVjdCB3aWR0aD0iMTciIGhlaWdodD0iMTciIHg9Ii41IiB5PSIuNSIgcng9IjIiLz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==);
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
1293
|
.toastui-editor-contents .task-list-item.checked::before {
|
|
1294
|
-
background-image: url(
|
|
1294
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgZmlsbD0iIzRCOTZFNiI+CiAgICAgICAgICAgIDxnPgogICAgICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2IDBjMS4xMDUgMCAyIC44OTUgMiAydjE0YzAgMS4xMDUtLjg5NSAyLTIgMkgyYy0xLjEwNSAwLTItLjg5NS0yLTJWMkMwIC44OTUuODk1IDAgMiAwaDE0em0tMS43OTMgNS4yOTNjLS4zOS0uMzktMS4wMjQtLjM5LTEuNDE0IDBMNy41IDEwLjU4NSA1LjIwNyA4LjI5M2wtLjA5NC0uMDgzYy0uMzkyLS4zMDUtLjk2LS4yNzgtMS4zMi4wODMtLjM5LjM5LS4zOSAxLjAyNCAwIDEuNDE0bDMgMyAuMDk0LjA4M2MuMzkyLjMwNS45Ni4yNzggMS4zMi0uMDgzbDYtNiAuMDgzLS4wOTRjLjMwNS0uMzkyLjI3OC0uOTYtLjA4My0xLjMyeiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwNTAgLTI5NikgdHJhbnNsYXRlKDc4OCAxOTIpIHRyYW5zbGF0ZSgyNjIgMTA0KSIvPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K);
|
|
1295
1295
|
}
|
|
1296
1296
|
|
|
1297
1297
|
.toastui-editor-custom-block .toastui-editor-custom-block-editor {
|
|
@@ -1328,7 +1328,7 @@ table.ProseMirror-selectednode {
|
|
|
1328
1328
|
margin-left: 8px;
|
|
1329
1329
|
padding: 3px;
|
|
1330
1330
|
border: solid 1px #cccccc;
|
|
1331
|
-
background: url(
|
|
1331
|
+
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI1LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IuugiOydtOyWtF8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiCgkgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMzAgMzAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMwIDMwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO2ZpbGw6IzU1NTU1NTt9Cjwvc3R5bGU+CjxnPgoJPGc+CgkJPGc+CgkJCTxnPgoJCQkJPGc+CgkJCQkJPHBhdGggY2xhc3M9InN0MCIgZD0iTTE1LjUsMTIuNWwyLDJMMTIsMjBoLTJ2LTJMMTUuNSwxMi41eiBNMTgsMTBsMiwybC0xLjUsMS41bC0yLTJMMTgsMTB6Ii8+CgkJCQk8L2c+CgkJCTwvZz4KCQk8L2c+Cgk8L2c+CjwvZz4KPC9zdmc+Cg==)
|
|
1332
1332
|
no-repeat;
|
|
1333
1333
|
background-position: center;
|
|
1334
1334
|
background-size: 30px 30px;
|
|
@@ -1356,7 +1356,7 @@ table.ProseMirror-selectednode {
|
|
|
1356
1356
|
font-weight: bold;
|
|
1357
1357
|
font-size: 13px;
|
|
1358
1358
|
color: #333;
|
|
1359
|
-
background: #e5e9ea url(
|
|
1359
|
+
background: #e5e9ea url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI1LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IuugiOydtOyWtF8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiCgkgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMzAgMzAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMwIDMwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO2ZpbGw6IzU1NTU1NTt9Cjwvc3R5bGU+CjxnPgoJPGc+CgkJPGc+CgkJCTxnPgoJCQkJPGc+CgkJCQkJPHBhdGggY2xhc3M9InN0MCIgZD0iTTE1LjUsMTIuNWwyLDJMMTIsMjBoLTJ2LTJMMTUuNSwxMi41eiBNMTgsMTBsMiwybC0xLjUsMS41bC0yLTJMMTgsMTB6Ii8+CgkJCQk8L2c+CgkJCTwvZz4KCQk8L2c+Cgk8L2c+CjwvZz4KPC9zdmc+Cg==) no-repeat;
|
|
1360
1360
|
background-position: right;
|
|
1361
1361
|
border-radius: 2px;
|
|
1362
1362
|
background-size: 30px 30px;
|