overtype 2.0.0 → 2.0.1
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/overtype-webcomponent.esm.js +4 -2
- package/dist/overtype-webcomponent.esm.js.map +2 -2
- package/dist/overtype-webcomponent.js +4 -2
- package/dist/overtype-webcomponent.js.map +2 -2
- package/dist/overtype-webcomponent.min.js +9 -9
- package/dist/overtype.cjs +4 -2
- package/dist/overtype.cjs.map +2 -2
- package/dist/overtype.esm.js +4 -2
- package/dist/overtype.esm.js.map +2 -2
- package/dist/overtype.js +4 -2
- package/dist/overtype.js.map +2 -2
- package/dist/overtype.min.js +3 -3
- package/package.json +9 -5
- package/src/overtype.js +2 -0
- package/src/parser.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OverType v2.0.
|
|
2
|
+
* OverType v2.0.1
|
|
3
3
|
* A lightweight markdown editor library with perfect WYSIWYG alignment
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @author Demo User
|
|
@@ -128,7 +128,7 @@ var OverTypeEditor = (() => {
|
|
|
128
128
|
return html.replace(/^((?: )*)-\s+\[([ xX])\]\s+(.+)$/, (match, indent, checked, content) => {
|
|
129
129
|
if (isPreviewMode) {
|
|
130
130
|
const isChecked = checked.toLowerCase() === "x";
|
|
131
|
-
return `${indent}<li class="task-list"><input type="checkbox"
|
|
131
|
+
return `${indent}<li class="task-list"><input type="checkbox" ${isChecked ? "checked" : ""}> ${content}</li>`;
|
|
132
132
|
} else {
|
|
133
133
|
return `${indent}<li class="task-list"><span class="syntax-marker">- [${checked}] </span>${content}</li>`;
|
|
134
134
|
}
|
|
@@ -4000,6 +4000,7 @@ ${blockSuffix}` : suffix;
|
|
|
4000
4000
|
*/
|
|
4001
4001
|
showNormalEditMode() {
|
|
4002
4002
|
this.container.dataset.mode = "normal";
|
|
4003
|
+
this.updatePreview();
|
|
4003
4004
|
requestAnimationFrame(() => {
|
|
4004
4005
|
this.textarea.scrollTop = this.preview.scrollTop;
|
|
4005
4006
|
this.textarea.scrollLeft = this.preview.scrollLeft;
|
|
@@ -4027,6 +4028,7 @@ ${blockSuffix}` : suffix;
|
|
|
4027
4028
|
*/
|
|
4028
4029
|
showPreviewMode() {
|
|
4029
4030
|
this.container.dataset.mode = "preview";
|
|
4031
|
+
this.updatePreview();
|
|
4030
4032
|
return this;
|
|
4031
4033
|
}
|
|
4032
4034
|
/**
|