overtype 2.3.3 → 2.3.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/README.md +1 -1
- package/dist/overtype-webcomponent.esm.js +16 -4
- package/dist/overtype-webcomponent.esm.js.map +2 -2
- package/dist/overtype-webcomponent.js +16 -4
- package/dist/overtype-webcomponent.js.map +2 -2
- package/dist/overtype-webcomponent.min.js +9 -4
- package/dist/overtype.cjs +16 -4
- package/dist/overtype.cjs.map +2 -2
- package/dist/overtype.esm.js +16 -4
- package/dist/overtype.esm.js.map +2 -2
- package/dist/overtype.js +16 -4
- package/dist/overtype.js.map +2 -2
- package/dist/overtype.min.js +10 -5
- package/package.json +1 -1
- package/src/overtype.js +20 -12
- package/src/styles.js +5 -0
package/dist/overtype.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OverType v2.3.
|
|
2
|
+
* OverType v2.3.4
|
|
3
3
|
* A lightweight markdown editor library with perfect WYSIWYG alignment
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @author David Miranda
|
|
@@ -1704,6 +1704,11 @@ var OverType = (() => {
|
|
|
1704
1704
|
cursor: text !important;
|
|
1705
1705
|
}
|
|
1706
1706
|
|
|
1707
|
+
.overtype-container.overtype-auto-resize[data-mode="preview"] .overtype-preview {
|
|
1708
|
+
position: static !important;
|
|
1709
|
+
height: auto !important;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1707
1712
|
/* Hide syntax markers in preview mode */
|
|
1708
1713
|
.overtype-container[data-mode="preview"] .syntax-marker {
|
|
1709
1714
|
display: none !important;
|
|
@@ -5611,11 +5616,18 @@ ${blockSuffix}` : suffix;
|
|
|
5611
5616
|
const preview = this.preview;
|
|
5612
5617
|
const wrapper = this.wrapper;
|
|
5613
5618
|
const isPreviewMode = this.container.dataset.mode === "preview";
|
|
5614
|
-
|
|
5619
|
+
if (isPreviewMode) {
|
|
5620
|
+
wrapper.style.removeProperty("height");
|
|
5621
|
+
preview.style.removeProperty("height");
|
|
5622
|
+
preview.style.removeProperty("overflow-y");
|
|
5623
|
+
textarea.style.removeProperty("height");
|
|
5624
|
+
textarea.style.removeProperty("overflow-y");
|
|
5625
|
+
return;
|
|
5626
|
+
}
|
|
5627
|
+
const scrollTop = textarea.scrollTop;
|
|
5615
5628
|
wrapper.style.setProperty("height", "auto", "important");
|
|
5616
|
-
preview.style.setProperty("height", "auto", "important");
|
|
5617
5629
|
textarea.style.setProperty("height", "auto", "important");
|
|
5618
|
-
let newHeight =
|
|
5630
|
+
let newHeight = textarea.scrollHeight;
|
|
5619
5631
|
if (this.options.minHeight) {
|
|
5620
5632
|
const minHeight = parseInt(this.options.minHeight);
|
|
5621
5633
|
newHeight = Math.max(newHeight, minHeight);
|