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
|
@@ -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
|
|
@@ -1701,6 +1701,11 @@ var OverTypeEditor = (() => {
|
|
|
1701
1701
|
cursor: text !important;
|
|
1702
1702
|
}
|
|
1703
1703
|
|
|
1704
|
+
.overtype-container.overtype-auto-resize[data-mode="preview"] .overtype-preview {
|
|
1705
|
+
position: static !important;
|
|
1706
|
+
height: auto !important;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1704
1709
|
/* Hide syntax markers in preview mode */
|
|
1705
1710
|
.overtype-container[data-mode="preview"] .syntax-marker {
|
|
1706
1711
|
display: none !important;
|
|
@@ -5608,11 +5613,18 @@ ${blockSuffix}` : suffix;
|
|
|
5608
5613
|
const preview = this.preview;
|
|
5609
5614
|
const wrapper = this.wrapper;
|
|
5610
5615
|
const isPreviewMode = this.container.dataset.mode === "preview";
|
|
5611
|
-
|
|
5616
|
+
if (isPreviewMode) {
|
|
5617
|
+
wrapper.style.removeProperty("height");
|
|
5618
|
+
preview.style.removeProperty("height");
|
|
5619
|
+
preview.style.removeProperty("overflow-y");
|
|
5620
|
+
textarea.style.removeProperty("height");
|
|
5621
|
+
textarea.style.removeProperty("overflow-y");
|
|
5622
|
+
return;
|
|
5623
|
+
}
|
|
5624
|
+
const scrollTop = textarea.scrollTop;
|
|
5612
5625
|
wrapper.style.setProperty("height", "auto", "important");
|
|
5613
|
-
preview.style.setProperty("height", "auto", "important");
|
|
5614
5626
|
textarea.style.setProperty("height", "auto", "important");
|
|
5615
|
-
let newHeight =
|
|
5627
|
+
let newHeight = textarea.scrollHeight;
|
|
5616
5628
|
if (this.options.minHeight) {
|
|
5617
5629
|
const minHeight = parseInt(this.options.minHeight);
|
|
5618
5630
|
newHeight = Math.max(newHeight, minHeight);
|