Fixed escaped chars on paste
This commit is contained in:
parent
c67f2c88b9
commit
0cf15a36c6
@ -14,6 +14,8 @@
|
|||||||
<br>
|
<br>
|
||||||
<a target="_blank" href="https://community.stackedit.io/">Community</a>
|
<a target="_blank" href="https://community.stackedit.io/">Community</a>
|
||||||
<hr>
|
<hr>
|
||||||
|
For commercial support and custom development, please <a href="mailto:stackedit.project@gmail.com">contact us</a>.
|
||||||
|
<hr>
|
||||||
<h3>FAQ</h3>
|
<h3>FAQ</h3>
|
||||||
<div class="faq" v-html="faq"></div>
|
<div class="faq" v-html="faq"></div>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -333,6 +333,7 @@ function cledit(contentElt, scrollEltOpt) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const turndownService = new TurndownService(store.getters['data/computedSettings'].turndown);
|
const turndownService = new TurndownService(store.getters['data/computedSettings'].turndown);
|
||||||
|
turndownService.escape = str => str; // Disable escaping
|
||||||
|
|
||||||
contentElt.addEventListener('paste', (evt) => {
|
contentElt.addEventListener('paste', (evt) => {
|
||||||
undoMgr.setCurrentMode('single');
|
undoMgr.setCurrentMode('single');
|
||||||
@ -343,7 +344,7 @@ function cledit(contentElt, scrollEltOpt) {
|
|||||||
data = clipboardData.getData('text/plain');
|
data = clipboardData.getData('text/plain');
|
||||||
try {
|
try {
|
||||||
const html = clipboardData.getData('text/html');
|
const html = clipboardData.getData('text/html');
|
||||||
if (html && !clipboardData.getData('text/css')) {
|
if (html) {
|
||||||
const sanitizedHtml = htmlSanitizer.sanitizeHtml(html)
|
const sanitizedHtml = htmlSanitizer.sanitizeHtml(html)
|
||||||
.replace(/ /g, ' '); // Replace non-breaking spaces with classic spaces
|
.replace(/ /g, ' '); // Replace non-breaking spaces with classic spaces
|
||||||
if (sanitizedHtml) {
|
if (sanitizedHtml) {
|
||||||
|
Loading…
Reference in New Issue
Block a user