devextreme-quill
Advanced tools
Comparing version 1.7.1 to 1.7.2
@@ -54,2 +54,10 @@ import Delta from 'quill-delta'; | ||
) { | ||
if (event.inputType === 'insertFromDrop') { | ||
const htmlToInsert = event.dataTransfer.getData('text/html'); | ||
const containsTable = htmlToInsert.includes('<table'); | ||
if (containsTable) { | ||
// NOTE: Table drag is not supported. | ||
event.preventDefault(); | ||
} | ||
} | ||
return; | ||
@@ -56,0 +64,0 @@ } |
@@ -13,2 +13,3 @@ import Delta from 'quill-delta'; | ||
import hasWindow from '../utils/has_window'; | ||
import isVersionNotLessThan from '../utils/is_version_not_less_than'; | ||
@@ -241,3 +242,3 @@ const TokenAttributor = new ClassAttributor('code-token', 'hljs', { | ||
this.quill.update(Quill.sources.SILENT); | ||
if (range != null) { | ||
if (range != null && this.quill.hasFocus()) { | ||
this.quill.setSelection(range, Quill.sources.SILENT); | ||
@@ -261,3 +262,11 @@ } | ||
container.classList.add(CodeBlock.className); | ||
container.innerHTML = this.options.hljs.highlight(language, text).value; | ||
const highlightJsVersion = this.options.hljs.versionString; | ||
if (isVersionNotLessThan(highlightJsVersion, '10.7')) { | ||
// NOTE: https://github.com/highlightjs/highlight.js/issues/2277; | ||
container.innerHTML = this.options.hljs.highlight(text, { language }).value; | ||
} else { | ||
container.innerHTML = this.options.hljs.highlight(language, text).value; | ||
} | ||
return traverse( | ||
@@ -264,0 +273,0 @@ this.quill.scroll, |
{ | ||
"name": "devextreme-quill", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"description": "Core of the DevExtreme HtmlEditor", | ||
@@ -5,0 +5,0 @@ "author": "Developer Express Inc.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2106471
83
42348