ponkotsu-md-editor 0.1.32 → 0.1.33
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/markdown_editor.js +5 -4
- data/lib/ponkotsu/md/editor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5308ca931db5e89ef46fcb13e678810f7ef70eb8c2ea39a477e14c7b59227c2
|
|
4
|
+
data.tar.gz: fe350b9f9fc51ab3d8966acc154e2030e90bb6b5d8eedc3217b49e8c3ab4580e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0db560c9499193088fac29e68d02efb2ac7e8817937f9bdd26002ddd92ced574f2159242d76464d9c1c206f085d7e6ddc261cd058ff9d9eb1aec02032732c87d
|
|
7
|
+
data.tar.gz: a17834cfe00ba978d18ba4381d05c4ff85cde27f4a6b172d171018aee1bc508418f3abe2b05ab0499b5935dc288ed517a4612d070f73573ddebd41738e2a480e
|
|
@@ -283,6 +283,11 @@
|
|
|
283
283
|
selectedText = textarea.value.substring(start, end);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
// fullTextの定義をここで行う
|
|
287
|
+
const fullText = isContentEditable ?
|
|
288
|
+
(textarea.innerText || textarea.textContent || '') :
|
|
289
|
+
textarea.value;
|
|
290
|
+
|
|
286
291
|
// Bold(**)の場合のみ、選択範囲の両端に余分な空白・改行があれば除外
|
|
287
292
|
if (before === '**' && after === '**' && selectedText.length > 0) {
|
|
288
293
|
let left = 0;
|
|
@@ -309,10 +314,6 @@
|
|
|
309
314
|
}
|
|
310
315
|
}
|
|
311
316
|
|
|
312
|
-
const fullText = isContentEditable ?
|
|
313
|
-
(textarea.innerText || textarea.textContent || '') :
|
|
314
|
-
textarea.value;
|
|
315
|
-
|
|
316
317
|
const beforeText = fullText.substring(0, start);
|
|
317
318
|
const afterText = fullText.substring(end);
|
|
318
319
|
const newText = before + selectedText + after;
|