@akinon/ui-editor 1.0.0
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/cjs/__tests__/index.test.d.ts +2 -0
- package/dist/cjs/__tests__/index.test.d.ts.map +1 -0
- package/dist/cjs/__tests__/index.test.js +38 -0
- package/dist/cjs/__tests__/index.test.tsx +51 -0
- package/dist/cjs/i18n/index.d.ts +3 -0
- package/dist/cjs/i18n/index.d.ts.map +1 -0
- package/dist/cjs/i18n/index.js +11 -0
- package/dist/cjs/i18n/translations/en.d.ts +86 -0
- package/dist/cjs/i18n/translations/en.d.ts.map +1 -0
- package/dist/cjs/i18n/translations/en.js +85 -0
- package/dist/cjs/i18n/translations/tr.d.ts +86 -0
- package/dist/cjs/i18n/translations/tr.d.ts.map +1 -0
- package/dist/cjs/i18n/translations/tr.js +85 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/tiptap/assets/__tests__/icons.test.d.ts +2 -0
- package/dist/cjs/tiptap/assets/__tests__/icons.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/assets/__tests__/icons.test.js +25 -0
- package/dist/cjs/tiptap/assets/__tests__/icons.test.tsx +29 -0
- package/dist/cjs/tiptap/assets/icons.d.ts +3 -0
- package/dist/cjs/tiptap/assets/icons.d.ts.map +1 -0
- package/dist/cjs/tiptap/assets/icons.js +3 -0
- package/dist/cjs/tiptap/components/__tests__/format-bubble-menu.test.d.ts +6 -0
- package/dist/cjs/tiptap/components/__tests__/format-bubble-menu.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/__tests__/format-bubble-menu.test.js +311 -0
- package/dist/cjs/tiptap/components/__tests__/format-bubble-menu.test.tsx +452 -0
- package/dist/cjs/tiptap/components/__tests__/html-code-viewer.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/__tests__/html-code-viewer.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/__tests__/html-code-viewer.test.js +89 -0
- package/dist/cjs/tiptap/components/__tests__/html-code-viewer.test.tsx +126 -0
- package/dist/cjs/tiptap/components/__tests__/image-upload-placeholder.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/__tests__/image-upload-placeholder.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/__tests__/image-upload-placeholder.test.js +206 -0
- package/dist/cjs/tiptap/components/__tests__/image-upload-placeholder.test.tsx +297 -0
- package/dist/cjs/tiptap/components/__tests__/secure-script-component.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/__tests__/secure-script-component.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/__tests__/secure-script-component.test.js +57 -0
- package/dist/cjs/tiptap/components/__tests__/secure-script-component.test.tsx +89 -0
- package/dist/cjs/tiptap/components/__tests__/table-bubble-menu.test.d.ts +6 -0
- package/dist/cjs/tiptap/components/__tests__/table-bubble-menu.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/__tests__/table-bubble-menu.test.js +284 -0
- package/dist/cjs/tiptap/components/__tests__/table-bubble-menu.test.tsx +466 -0
- package/dist/cjs/tiptap/components/__tests__/table-popover.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/__tests__/table-popover.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/__tests__/table-popover.test.js +101 -0
- package/dist/cjs/tiptap/components/__tests__/table-popover.test.tsx +157 -0
- package/dist/cjs/tiptap/components/__tests__/tiptap.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/__tests__/tiptap.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/__tests__/tiptap.test.js +275 -0
- package/dist/cjs/tiptap/components/__tests__/tiptap.test.tsx +378 -0
- package/dist/cjs/tiptap/components/format-bubble-menu.d.ts +8 -0
- package/dist/cjs/tiptap/components/format-bubble-menu.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/format-bubble-menu.js +202 -0
- package/dist/cjs/tiptap/components/html-code-viewer.d.ts +10 -0
- package/dist/cjs/tiptap/components/html-code-viewer.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/html-code-viewer.js +96 -0
- package/dist/cjs/tiptap/components/image-upload-placeholder.d.ts +4 -0
- package/dist/cjs/tiptap/components/image-upload-placeholder.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/image-upload-placeholder.js +94 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/action-toolbar.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/action-toolbar.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/action-toolbar.test.js +78 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/action-toolbar.test.tsx +212 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/alignment-toolbar.test.d.ts +3 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/alignment-toolbar.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/alignment-toolbar.test.js +201 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/alignment-toolbar.test.tsx +411 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/heading-selector.test.d.ts +4 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/heading-selector.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/heading-selector.test.js +242 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/heading-selector.test.tsx +569 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/index.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/index.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/index.test.js +236 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/index.test.tsx +325 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/link-popover.test.d.ts +3 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/link-popover.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/link-popover.test.js +332 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/link-popover.test.tsx +648 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/list-and-block-toolbar.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/list-and-block-toolbar.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/list-and-block-toolbar.test.js +196 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/list-and-block-toolbar.test.tsx +414 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/media-toolbar.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/media-toolbar.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/media-toolbar.test.js +74 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/media-toolbar.test.tsx +206 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/text-formatting-toolbar.test.d.ts +2 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/text-formatting-toolbar.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/text-formatting-toolbar.test.js +265 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/text-formatting-toolbar.test.tsx +575 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/youtube-popover.test.d.ts +3 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/youtube-popover.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/youtube-popover.test.js +277 -0
- package/dist/cjs/tiptap/components/menu-bar/__tests__/youtube-popover.test.tsx +538 -0
- package/dist/cjs/tiptap/components/menu-bar/action-toolbar.d.ts +15 -0
- package/dist/cjs/tiptap/components/menu-bar/action-toolbar.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/action-toolbar.js +40 -0
- package/dist/cjs/tiptap/components/menu-bar/alignment-toolbar.d.ts +12 -0
- package/dist/cjs/tiptap/components/menu-bar/alignment-toolbar.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/alignment-toolbar.js +39 -0
- package/dist/cjs/tiptap/components/menu-bar/heading-selector.d.ts +16 -0
- package/dist/cjs/tiptap/components/menu-bar/heading-selector.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/heading-selector.js +70 -0
- package/dist/cjs/tiptap/components/menu-bar/index.d.ts +18 -0
- package/dist/cjs/tiptap/components/menu-bar/index.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/index.js +131 -0
- package/dist/cjs/tiptap/components/menu-bar/link-popover.d.ts +12 -0
- package/dist/cjs/tiptap/components/menu-bar/link-popover.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/link-popover.js +108 -0
- package/dist/cjs/tiptap/components/menu-bar/list-and-block-toolbar.d.ts +18 -0
- package/dist/cjs/tiptap/components/menu-bar/list-and-block-toolbar.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/list-and-block-toolbar.js +69 -0
- package/dist/cjs/tiptap/components/menu-bar/media-toolbar.d.ts +13 -0
- package/dist/cjs/tiptap/components/menu-bar/media-toolbar.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/media-toolbar.js +15 -0
- package/dist/cjs/tiptap/components/menu-bar/text-formatting-toolbar.d.ts +18 -0
- package/dist/cjs/tiptap/components/menu-bar/text-formatting-toolbar.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/text-formatting-toolbar.js +87 -0
- package/dist/cjs/tiptap/components/menu-bar/youtube-popover.d.ts +12 -0
- package/dist/cjs/tiptap/components/menu-bar/youtube-popover.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/menu-bar/youtube-popover.js +70 -0
- package/dist/cjs/tiptap/components/secure-script-component.d.ts +3 -0
- package/dist/cjs/tiptap/components/secure-script-component.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/secure-script-component.js +61 -0
- package/dist/cjs/tiptap/components/table-bubble-menu.d.ts +9 -0
- package/dist/cjs/tiptap/components/table-bubble-menu.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/table-bubble-menu.js +274 -0
- package/dist/cjs/tiptap/components/table-popover.d.ts +10 -0
- package/dist/cjs/tiptap/components/table-popover.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/table-popover.js +86 -0
- package/dist/cjs/tiptap/components/tiptap.d.ts +4 -0
- package/dist/cjs/tiptap/components/tiptap.d.ts.map +1 -0
- package/dist/cjs/tiptap/components/tiptap.js +311 -0
- package/dist/cjs/tiptap/constants/__tests__/table-defaults.test.d.ts +2 -0
- package/dist/cjs/tiptap/constants/__tests__/table-defaults.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/constants/__tests__/table-defaults.test.js +56 -0
- package/dist/cjs/tiptap/constants/__tests__/table-defaults.test.ts +69 -0
- package/dist/cjs/tiptap/constants/editor-config.d.ts +89 -0
- package/dist/cjs/tiptap/constants/editor-config.d.ts.map +1 -0
- package/dist/cjs/tiptap/constants/editor-config.js +103 -0
- package/dist/cjs/tiptap/constants/html-elements.d.ts +95 -0
- package/dist/cjs/tiptap/constants/html-elements.d.ts.map +1 -0
- package/dist/cjs/tiptap/constants/html-elements.js +158 -0
- package/dist/cjs/tiptap/constants/index.d.ts +4 -0
- package/dist/cjs/tiptap/constants/index.d.ts.map +1 -0
- package/dist/cjs/tiptap/constants/index.js +3 -0
- package/dist/cjs/tiptap/constants/table-defaults.d.ts +14 -0
- package/dist/cjs/tiptap/constants/table-defaults.d.ts.map +1 -0
- package/dist/cjs/tiptap/constants/table-defaults.js +18 -0
- package/dist/cjs/tiptap/extensions/__tests__/comment-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/comment-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/comment-extension.test.js +75 -0
- package/dist/cjs/tiptap/extensions/__tests__/comment-extension.test.ts +84 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-cell-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-cell-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-cell-extension.test.js +116 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-cell-extension.test.ts +147 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-cell-extension.test.tsx +90 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-header-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-header-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-header-extension.test.js +183 -0
- package/dist/cjs/tiptap/extensions/__tests__/custom-table-header-extension.test.ts +213 -0
- package/dist/cjs/tiptap/extensions/__tests__/html-block-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/html-block-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/html-block-extension.test.js +103 -0
- package/dist/cjs/tiptap/extensions/__tests__/html-block-extension.test.ts +117 -0
- package/dist/cjs/tiptap/extensions/__tests__/html-inline-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/html-inline-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/html-inline-extension.test.js +105 -0
- package/dist/cjs/tiptap/extensions/__tests__/html-inline-extension.test.ts +119 -0
- package/dist/cjs/tiptap/extensions/__tests__/iframe-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/iframe-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/iframe-extension.test.js +262 -0
- package/dist/cjs/tiptap/extensions/__tests__/iframe-extension.test.ts +297 -0
- package/dist/cjs/tiptap/extensions/__tests__/image-upload-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/image-upload-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/image-upload-extension.test.js +52 -0
- package/dist/cjs/tiptap/extensions/__tests__/image-upload-extension.test.tsx +65 -0
- package/dist/cjs/tiptap/extensions/__tests__/index.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/index.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/index.test.js +24 -0
- package/dist/cjs/tiptap/extensions/__tests__/index.test.ts +26 -0
- package/dist/cjs/tiptap/extensions/__tests__/reset-marks-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/reset-marks-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/reset-marks-extension.test.js +53 -0
- package/dist/cjs/tiptap/extensions/__tests__/reset-marks-extension.test.ts +74 -0
- package/dist/cjs/tiptap/extensions/__tests__/secure-script-extension.test.d.ts +2 -0
- package/dist/cjs/tiptap/extensions/__tests__/secure-script-extension.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/__tests__/secure-script-extension.test.js +27 -0
- package/dist/cjs/tiptap/extensions/__tests__/secure-script-extension.test.tsx +32 -0
- package/dist/cjs/tiptap/extensions/comment-extension.d.ts +13 -0
- package/dist/cjs/tiptap/extensions/comment-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/comment-extension.js +47 -0
- package/dist/cjs/tiptap/extensions/custom-table-cell-extension.d.ts +10 -0
- package/dist/cjs/tiptap/extensions/custom-table-cell-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/custom-table-cell-extension.js +64 -0
- package/dist/cjs/tiptap/extensions/custom-table-header-extension.d.ts +10 -0
- package/dist/cjs/tiptap/extensions/custom-table-header-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/custom-table-header-extension.js +63 -0
- package/dist/cjs/tiptap/extensions/html-block-extension.d.ts +6 -0
- package/dist/cjs/tiptap/extensions/html-block-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/html-block-extension.js +90 -0
- package/dist/cjs/tiptap/extensions/html-inline-extension.d.ts +6 -0
- package/dist/cjs/tiptap/extensions/html-inline-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/html-inline-extension.js +87 -0
- package/dist/cjs/tiptap/extensions/iframe-extension.d.ts +18 -0
- package/dist/cjs/tiptap/extensions/iframe-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/iframe-extension.js +170 -0
- package/dist/cjs/tiptap/extensions/image-upload-extension.d.ts +3 -0
- package/dist/cjs/tiptap/extensions/image-upload-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/image-upload-extension.js +29 -0
- package/dist/cjs/tiptap/extensions/index.d.ts +10 -0
- package/dist/cjs/tiptap/extensions/index.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/index.js +9 -0
- package/dist/cjs/tiptap/extensions/reset-marks-extension.d.ts +3 -0
- package/dist/cjs/tiptap/extensions/reset-marks-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/reset-marks-extension.js +17 -0
- package/dist/cjs/tiptap/extensions/secure-script-extension.d.ts +3 -0
- package/dist/cjs/tiptap/extensions/secure-script-extension.d.ts.map +1 -0
- package/dist/cjs/tiptap/extensions/secure-script-extension.js +55 -0
- package/dist/cjs/tiptap/types/index.d.ts +232 -0
- package/dist/cjs/tiptap/types/index.d.ts.map +1 -0
- package/dist/cjs/tiptap/types/index.js +1 -0
- package/dist/cjs/tiptap/utils/__tests__/format-html.test.d.ts +2 -0
- package/dist/cjs/tiptap/utils/__tests__/format-html.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/__tests__/format-html.test.js +68 -0
- package/dist/cjs/tiptap/utils/__tests__/format-html.test.ts +91 -0
- package/dist/cjs/tiptap/utils/__tests__/highlight-html.test.d.ts +2 -0
- package/dist/cjs/tiptap/utils/__tests__/highlight-html.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/__tests__/highlight-html.test.js +71 -0
- package/dist/cjs/tiptap/utils/__tests__/highlight-html.test.ts +100 -0
- package/dist/cjs/tiptap/utils/__tests__/index.test.d.ts +2 -0
- package/dist/cjs/tiptap/utils/__tests__/index.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/__tests__/index.test.js +13 -0
- package/dist/cjs/tiptap/utils/__tests__/index.test.ts +15 -0
- package/dist/cjs/tiptap/utils/__tests__/normalize-html.test.d.ts +2 -0
- package/dist/cjs/tiptap/utils/__tests__/normalize-html.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/__tests__/normalize-html.test.js +53 -0
- package/dist/cjs/tiptap/utils/__tests__/normalize-html.test.ts +77 -0
- package/dist/cjs/tiptap/utils/__tests__/tiptap-extensions.test.d.ts +2 -0
- package/dist/cjs/tiptap/utils/__tests__/tiptap-extensions.test.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/__tests__/tiptap-extensions.test.js +209 -0
- package/dist/cjs/tiptap/utils/__tests__/tiptap-extensions.test.ts +299 -0
- package/dist/cjs/tiptap/utils/format-html.d.ts +6 -0
- package/dist/cjs/tiptap/utils/format-html.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/format-html.js +108 -0
- package/dist/cjs/tiptap/utils/highlight-html.d.ts +6 -0
- package/dist/cjs/tiptap/utils/highlight-html.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/highlight-html.js +82 -0
- package/dist/cjs/tiptap/utils/index.d.ts +5 -0
- package/dist/cjs/tiptap/utils/index.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/index.js +4 -0
- package/dist/cjs/tiptap/utils/normalize-html.d.ts +7 -0
- package/dist/cjs/tiptap/utils/normalize-html.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/normalize-html.js +109 -0
- package/dist/cjs/tiptap/utils/tiptap-extensions.d.ts +21 -0
- package/dist/cjs/tiptap/utils/tiptap-extensions.d.ts.map +1 -0
- package/dist/cjs/tiptap/utils/tiptap-extensions.js +198 -0
- package/dist/esm/__tests__/index.test.d.ts +2 -0
- package/dist/esm/__tests__/index.test.d.ts.map +1 -0
- package/dist/esm/__tests__/index.test.js +38 -0
- package/dist/esm/__tests__/index.test.tsx +51 -0
- package/dist/esm/i18n/index.d.ts +3 -0
- package/dist/esm/i18n/index.d.ts.map +1 -0
- package/dist/esm/i18n/index.js +11 -0
- package/dist/esm/i18n/translations/en.d.ts +86 -0
- package/dist/esm/i18n/translations/en.d.ts.map +1 -0
- package/dist/esm/i18n/translations/en.js +85 -0
- package/dist/esm/i18n/translations/tr.d.ts +86 -0
- package/dist/esm/i18n/translations/tr.d.ts.map +1 -0
- package/dist/esm/i18n/translations/tr.js +85 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/tiptap/assets/__tests__/icons.test.d.ts +2 -0
- package/dist/esm/tiptap/assets/__tests__/icons.test.d.ts.map +1 -0
- package/dist/esm/tiptap/assets/__tests__/icons.test.js +25 -0
- package/dist/esm/tiptap/assets/__tests__/icons.test.tsx +29 -0
- package/dist/esm/tiptap/assets/icons.d.ts +3 -0
- package/dist/esm/tiptap/assets/icons.d.ts.map +1 -0
- package/dist/esm/tiptap/assets/icons.js +3 -0
- package/dist/esm/tiptap/components/__tests__/format-bubble-menu.test.d.ts +6 -0
- package/dist/esm/tiptap/components/__tests__/format-bubble-menu.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/__tests__/format-bubble-menu.test.js +311 -0
- package/dist/esm/tiptap/components/__tests__/format-bubble-menu.test.tsx +452 -0
- package/dist/esm/tiptap/components/__tests__/html-code-viewer.test.d.ts +2 -0
- package/dist/esm/tiptap/components/__tests__/html-code-viewer.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/__tests__/html-code-viewer.test.js +89 -0
- package/dist/esm/tiptap/components/__tests__/html-code-viewer.test.tsx +126 -0
- package/dist/esm/tiptap/components/__tests__/image-upload-placeholder.test.d.ts +2 -0
- package/dist/esm/tiptap/components/__tests__/image-upload-placeholder.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/__tests__/image-upload-placeholder.test.js +206 -0
- package/dist/esm/tiptap/components/__tests__/image-upload-placeholder.test.tsx +297 -0
- package/dist/esm/tiptap/components/__tests__/secure-script-component.test.d.ts +2 -0
- package/dist/esm/tiptap/components/__tests__/secure-script-component.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/__tests__/secure-script-component.test.js +57 -0
- package/dist/esm/tiptap/components/__tests__/secure-script-component.test.tsx +89 -0
- package/dist/esm/tiptap/components/__tests__/table-bubble-menu.test.d.ts +6 -0
- package/dist/esm/tiptap/components/__tests__/table-bubble-menu.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/__tests__/table-bubble-menu.test.js +284 -0
- package/dist/esm/tiptap/components/__tests__/table-bubble-menu.test.tsx +466 -0
- package/dist/esm/tiptap/components/__tests__/table-popover.test.d.ts +2 -0
- package/dist/esm/tiptap/components/__tests__/table-popover.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/__tests__/table-popover.test.js +101 -0
- package/dist/esm/tiptap/components/__tests__/table-popover.test.tsx +157 -0
- package/dist/esm/tiptap/components/__tests__/tiptap.test.d.ts +2 -0
- package/dist/esm/tiptap/components/__tests__/tiptap.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/__tests__/tiptap.test.js +275 -0
- package/dist/esm/tiptap/components/__tests__/tiptap.test.tsx +378 -0
- package/dist/esm/tiptap/components/format-bubble-menu.d.ts +8 -0
- package/dist/esm/tiptap/components/format-bubble-menu.d.ts.map +1 -0
- package/dist/esm/tiptap/components/format-bubble-menu.js +202 -0
- package/dist/esm/tiptap/components/html-code-viewer.d.ts +10 -0
- package/dist/esm/tiptap/components/html-code-viewer.d.ts.map +1 -0
- package/dist/esm/tiptap/components/html-code-viewer.js +96 -0
- package/dist/esm/tiptap/components/image-upload-placeholder.d.ts +4 -0
- package/dist/esm/tiptap/components/image-upload-placeholder.d.ts.map +1 -0
- package/dist/esm/tiptap/components/image-upload-placeholder.js +94 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/action-toolbar.test.d.ts +2 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/action-toolbar.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/action-toolbar.test.js +78 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/action-toolbar.test.tsx +212 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/alignment-toolbar.test.d.ts +3 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/alignment-toolbar.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/alignment-toolbar.test.js +201 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/alignment-toolbar.test.tsx +411 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/heading-selector.test.d.ts +4 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/heading-selector.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/heading-selector.test.js +242 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/heading-selector.test.tsx +569 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/index.test.d.ts +2 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/index.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/index.test.js +236 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/index.test.tsx +325 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/link-popover.test.d.ts +3 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/link-popover.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/link-popover.test.js +332 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/link-popover.test.tsx +648 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/list-and-block-toolbar.test.d.ts +2 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/list-and-block-toolbar.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/list-and-block-toolbar.test.js +196 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/list-and-block-toolbar.test.tsx +414 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/media-toolbar.test.d.ts +2 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/media-toolbar.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/media-toolbar.test.js +74 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/media-toolbar.test.tsx +206 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/text-formatting-toolbar.test.d.ts +2 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/text-formatting-toolbar.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/text-formatting-toolbar.test.js +265 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/text-formatting-toolbar.test.tsx +575 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/youtube-popover.test.d.ts +3 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/youtube-popover.test.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/youtube-popover.test.js +277 -0
- package/dist/esm/tiptap/components/menu-bar/__tests__/youtube-popover.test.tsx +538 -0
- package/dist/esm/tiptap/components/menu-bar/action-toolbar.d.ts +15 -0
- package/dist/esm/tiptap/components/menu-bar/action-toolbar.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/action-toolbar.js +40 -0
- package/dist/esm/tiptap/components/menu-bar/alignment-toolbar.d.ts +12 -0
- package/dist/esm/tiptap/components/menu-bar/alignment-toolbar.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/alignment-toolbar.js +39 -0
- package/dist/esm/tiptap/components/menu-bar/heading-selector.d.ts +16 -0
- package/dist/esm/tiptap/components/menu-bar/heading-selector.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/heading-selector.js +70 -0
- package/dist/esm/tiptap/components/menu-bar/index.d.ts +18 -0
- package/dist/esm/tiptap/components/menu-bar/index.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/index.js +131 -0
- package/dist/esm/tiptap/components/menu-bar/link-popover.d.ts +12 -0
- package/dist/esm/tiptap/components/menu-bar/link-popover.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/link-popover.js +108 -0
- package/dist/esm/tiptap/components/menu-bar/list-and-block-toolbar.d.ts +18 -0
- package/dist/esm/tiptap/components/menu-bar/list-and-block-toolbar.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/list-and-block-toolbar.js +69 -0
- package/dist/esm/tiptap/components/menu-bar/media-toolbar.d.ts +13 -0
- package/dist/esm/tiptap/components/menu-bar/media-toolbar.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/media-toolbar.js +15 -0
- package/dist/esm/tiptap/components/menu-bar/text-formatting-toolbar.d.ts +18 -0
- package/dist/esm/tiptap/components/menu-bar/text-formatting-toolbar.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/text-formatting-toolbar.js +87 -0
- package/dist/esm/tiptap/components/menu-bar/youtube-popover.d.ts +12 -0
- package/dist/esm/tiptap/components/menu-bar/youtube-popover.d.ts.map +1 -0
- package/dist/esm/tiptap/components/menu-bar/youtube-popover.js +70 -0
- package/dist/esm/tiptap/components/secure-script-component.d.ts +3 -0
- package/dist/esm/tiptap/components/secure-script-component.d.ts.map +1 -0
- package/dist/esm/tiptap/components/secure-script-component.js +61 -0
- package/dist/esm/tiptap/components/table-bubble-menu.d.ts +9 -0
- package/dist/esm/tiptap/components/table-bubble-menu.d.ts.map +1 -0
- package/dist/esm/tiptap/components/table-bubble-menu.js +274 -0
- package/dist/esm/tiptap/components/table-popover.d.ts +10 -0
- package/dist/esm/tiptap/components/table-popover.d.ts.map +1 -0
- package/dist/esm/tiptap/components/table-popover.js +86 -0
- package/dist/esm/tiptap/components/tiptap.d.ts +4 -0
- package/dist/esm/tiptap/components/tiptap.d.ts.map +1 -0
- package/dist/esm/tiptap/components/tiptap.js +311 -0
- package/dist/esm/tiptap/constants/__tests__/table-defaults.test.d.ts +2 -0
- package/dist/esm/tiptap/constants/__tests__/table-defaults.test.d.ts.map +1 -0
- package/dist/esm/tiptap/constants/__tests__/table-defaults.test.js +56 -0
- package/dist/esm/tiptap/constants/__tests__/table-defaults.test.ts +69 -0
- package/dist/esm/tiptap/constants/editor-config.d.ts +89 -0
- package/dist/esm/tiptap/constants/editor-config.d.ts.map +1 -0
- package/dist/esm/tiptap/constants/editor-config.js +103 -0
- package/dist/esm/tiptap/constants/html-elements.d.ts +95 -0
- package/dist/esm/tiptap/constants/html-elements.d.ts.map +1 -0
- package/dist/esm/tiptap/constants/html-elements.js +158 -0
- package/dist/esm/tiptap/constants/index.d.ts +4 -0
- package/dist/esm/tiptap/constants/index.d.ts.map +1 -0
- package/dist/esm/tiptap/constants/index.js +3 -0
- package/dist/esm/tiptap/constants/table-defaults.d.ts +14 -0
- package/dist/esm/tiptap/constants/table-defaults.d.ts.map +1 -0
- package/dist/esm/tiptap/constants/table-defaults.js +18 -0
- package/dist/esm/tiptap/extensions/__tests__/comment-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/comment-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/comment-extension.test.js +75 -0
- package/dist/esm/tiptap/extensions/__tests__/comment-extension.test.ts +84 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-cell-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-cell-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-cell-extension.test.js +116 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-cell-extension.test.ts +147 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-cell-extension.test.tsx +90 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-header-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-header-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-header-extension.test.js +183 -0
- package/dist/esm/tiptap/extensions/__tests__/custom-table-header-extension.test.ts +213 -0
- package/dist/esm/tiptap/extensions/__tests__/html-block-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/html-block-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/html-block-extension.test.js +103 -0
- package/dist/esm/tiptap/extensions/__tests__/html-block-extension.test.ts +117 -0
- package/dist/esm/tiptap/extensions/__tests__/html-inline-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/html-inline-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/html-inline-extension.test.js +105 -0
- package/dist/esm/tiptap/extensions/__tests__/html-inline-extension.test.ts +119 -0
- package/dist/esm/tiptap/extensions/__tests__/iframe-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/iframe-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/iframe-extension.test.js +262 -0
- package/dist/esm/tiptap/extensions/__tests__/iframe-extension.test.ts +297 -0
- package/dist/esm/tiptap/extensions/__tests__/image-upload-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/image-upload-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/image-upload-extension.test.js +52 -0
- package/dist/esm/tiptap/extensions/__tests__/image-upload-extension.test.tsx +65 -0
- package/dist/esm/tiptap/extensions/__tests__/index.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/index.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/index.test.js +24 -0
- package/dist/esm/tiptap/extensions/__tests__/index.test.ts +26 -0
- package/dist/esm/tiptap/extensions/__tests__/reset-marks-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/reset-marks-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/reset-marks-extension.test.js +53 -0
- package/dist/esm/tiptap/extensions/__tests__/reset-marks-extension.test.ts +74 -0
- package/dist/esm/tiptap/extensions/__tests__/secure-script-extension.test.d.ts +2 -0
- package/dist/esm/tiptap/extensions/__tests__/secure-script-extension.test.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/__tests__/secure-script-extension.test.js +27 -0
- package/dist/esm/tiptap/extensions/__tests__/secure-script-extension.test.tsx +32 -0
- package/dist/esm/tiptap/extensions/comment-extension.d.ts +13 -0
- package/dist/esm/tiptap/extensions/comment-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/comment-extension.js +47 -0
- package/dist/esm/tiptap/extensions/custom-table-cell-extension.d.ts +10 -0
- package/dist/esm/tiptap/extensions/custom-table-cell-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/custom-table-cell-extension.js +64 -0
- package/dist/esm/tiptap/extensions/custom-table-header-extension.d.ts +10 -0
- package/dist/esm/tiptap/extensions/custom-table-header-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/custom-table-header-extension.js +63 -0
- package/dist/esm/tiptap/extensions/html-block-extension.d.ts +6 -0
- package/dist/esm/tiptap/extensions/html-block-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/html-block-extension.js +90 -0
- package/dist/esm/tiptap/extensions/html-inline-extension.d.ts +6 -0
- package/dist/esm/tiptap/extensions/html-inline-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/html-inline-extension.js +87 -0
- package/dist/esm/tiptap/extensions/iframe-extension.d.ts +18 -0
- package/dist/esm/tiptap/extensions/iframe-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/iframe-extension.js +170 -0
- package/dist/esm/tiptap/extensions/image-upload-extension.d.ts +3 -0
- package/dist/esm/tiptap/extensions/image-upload-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/image-upload-extension.js +29 -0
- package/dist/esm/tiptap/extensions/index.d.ts +10 -0
- package/dist/esm/tiptap/extensions/index.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/index.js +9 -0
- package/dist/esm/tiptap/extensions/reset-marks-extension.d.ts +3 -0
- package/dist/esm/tiptap/extensions/reset-marks-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/reset-marks-extension.js +17 -0
- package/dist/esm/tiptap/extensions/secure-script-extension.d.ts +3 -0
- package/dist/esm/tiptap/extensions/secure-script-extension.d.ts.map +1 -0
- package/dist/esm/tiptap/extensions/secure-script-extension.js +55 -0
- package/dist/esm/tiptap/types/index.d.ts +232 -0
- package/dist/esm/tiptap/types/index.d.ts.map +1 -0
- package/dist/esm/tiptap/types/index.js +1 -0
- package/dist/esm/tiptap/utils/__tests__/format-html.test.d.ts +2 -0
- package/dist/esm/tiptap/utils/__tests__/format-html.test.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/__tests__/format-html.test.js +68 -0
- package/dist/esm/tiptap/utils/__tests__/format-html.test.ts +91 -0
- package/dist/esm/tiptap/utils/__tests__/highlight-html.test.d.ts +2 -0
- package/dist/esm/tiptap/utils/__tests__/highlight-html.test.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/__tests__/highlight-html.test.js +71 -0
- package/dist/esm/tiptap/utils/__tests__/highlight-html.test.ts +100 -0
- package/dist/esm/tiptap/utils/__tests__/index.test.d.ts +2 -0
- package/dist/esm/tiptap/utils/__tests__/index.test.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/__tests__/index.test.js +13 -0
- package/dist/esm/tiptap/utils/__tests__/index.test.ts +15 -0
- package/dist/esm/tiptap/utils/__tests__/normalize-html.test.d.ts +2 -0
- package/dist/esm/tiptap/utils/__tests__/normalize-html.test.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/__tests__/normalize-html.test.js +53 -0
- package/dist/esm/tiptap/utils/__tests__/normalize-html.test.ts +77 -0
- package/dist/esm/tiptap/utils/__tests__/tiptap-extensions.test.d.ts +2 -0
- package/dist/esm/tiptap/utils/__tests__/tiptap-extensions.test.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/__tests__/tiptap-extensions.test.js +209 -0
- package/dist/esm/tiptap/utils/__tests__/tiptap-extensions.test.ts +299 -0
- package/dist/esm/tiptap/utils/format-html.d.ts +6 -0
- package/dist/esm/tiptap/utils/format-html.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/format-html.js +108 -0
- package/dist/esm/tiptap/utils/highlight-html.d.ts +6 -0
- package/dist/esm/tiptap/utils/highlight-html.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/highlight-html.js +82 -0
- package/dist/esm/tiptap/utils/index.d.ts +5 -0
- package/dist/esm/tiptap/utils/index.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/index.js +4 -0
- package/dist/esm/tiptap/utils/normalize-html.d.ts +7 -0
- package/dist/esm/tiptap/utils/normalize-html.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/normalize-html.js +109 -0
- package/dist/esm/tiptap/utils/tiptap-extensions.d.ts +21 -0
- package/dist/esm/tiptap/utils/tiptap-extensions.d.ts.map +1 -0
- package/dist/esm/tiptap/utils/tiptap-extensions.js +198 -0
- package/package.json +99 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import Document from '@tiptap/extension-document';
|
|
3
|
+
import Paragraph from '@tiptap/extension-paragraph';
|
|
4
|
+
import Text from '@tiptap/extension-text';
|
|
5
|
+
import { describe, expect, it } from 'vitest';
|
|
6
|
+
import { HtmlBlockExtension } from '../html-block-extension';
|
|
7
|
+
describe('HtmlBlockExtension', () => {
|
|
8
|
+
it('should parse div tag', () => {
|
|
9
|
+
var _a;
|
|
10
|
+
const editor = new Editor({
|
|
11
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
12
|
+
content: '<div class="test-class"><p>content</p></div>'
|
|
13
|
+
});
|
|
14
|
+
const json = editor.getJSON();
|
|
15
|
+
const node = (_a = json.content) === null || _a === void 0 ? void 0 : _a[0];
|
|
16
|
+
expect(node === null || node === void 0 ? void 0 : node.type).toBe('htmlBlock');
|
|
17
|
+
expect(node === null || node === void 0 ? void 0 : node.attrs).toMatchObject({
|
|
18
|
+
tagName: 'div',
|
|
19
|
+
class: 'test-class'
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
it('should parse section tag', () => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const editor = new Editor({
|
|
25
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
26
|
+
content: '<section><p>content</p></section>'
|
|
27
|
+
});
|
|
28
|
+
const json = editor.getJSON();
|
|
29
|
+
const node = (_a = json.content) === null || _a === void 0 ? void 0 : _a[0];
|
|
30
|
+
expect((_b = node === null || node === void 0 ? void 0 : node.attrs) === null || _b === void 0 ? void 0 : _b.tagName).toBe('section');
|
|
31
|
+
});
|
|
32
|
+
it('should render correct tag', () => {
|
|
33
|
+
const editor = new Editor({
|
|
34
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
35
|
+
content: {
|
|
36
|
+
type: 'doc',
|
|
37
|
+
content: [
|
|
38
|
+
{
|
|
39
|
+
type: 'htmlBlock',
|
|
40
|
+
attrs: {
|
|
41
|
+
tagName: 'article',
|
|
42
|
+
id: 'my-article'
|
|
43
|
+
},
|
|
44
|
+
content: [
|
|
45
|
+
{
|
|
46
|
+
type: 'paragraph',
|
|
47
|
+
content: [{ type: 'text', text: 'content' }]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const html = editor.getHTML();
|
|
55
|
+
expect(html).toContain('<article id="my-article">');
|
|
56
|
+
expect(html).toContain('</article>');
|
|
57
|
+
});
|
|
58
|
+
it('should fallback to div if tagName is null', () => {
|
|
59
|
+
const editor = new Editor({
|
|
60
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
61
|
+
content: {
|
|
62
|
+
type: 'doc',
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: 'htmlBlock',
|
|
66
|
+
attrs: {
|
|
67
|
+
tagName: null
|
|
68
|
+
},
|
|
69
|
+
content: [
|
|
70
|
+
{
|
|
71
|
+
type: 'paragraph',
|
|
72
|
+
content: [{ type: 'text', text: 'content' }]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const html = editor.getHTML();
|
|
80
|
+
expect(html).toContain('<div>');
|
|
81
|
+
});
|
|
82
|
+
it('should fallback to div if no tagName provided', () => {
|
|
83
|
+
const editor = new Editor({
|
|
84
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
85
|
+
content: {
|
|
86
|
+
type: 'doc',
|
|
87
|
+
content: [
|
|
88
|
+
{
|
|
89
|
+
type: 'htmlBlock',
|
|
90
|
+
content: [
|
|
91
|
+
{
|
|
92
|
+
type: 'paragraph',
|
|
93
|
+
content: [{ type: 'text', text: 'content' }]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const html = editor.getHTML();
|
|
101
|
+
expect(html).toContain('<div>');
|
|
102
|
+
});
|
|
103
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import Document from '@tiptap/extension-document';
|
|
3
|
+
import Paragraph from '@tiptap/extension-paragraph';
|
|
4
|
+
import Text from '@tiptap/extension-text';
|
|
5
|
+
import { describe, expect, it } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { HtmlBlockExtension } from '../html-block-extension';
|
|
8
|
+
|
|
9
|
+
describe('HtmlBlockExtension', () => {
|
|
10
|
+
it('should parse div tag', () => {
|
|
11
|
+
const editor = new Editor({
|
|
12
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
13
|
+
content: '<div class="test-class"><p>content</p></div>'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const json = editor.getJSON();
|
|
17
|
+
const node = json.content?.[0];
|
|
18
|
+
|
|
19
|
+
expect(node?.type).toBe('htmlBlock');
|
|
20
|
+
expect(node?.attrs).toMatchObject({
|
|
21
|
+
tagName: 'div',
|
|
22
|
+
class: 'test-class'
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('should parse section tag', () => {
|
|
27
|
+
const editor = new Editor({
|
|
28
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
29
|
+
content: '<section><p>content</p></section>'
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const json = editor.getJSON();
|
|
33
|
+
const node = json.content?.[0];
|
|
34
|
+
|
|
35
|
+
expect(node?.attrs?.tagName).toBe('section');
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('should render correct tag', () => {
|
|
39
|
+
const editor = new Editor({
|
|
40
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
41
|
+
content: {
|
|
42
|
+
type: 'doc',
|
|
43
|
+
content: [
|
|
44
|
+
{
|
|
45
|
+
type: 'htmlBlock',
|
|
46
|
+
attrs: {
|
|
47
|
+
tagName: 'article',
|
|
48
|
+
id: 'my-article'
|
|
49
|
+
},
|
|
50
|
+
content: [
|
|
51
|
+
{
|
|
52
|
+
type: 'paragraph',
|
|
53
|
+
content: [{ type: 'text', text: 'content' }]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const html = editor.getHTML();
|
|
62
|
+
|
|
63
|
+
expect(html).toContain('<article id="my-article">');
|
|
64
|
+
expect(html).toContain('</article>');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('should fallback to div if tagName is null', () => {
|
|
68
|
+
const editor = new Editor({
|
|
69
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
70
|
+
content: {
|
|
71
|
+
type: 'doc',
|
|
72
|
+
content: [
|
|
73
|
+
{
|
|
74
|
+
type: 'htmlBlock',
|
|
75
|
+
attrs: {
|
|
76
|
+
tagName: null
|
|
77
|
+
},
|
|
78
|
+
content: [
|
|
79
|
+
{
|
|
80
|
+
type: 'paragraph',
|
|
81
|
+
content: [{ type: 'text', text: 'content' }]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const html = editor.getHTML();
|
|
90
|
+
|
|
91
|
+
expect(html).toContain('<div>');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('should fallback to div if no tagName provided', () => {
|
|
95
|
+
const editor = new Editor({
|
|
96
|
+
extensions: [Document, Paragraph, Text, HtmlBlockExtension],
|
|
97
|
+
content: {
|
|
98
|
+
type: 'doc',
|
|
99
|
+
content: [
|
|
100
|
+
{
|
|
101
|
+
type: 'htmlBlock',
|
|
102
|
+
content: [
|
|
103
|
+
{
|
|
104
|
+
type: 'paragraph',
|
|
105
|
+
content: [{ type: 'text', text: 'content' }]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const html = editor.getHTML();
|
|
114
|
+
|
|
115
|
+
expect(html).toContain('<div>');
|
|
116
|
+
});
|
|
117
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-inline-extension.test.d.ts","sourceRoot":"","sources":["../../../../../src/tiptap/extensions/__tests__/html-inline-extension.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import Document from '@tiptap/extension-document';
|
|
3
|
+
import Paragraph from '@tiptap/extension-paragraph';
|
|
4
|
+
import Text from '@tiptap/extension-text';
|
|
5
|
+
import { describe, expect, it } from 'vitest';
|
|
6
|
+
import { HtmlInlineExtension } from '../html-inline-extension';
|
|
7
|
+
describe('HtmlInlineExtension', () => {
|
|
8
|
+
it('should parse span tag', () => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const editor = new Editor({
|
|
11
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
12
|
+
content: '<p><span class="test-class">content</span></p>'
|
|
13
|
+
});
|
|
14
|
+
const json = editor.getJSON();
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
const node = (_b = (_a = json.content) === null || _a === void 0 ? void 0 : _a[0].content) === null || _b === void 0 ? void 0 : _b[0];
|
|
17
|
+
expect(node === null || node === void 0 ? void 0 : node.type).toBe('htmlInline');
|
|
18
|
+
expect(node === null || node === void 0 ? void 0 : node.attrs).toMatchObject({
|
|
19
|
+
tagName: 'span',
|
|
20
|
+
class: 'test-class'
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
it('should parse label tag', () => {
|
|
24
|
+
var _a, _b, _c;
|
|
25
|
+
const editor = new Editor({
|
|
26
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
27
|
+
content: '<p><label>content</label></p>'
|
|
28
|
+
});
|
|
29
|
+
const json = editor.getJSON();
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
const node = (_b = (_a = json.content) === null || _a === void 0 ? void 0 : _a[0].content) === null || _b === void 0 ? void 0 : _b[0];
|
|
32
|
+
expect((_c = node === null || node === void 0 ? void 0 : node.attrs) === null || _c === void 0 ? void 0 : _c.tagName).toBe('label');
|
|
33
|
+
});
|
|
34
|
+
it('should render correct tag', () => {
|
|
35
|
+
const editor = new Editor({
|
|
36
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
37
|
+
content: {
|
|
38
|
+
type: 'doc',
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'paragraph',
|
|
42
|
+
content: [
|
|
43
|
+
{
|
|
44
|
+
type: 'htmlInline',
|
|
45
|
+
attrs: {
|
|
46
|
+
tagName: 'cite',
|
|
47
|
+
id: 'my-cite'
|
|
48
|
+
},
|
|
49
|
+
content: [{ type: 'text', text: 'citation' }]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const html = editor.getHTML();
|
|
57
|
+
expect(html).toContain('<cite id="my-cite">');
|
|
58
|
+
expect(html).toContain('</cite>');
|
|
59
|
+
});
|
|
60
|
+
it('should fallback to span if tagName is null', () => {
|
|
61
|
+
const editor = new Editor({
|
|
62
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
63
|
+
content: {
|
|
64
|
+
type: 'doc',
|
|
65
|
+
content: [
|
|
66
|
+
{
|
|
67
|
+
type: 'paragraph',
|
|
68
|
+
content: [
|
|
69
|
+
{
|
|
70
|
+
type: 'htmlInline',
|
|
71
|
+
attrs: {
|
|
72
|
+
tagName: null
|
|
73
|
+
},
|
|
74
|
+
content: [{ type: 'text', text: 'content' }]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const html = editor.getHTML();
|
|
82
|
+
expect(html).toContain('<span>');
|
|
83
|
+
});
|
|
84
|
+
it('should fallback to span if no tagName provided', () => {
|
|
85
|
+
const editor = new Editor({
|
|
86
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
87
|
+
content: {
|
|
88
|
+
type: 'doc',
|
|
89
|
+
content: [
|
|
90
|
+
{
|
|
91
|
+
type: 'paragraph',
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: 'htmlInline',
|
|
95
|
+
content: [{ type: 'text', text: 'content' }]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const html = editor.getHTML();
|
|
103
|
+
expect(html).toContain('<span>');
|
|
104
|
+
});
|
|
105
|
+
});
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import Document from '@tiptap/extension-document';
|
|
3
|
+
import Paragraph from '@tiptap/extension-paragraph';
|
|
4
|
+
import Text from '@tiptap/extension-text';
|
|
5
|
+
import { describe, expect, it } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { HtmlInlineExtension } from '../html-inline-extension';
|
|
8
|
+
|
|
9
|
+
describe('HtmlInlineExtension', () => {
|
|
10
|
+
it('should parse span tag', () => {
|
|
11
|
+
const editor = new Editor({
|
|
12
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
13
|
+
content: '<p><span class="test-class">content</span></p>'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const json = editor.getJSON();
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
const node = (json.content as any)?.[0].content?.[0];
|
|
19
|
+
|
|
20
|
+
expect(node?.type).toBe('htmlInline');
|
|
21
|
+
expect(node?.attrs).toMatchObject({
|
|
22
|
+
tagName: 'span',
|
|
23
|
+
class: 'test-class'
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should parse label tag', () => {
|
|
28
|
+
const editor = new Editor({
|
|
29
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
30
|
+
content: '<p><label>content</label></p>'
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const json = editor.getJSON();
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
|
+
const node = (json.content as any)?.[0].content?.[0];
|
|
36
|
+
|
|
37
|
+
expect(node?.attrs?.tagName).toBe('label');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('should render correct tag', () => {
|
|
41
|
+
const editor = new Editor({
|
|
42
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
43
|
+
content: {
|
|
44
|
+
type: 'doc',
|
|
45
|
+
content: [
|
|
46
|
+
{
|
|
47
|
+
type: 'paragraph',
|
|
48
|
+
content: [
|
|
49
|
+
{
|
|
50
|
+
type: 'htmlInline',
|
|
51
|
+
attrs: {
|
|
52
|
+
tagName: 'cite',
|
|
53
|
+
id: 'my-cite'
|
|
54
|
+
},
|
|
55
|
+
content: [{ type: 'text', text: 'citation' }]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const html = editor.getHTML();
|
|
64
|
+
|
|
65
|
+
expect(html).toContain('<cite id="my-cite">');
|
|
66
|
+
expect(html).toContain('</cite>');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('should fallback to span if tagName is null', () => {
|
|
70
|
+
const editor = new Editor({
|
|
71
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
72
|
+
content: {
|
|
73
|
+
type: 'doc',
|
|
74
|
+
content: [
|
|
75
|
+
{
|
|
76
|
+
type: 'paragraph',
|
|
77
|
+
content: [
|
|
78
|
+
{
|
|
79
|
+
type: 'htmlInline',
|
|
80
|
+
attrs: {
|
|
81
|
+
tagName: null
|
|
82
|
+
},
|
|
83
|
+
content: [{ type: 'text', text: 'content' }]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const html = editor.getHTML();
|
|
92
|
+
|
|
93
|
+
expect(html).toContain('<span>');
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it('should fallback to span if no tagName provided', () => {
|
|
97
|
+
const editor = new Editor({
|
|
98
|
+
extensions: [Document, Paragraph, Text, HtmlInlineExtension],
|
|
99
|
+
content: {
|
|
100
|
+
type: 'doc',
|
|
101
|
+
content: [
|
|
102
|
+
{
|
|
103
|
+
type: 'paragraph',
|
|
104
|
+
content: [
|
|
105
|
+
{
|
|
106
|
+
type: 'htmlInline',
|
|
107
|
+
content: [{ type: 'text', text: 'content' }]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const html = editor.getHTML();
|
|
116
|
+
|
|
117
|
+
expect(html).toContain('<span>');
|
|
118
|
+
});
|
|
119
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iframe-extension.test.d.ts","sourceRoot":"","sources":["../../../../../src/tiptap/extensions/__tests__/iframe-extension.test.ts"],"names":[],"mappings":""}
|