@ones-editor/editor 2.1.1-beta.82 → 2.1.1-beta.83
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/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +52 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1594,6 +1594,7 @@ div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar.menu .menu-ite
|
|
|
1594
1594
|
line-height: 1.4;
|
|
1595
1595
|
color: #000;
|
|
1596
1596
|
width: 100%;
|
|
1597
|
+
resize: none;
|
|
1597
1598
|
}
|
|
1598
1599
|
.editor-input-wrap .editor-input-container .editor-input:hover {
|
|
1599
1600
|
border-color: #0064ff;
|
|
@@ -1608,9 +1609,6 @@ div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar.menu .menu-ite
|
|
|
1608
1609
|
.editor-input-wrap .editor-input-container .editor-input.has-prefix {
|
|
1609
1610
|
padding-left: 30px;
|
|
1610
1611
|
}
|
|
1611
|
-
.editor-input-wrap .editor-input-container textarea {
|
|
1612
|
-
resize: none;
|
|
1613
|
-
}
|
|
1614
1612
|
.editor-input-wrap .editor-input-container .editor-input-addon, .editor-input-wrap .editor-input-container .editor-input-prefix, .editor-input-wrap .editor-input-container .editor-input-suffix {
|
|
1615
1613
|
height: 100%;
|
|
1616
1614
|
position: absolute;
|
|
@@ -2619,14 +2617,40 @@ div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container
|
|
|
2619
2617
|
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap {
|
|
2620
2618
|
padding: 0px 15px;
|
|
2621
2619
|
}
|
|
2620
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap.error .editor-input-container.textarea {
|
|
2621
|
+
border: 1px solid #e82100;
|
|
2622
|
+
}
|
|
2622
2623
|
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container {
|
|
2623
2624
|
padding: 0;
|
|
2624
2625
|
}
|
|
2625
2626
|
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container .editor-input {
|
|
2626
2627
|
line-height: 1.4;
|
|
2627
|
-
|
|
2628
|
-
height: 44px;
|
|
2628
|
+
height: 100%;
|
|
2629
2629
|
white-space: nowrap;
|
|
2630
|
+
}
|
|
2631
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea {
|
|
2632
|
+
padding: 0px 10px;
|
|
2633
|
+
border: 1px solid #c7c7c7;
|
|
2634
|
+
height: 44px;
|
|
2635
|
+
}
|
|
2636
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea:hover {
|
|
2637
|
+
border-color: #0064ff;
|
|
2638
|
+
}
|
|
2639
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea.focus {
|
|
2640
|
+
border-color: #0064ff;
|
|
2641
|
+
box-shadow: 0px 0px 0px 2px rgba(51, 143, 229, 0.2);
|
|
2642
|
+
}
|
|
2643
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea .editor-input {
|
|
2644
|
+
border: none;
|
|
2645
|
+
padding: 11px 0px;
|
|
2646
|
+
width: calc(100% - 20px);
|
|
2647
|
+
}
|
|
2648
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea .editor-input:hover {
|
|
2649
|
+
border: none;
|
|
2650
|
+
}
|
|
2651
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea .editor-input:focus {
|
|
2652
|
+
border: none;
|
|
2653
|
+
box-shadow: none;
|
|
2630
2654
|
}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] > span.math-box {
|
|
2631
2655
|
display: inline-flex;
|
|
2632
2656
|
vertical-align: middle;
|
|
@@ -41014,6 +41038,11 @@ ${codeText}
|
|
|
41014
41038
|
});
|
|
41015
41039
|
__publicField(this, "handleKeyDown", (e2, composing) => {
|
|
41016
41040
|
var _a, _b;
|
|
41041
|
+
if (this.options.mode === "textarea") {
|
|
41042
|
+
if (e2.code === "Enter") {
|
|
41043
|
+
e2.preventDefault();
|
|
41044
|
+
}
|
|
41045
|
+
}
|
|
41017
41046
|
(_b = (_a = this.options).onKeyDown) == null ? void 0 : _b.call(_a, e2, composing);
|
|
41018
41047
|
});
|
|
41019
41048
|
__publicField(this, "showSuffix", () => {
|
|
@@ -41035,6 +41064,12 @@ ${codeText}
|
|
|
41035
41064
|
});
|
|
41036
41065
|
__publicField(this, "handleInput", (e2) => {
|
|
41037
41066
|
var _a, _b;
|
|
41067
|
+
if (this.options.mode === "textarea") {
|
|
41068
|
+
const input2 = e2.target;
|
|
41069
|
+
if (input2.value.includes("\n")) {
|
|
41070
|
+
input2.value = input2.value.replace(/\n/g, "");
|
|
41071
|
+
}
|
|
41072
|
+
}
|
|
41038
41073
|
(_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, e2);
|
|
41039
41074
|
removeClass(this.container, "error");
|
|
41040
41075
|
if (this.options.maxLength) {
|
|
@@ -41095,7 +41130,14 @@ ${codeText}
|
|
|
41095
41130
|
const inputContainer = createElement("div", ["editor-input-container"], container);
|
|
41096
41131
|
let input2;
|
|
41097
41132
|
if ((options == null ? void 0 : options.mode) === "textarea") {
|
|
41133
|
+
addClass(inputContainer, "textarea");
|
|
41098
41134
|
input2 = createElement("textarea", ["editor-input"], null);
|
|
41135
|
+
input2.onfocus = () => {
|
|
41136
|
+
addClass(inputContainer, "focus");
|
|
41137
|
+
};
|
|
41138
|
+
input2.onblur = () => {
|
|
41139
|
+
removeClass(inputContainer, "focus");
|
|
41140
|
+
};
|
|
41099
41141
|
} else {
|
|
41100
41142
|
input2 = createElement("input", ["editor-input"], null);
|
|
41101
41143
|
}
|
|
@@ -79760,6 +79802,9 @@ ${content}
|
|
|
79760
79802
|
return groupEachCommand(commands);
|
|
79761
79803
|
});
|
|
79762
79804
|
__publicField(this, "showToolbar", () => {
|
|
79805
|
+
if (this.editor.readonly) {
|
|
79806
|
+
return;
|
|
79807
|
+
}
|
|
79763
79808
|
tippy$1.hideAll();
|
|
79764
79809
|
const commands = this.getCommands();
|
|
79765
79810
|
this.toolbar.updateItems(commands);
|
|
@@ -86778,7 +86823,7 @@ ${data2.flowchartText}
|
|
|
86778
86823
|
}
|
|
86779
86824
|
}
|
|
86780
86825
|
});
|
|
86781
|
-
editor.version = "2.1.1-beta.
|
|
86826
|
+
editor.version = "2.1.1-beta.83";
|
|
86782
86827
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
86783
86828
|
window.setReauthFail = (fail) => {
|
|
86784
86829
|
window.isReauthError = fail;
|
|
@@ -86879,7 +86924,7 @@ ${data2.flowchartText}
|
|
|
86879
86924
|
});
|
|
86880
86925
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
86881
86926
|
OnesEditorToolbar.register(editor);
|
|
86882
|
-
editor.version = "2.1.1-beta.
|
|
86927
|
+
editor.version = "2.1.1-beta.83";
|
|
86883
86928
|
return editor;
|
|
86884
86929
|
}
|
|
86885
86930
|
async function showDocVersions(editor, options, serverUrl) {
|