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.esm.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
|
|
@@ -1678,6 +1678,11 @@ function generateStyles(options = {}) {
|
|
|
1678
1678
|
cursor: text !important;
|
|
1679
1679
|
}
|
|
1680
1680
|
|
|
1681
|
+
.overtype-container.overtype-auto-resize[data-mode="preview"] .overtype-preview {
|
|
1682
|
+
position: static !important;
|
|
1683
|
+
height: auto !important;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1681
1686
|
/* Hide syntax markers in preview mode */
|
|
1682
1687
|
.overtype-container[data-mode="preview"] .syntax-marker {
|
|
1683
1688
|
display: none !important;
|
|
@@ -5585,11 +5590,18 @@ var _OverType = class _OverType {
|
|
|
5585
5590
|
const preview = this.preview;
|
|
5586
5591
|
const wrapper = this.wrapper;
|
|
5587
5592
|
const isPreviewMode = this.container.dataset.mode === "preview";
|
|
5588
|
-
|
|
5593
|
+
if (isPreviewMode) {
|
|
5594
|
+
wrapper.style.removeProperty("height");
|
|
5595
|
+
preview.style.removeProperty("height");
|
|
5596
|
+
preview.style.removeProperty("overflow-y");
|
|
5597
|
+
textarea.style.removeProperty("height");
|
|
5598
|
+
textarea.style.removeProperty("overflow-y");
|
|
5599
|
+
return;
|
|
5600
|
+
}
|
|
5601
|
+
const scrollTop = textarea.scrollTop;
|
|
5589
5602
|
wrapper.style.setProperty("height", "auto", "important");
|
|
5590
|
-
preview.style.setProperty("height", "auto", "important");
|
|
5591
5603
|
textarea.style.setProperty("height", "auto", "important");
|
|
5592
|
-
let newHeight =
|
|
5604
|
+
let newHeight = textarea.scrollHeight;
|
|
5593
5605
|
if (this.options.minHeight) {
|
|
5594
5606
|
const minHeight = parseInt(this.options.minHeight);
|
|
5595
5607
|
newHeight = Math.max(newHeight, minHeight);
|