diff --git a/packages/devextreme/js/__internal/ui/html_editor/converters/m_markdown.ts b/packages/devextreme/js/__internal/ui/html_editor/converters/m_markdown.ts index de1ba43347fe..f4910bee6373 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/converters/m_markdown.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/converters/m_markdown.ts @@ -1,6 +1,5 @@ import { getWindow } from '@js/core/utils/window'; import Errors from '@js/ui/widget/ui.errors'; -import TurnDown from 'turndown'; import converterController from '../m_converterController'; @@ -12,7 +11,7 @@ class MarkdownConverter { constructor() { const window = getWindow(); // @ts-expect-error - const turndown = window && window.TurndownService || TurnDown; + const turndown = window && window.TurndownService; // @ts-expect-error const showdown = window && window.showdown; diff --git a/packages/devextreme/package.json b/packages/devextreme/package.json index 2545dd92d92b..7a43a57095d5 100644 --- a/packages/devextreme/package.json +++ b/packages/devextreme/package.json @@ -36,8 +36,7 @@ "inferno": "^7.4.9", "inferno-hydrate": "^7.4.9", "jszip": "^3.10.1", - "rrule": "^2.7.1", - "turndown": "~7.1.0" + "rrule": "^2.7.1" }, "devDependencies": { "@babel/core": "7.23.9", diff --git a/packages/devextreme/testing/helpers/quillDependencies/noTurndown.js b/packages/devextreme/testing/helpers/quillDependencies/noTurndown.js deleted file mode 100644 index cf49d4ea1239..000000000000 --- a/packages/devextreme/testing/helpers/quillDependencies/noTurndown.js +++ /dev/null @@ -1 +0,0 @@ -window.TurndownService = module.exports = null; diff --git a/packages/devextreme/testing/runner/Views/Main/RunSuite.cshtml b/packages/devextreme/testing/runner/Views/Main/RunSuite.cshtml index 3df556977c62..ea0c1c1d1fd6 100644 --- a/packages/devextreme/testing/runner/Views/Main/RunSuite.cshtml +++ b/packages/devextreme/testing/runner/Views/Main/RunSuite.cshtml @@ -234,7 +234,6 @@ 'fflate': '@Url.Content("~/packages/devextreme/node_modules/fflate/esm/browser.js")', 'jspdf': '@Url.Content("~/packages/devextreme/node_modules/jspdf/dist/jspdf.umd.js")', 'jspdf-autotable': '@Url.Content("~/packages/devextreme/node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js")', - 'turndown': '@Url.Content("~/packages/devextreme/node_modules/turndown/lib/turndown.browser.umd.js")', 'rrule': '@Url.Content("~/packages/devextreme/node_modules/rrule/dist/es5/rrule.js")', // Inferno diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part2.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part2.js index 7d8c327494d0..339dd30efcf3 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part2.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part2.js @@ -1,2 +1 @@ require('../../helpers/ignoreQuillTimers.js'); -require('./htmlEditorParts/importTurnDown.tests.js'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/importTurnDown.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/importTurnDown.tests.js deleted file mode 100644 index db30da128912..000000000000 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/importTurnDown.tests.js +++ /dev/null @@ -1,35 +0,0 @@ -SystemJS.config({ - map: { - 'turndown': '/packages/devextreme/testing/helpers/quillDependencies/noTurndown.js' - } -}); - -define(function(require) { - const MarkdownConverter = require('ui/html_editor/converters/markdown'); - - QUnit.module('Import 3rd party', function() { - QUnit.test('it throw an error if the html -> markdown converter script isn\'t referenced', function(assert) { - assert.throws( - function() { new MarkdownConverter(); }, - function(e) { - return /(E1041)[\s\S]*(Turndown)/.test(e.message); - }, - 'The Turndown script isn\'t referenced' - ); - }); - - QUnit.skip('initialize turndown from window', function(assert) { - const prevWinTurndown = window.TurndownService; - - window.TurndownService = function() { - this.initialized = true; - }; - - const converter = new MarkdownConverter(); - - assert.ok(converter._html2Markdown.initialized); - - window.TurndownService = prevWinTurndown; - }); - }); -}); diff --git a/packages/devextreme/webpack.config.js b/packages/devextreme/webpack.config.js index ea09da8d6b94..d5d9e3159b71 100644 --- a/packages/devextreme/webpack.config.js +++ b/packages/devextreme/webpack.config.js @@ -25,7 +25,6 @@ module.exports = { 'globalize/date': 'window.Globalize', 'globalize/message': 'window.Globalize', 'devextreme-quill': 'window.DevExpress.Quill', - 'turndown': 'window.TurndownService', 'exceljs': 'window.ExcelJS', 'jspdf': 'window.jspdf.jsPDF', 'devexpress-diagram': 'window.DevExpress.diagram', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3cb2b7dd6d75..9facd36176aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -805,9 +805,6 @@ importers: rrule: specifier: ^2.7.1 version: 2.8.1 - turndown: - specifier: ~7.1.0 - version: 7.1.3 devDependencies: '@babel/core': specifier: 7.23.9