@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,95 @@
|
|
|
1
|
+
export declare const HTML_ELEMENTS: {
|
|
2
|
+
DIV: string;
|
|
3
|
+
SECTION: string;
|
|
4
|
+
ARTICLE: string;
|
|
5
|
+
MAIN: string;
|
|
6
|
+
HEADER: string;
|
|
7
|
+
FOOTER: string;
|
|
8
|
+
NAV: string;
|
|
9
|
+
ASIDE: string;
|
|
10
|
+
FIGURE: string;
|
|
11
|
+
FIGCAPTION: string;
|
|
12
|
+
BLOCKQUOTE: string;
|
|
13
|
+
PRE: string;
|
|
14
|
+
HR: string;
|
|
15
|
+
DETAILS: string;
|
|
16
|
+
SUMMARY: string;
|
|
17
|
+
DIALOG: string;
|
|
18
|
+
UL: string;
|
|
19
|
+
OL: string;
|
|
20
|
+
LI: string;
|
|
21
|
+
DL: string;
|
|
22
|
+
DT: string;
|
|
23
|
+
DD: string;
|
|
24
|
+
FORM: string;
|
|
25
|
+
FIELDSET: string;
|
|
26
|
+
LEGEND: string;
|
|
27
|
+
ADDRESS: string;
|
|
28
|
+
HGROUP: string;
|
|
29
|
+
MENU: string;
|
|
30
|
+
H1: string;
|
|
31
|
+
H2: string;
|
|
32
|
+
H3: string;
|
|
33
|
+
H4: string;
|
|
34
|
+
H5: string;
|
|
35
|
+
H6: string;
|
|
36
|
+
SPAN: string;
|
|
37
|
+
LABEL: string;
|
|
38
|
+
A: string;
|
|
39
|
+
BR: string;
|
|
40
|
+
Q: string;
|
|
41
|
+
CITE: string;
|
|
42
|
+
DFN: string;
|
|
43
|
+
MARK: string;
|
|
44
|
+
TIME: string;
|
|
45
|
+
VAR: string;
|
|
46
|
+
ABBR: string;
|
|
47
|
+
KBD: string;
|
|
48
|
+
SAMP: string;
|
|
49
|
+
SMALL: string;
|
|
50
|
+
BIG: string;
|
|
51
|
+
SUB: string;
|
|
52
|
+
SUP: string;
|
|
53
|
+
BDI: string;
|
|
54
|
+
BDO: string;
|
|
55
|
+
DATA: string;
|
|
56
|
+
METER: string;
|
|
57
|
+
OUTPUT: string;
|
|
58
|
+
PROGRESS: string;
|
|
59
|
+
RUBY: string;
|
|
60
|
+
RT: string;
|
|
61
|
+
RP: string;
|
|
62
|
+
WBR: string;
|
|
63
|
+
INS: string;
|
|
64
|
+
DEL: string;
|
|
65
|
+
S: string;
|
|
66
|
+
SCRIPT: string;
|
|
67
|
+
TABLE: string;
|
|
68
|
+
THEAD: string;
|
|
69
|
+
TBODY: string;
|
|
70
|
+
TFOOT: string;
|
|
71
|
+
TR: string;
|
|
72
|
+
TH: string;
|
|
73
|
+
TD: string;
|
|
74
|
+
CAPTION: string;
|
|
75
|
+
COLGROUP: string;
|
|
76
|
+
COL: string;
|
|
77
|
+
IFRAME: string;
|
|
78
|
+
P: string;
|
|
79
|
+
STYLE: string;
|
|
80
|
+
NOSCRIPT: string;
|
|
81
|
+
CANVAS: string;
|
|
82
|
+
AREA: string;
|
|
83
|
+
BASE: string;
|
|
84
|
+
EMBED: string;
|
|
85
|
+
IMG: string;
|
|
86
|
+
INPUT: string;
|
|
87
|
+
LINK: string;
|
|
88
|
+
META: string;
|
|
89
|
+
PARAM: string;
|
|
90
|
+
SOURCE: string;
|
|
91
|
+
TRACK: string;
|
|
92
|
+
};
|
|
93
|
+
export declare const BLOCK_ELEMENTS: string[];
|
|
94
|
+
export declare const VOID_ELEMENTS: string[];
|
|
95
|
+
//# sourceMappingURL=html-elements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-elements.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/constants/html-elements.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FzB,CAAC;AAEF,eAAO,MAAM,cAAc,UAiD1B,CAAC;AAEF,eAAO,MAAM,aAAa,UAezB,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
export const HTML_ELEMENTS = {
|
|
2
|
+
DIV: 'div',
|
|
3
|
+
SECTION: 'section',
|
|
4
|
+
ARTICLE: 'article',
|
|
5
|
+
MAIN: 'main',
|
|
6
|
+
HEADER: 'header',
|
|
7
|
+
FOOTER: 'footer',
|
|
8
|
+
NAV: 'nav',
|
|
9
|
+
ASIDE: 'aside',
|
|
10
|
+
FIGURE: 'figure',
|
|
11
|
+
FIGCAPTION: 'figcaption',
|
|
12
|
+
BLOCKQUOTE: 'blockquote',
|
|
13
|
+
PRE: 'pre',
|
|
14
|
+
HR: 'hr',
|
|
15
|
+
DETAILS: 'details',
|
|
16
|
+
SUMMARY: 'summary',
|
|
17
|
+
DIALOG: 'dialog',
|
|
18
|
+
UL: 'ul',
|
|
19
|
+
OL: 'ol',
|
|
20
|
+
LI: 'li',
|
|
21
|
+
DL: 'dl',
|
|
22
|
+
DT: 'dt',
|
|
23
|
+
DD: 'dd',
|
|
24
|
+
FORM: 'form',
|
|
25
|
+
FIELDSET: 'fieldset',
|
|
26
|
+
LEGEND: 'legend',
|
|
27
|
+
ADDRESS: 'address',
|
|
28
|
+
HGROUP: 'hgroup',
|
|
29
|
+
MENU: 'menu',
|
|
30
|
+
H1: 'h1',
|
|
31
|
+
H2: 'h2',
|
|
32
|
+
H3: 'h3',
|
|
33
|
+
H4: 'h4',
|
|
34
|
+
H5: 'h5',
|
|
35
|
+
H6: 'h6',
|
|
36
|
+
SPAN: 'span',
|
|
37
|
+
LABEL: 'label',
|
|
38
|
+
A: 'a',
|
|
39
|
+
BR: 'br',
|
|
40
|
+
Q: 'q',
|
|
41
|
+
CITE: 'cite',
|
|
42
|
+
DFN: 'dfn',
|
|
43
|
+
MARK: 'mark',
|
|
44
|
+
TIME: 'time',
|
|
45
|
+
VAR: 'var',
|
|
46
|
+
ABBR: 'abbr',
|
|
47
|
+
KBD: 'kbd',
|
|
48
|
+
SAMP: 'samp',
|
|
49
|
+
SMALL: 'small',
|
|
50
|
+
BIG: 'big',
|
|
51
|
+
SUB: 'sub',
|
|
52
|
+
SUP: 'sup',
|
|
53
|
+
BDI: 'bdi',
|
|
54
|
+
BDO: 'bdo',
|
|
55
|
+
DATA: 'data',
|
|
56
|
+
METER: 'meter',
|
|
57
|
+
OUTPUT: 'output',
|
|
58
|
+
PROGRESS: 'progress',
|
|
59
|
+
RUBY: 'ruby',
|
|
60
|
+
RT: 'rt',
|
|
61
|
+
RP: 'rp',
|
|
62
|
+
WBR: 'wbr',
|
|
63
|
+
INS: 'ins',
|
|
64
|
+
DEL: 'del',
|
|
65
|
+
S: 's',
|
|
66
|
+
SCRIPT: 'script',
|
|
67
|
+
TABLE: 'table',
|
|
68
|
+
THEAD: 'thead',
|
|
69
|
+
TBODY: 'tbody',
|
|
70
|
+
TFOOT: 'tfoot',
|
|
71
|
+
TR: 'tr',
|
|
72
|
+
TH: 'th',
|
|
73
|
+
TD: 'td',
|
|
74
|
+
CAPTION: 'caption',
|
|
75
|
+
COLGROUP: 'colgroup',
|
|
76
|
+
COL: 'col',
|
|
77
|
+
IFRAME: 'iframe',
|
|
78
|
+
P: 'p',
|
|
79
|
+
STYLE: 'style',
|
|
80
|
+
NOSCRIPT: 'noscript',
|
|
81
|
+
CANVAS: 'canvas',
|
|
82
|
+
AREA: 'area',
|
|
83
|
+
BASE: 'base',
|
|
84
|
+
EMBED: 'embed',
|
|
85
|
+
IMG: 'img',
|
|
86
|
+
INPUT: 'input',
|
|
87
|
+
LINK: 'link',
|
|
88
|
+
META: 'meta',
|
|
89
|
+
PARAM: 'param',
|
|
90
|
+
SOURCE: 'source',
|
|
91
|
+
TRACK: 'track'
|
|
92
|
+
};
|
|
93
|
+
export const BLOCK_ELEMENTS = [
|
|
94
|
+
HTML_ELEMENTS.DIV,
|
|
95
|
+
HTML_ELEMENTS.ARTICLE,
|
|
96
|
+
HTML_ELEMENTS.SECTION,
|
|
97
|
+
HTML_ELEMENTS.HEADER,
|
|
98
|
+
HTML_ELEMENTS.FOOTER,
|
|
99
|
+
HTML_ELEMENTS.NAV,
|
|
100
|
+
HTML_ELEMENTS.ASIDE,
|
|
101
|
+
HTML_ELEMENTS.MAIN,
|
|
102
|
+
HTML_ELEMENTS.ADDRESS,
|
|
103
|
+
HTML_ELEMENTS.HGROUP,
|
|
104
|
+
HTML_ELEMENTS.P,
|
|
105
|
+
HTML_ELEMENTS.BLOCKQUOTE,
|
|
106
|
+
HTML_ELEMENTS.PRE,
|
|
107
|
+
HTML_ELEMENTS.HR,
|
|
108
|
+
HTML_ELEMENTS.FIGURE,
|
|
109
|
+
HTML_ELEMENTS.FIGCAPTION,
|
|
110
|
+
HTML_ELEMENTS.H1,
|
|
111
|
+
HTML_ELEMENTS.H2,
|
|
112
|
+
HTML_ELEMENTS.H3,
|
|
113
|
+
HTML_ELEMENTS.H4,
|
|
114
|
+
HTML_ELEMENTS.H5,
|
|
115
|
+
HTML_ELEMENTS.H6,
|
|
116
|
+
HTML_ELEMENTS.UL,
|
|
117
|
+
HTML_ELEMENTS.OL,
|
|
118
|
+
HTML_ELEMENTS.LI,
|
|
119
|
+
HTML_ELEMENTS.DL,
|
|
120
|
+
HTML_ELEMENTS.DT,
|
|
121
|
+
HTML_ELEMENTS.DD,
|
|
122
|
+
HTML_ELEMENTS.TABLE,
|
|
123
|
+
HTML_ELEMENTS.CAPTION,
|
|
124
|
+
HTML_ELEMENTS.THEAD,
|
|
125
|
+
HTML_ELEMENTS.TBODY,
|
|
126
|
+
HTML_ELEMENTS.TFOOT,
|
|
127
|
+
HTML_ELEMENTS.TR,
|
|
128
|
+
HTML_ELEMENTS.TD,
|
|
129
|
+
HTML_ELEMENTS.TH,
|
|
130
|
+
HTML_ELEMENTS.COLGROUP,
|
|
131
|
+
HTML_ELEMENTS.FORM,
|
|
132
|
+
HTML_ELEMENTS.FIELDSET,
|
|
133
|
+
HTML_ELEMENTS.LEGEND,
|
|
134
|
+
HTML_ELEMENTS.DETAILS,
|
|
135
|
+
HTML_ELEMENTS.SUMMARY,
|
|
136
|
+
HTML_ELEMENTS.DIALOG,
|
|
137
|
+
HTML_ELEMENTS.MENU,
|
|
138
|
+
HTML_ELEMENTS.SCRIPT,
|
|
139
|
+
HTML_ELEMENTS.STYLE,
|
|
140
|
+
HTML_ELEMENTS.NOSCRIPT,
|
|
141
|
+
HTML_ELEMENTS.CANVAS
|
|
142
|
+
];
|
|
143
|
+
export const VOID_ELEMENTS = [
|
|
144
|
+
HTML_ELEMENTS.AREA,
|
|
145
|
+
HTML_ELEMENTS.BASE,
|
|
146
|
+
HTML_ELEMENTS.BR,
|
|
147
|
+
HTML_ELEMENTS.COL,
|
|
148
|
+
HTML_ELEMENTS.EMBED,
|
|
149
|
+
HTML_ELEMENTS.HR,
|
|
150
|
+
HTML_ELEMENTS.IMG,
|
|
151
|
+
HTML_ELEMENTS.INPUT,
|
|
152
|
+
HTML_ELEMENTS.LINK,
|
|
153
|
+
HTML_ELEMENTS.META,
|
|
154
|
+
HTML_ELEMENTS.PARAM,
|
|
155
|
+
HTML_ELEMENTS.SOURCE,
|
|
156
|
+
HTML_ELEMENTS.TRACK,
|
|
157
|
+
HTML_ELEMENTS.WBR
|
|
158
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DefaultThemeConfig } from '@akinon/ui-theme';
|
|
2
|
+
export declare const getTableCellDefaults: (colors: DefaultThemeConfig["colors"]) => {
|
|
3
|
+
borderColor: string;
|
|
4
|
+
borderWidth: string;
|
|
5
|
+
borderStyle: string;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getTableHeaderDefaults: (colors: DefaultThemeConfig["colors"]) => {
|
|
9
|
+
borderColor: string;
|
|
10
|
+
borderWidth: string;
|
|
11
|
+
borderStyle: string;
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=table-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-defaults.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/constants/table-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,eAAO,MAAM,oBAAoB,GAAI,QAAQ,kBAAkB,CAAC,QAAQ,CAAC;;;;;CAKvE,CAAC;AAEH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,kBAAkB,CAAC,QAAQ,CAAC;;;;;CAMpC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const getTableCellDefaults = (colors) => {
|
|
2
|
+
var _a;
|
|
3
|
+
return ({
|
|
4
|
+
borderColor: (_a = colors === null || colors === void 0 ? void 0 : colors.neutral) === null || _a === void 0 ? void 0 : _a['600'],
|
|
5
|
+
borderWidth: '1px',
|
|
6
|
+
borderStyle: 'solid',
|
|
7
|
+
backgroundColor: 'transparent'
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export const getTableHeaderDefaults = (colors) => {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
return ({
|
|
13
|
+
borderColor: (_a = colors === null || colors === void 0 ? void 0 : colors.neutral) === null || _a === void 0 ? void 0 : _a['600'],
|
|
14
|
+
borderWidth: '1px',
|
|
15
|
+
borderStyle: 'solid',
|
|
16
|
+
backgroundColor: (_b = colors === null || colors === void 0 ? void 0 : colors.ebonyClay) === null || _b === void 0 ? void 0 : _b['550']
|
|
17
|
+
});
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-extension.test.d.ts","sourceRoot":"","sources":["../../../../../src/tiptap/extensions/__tests__/comment-extension.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { CommentExtension } from '../comment-extension';
|
|
7
|
+
describe('CommentExtension', () => {
|
|
8
|
+
it('should parse span with data-type="comment"', () => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const editor = new Editor({
|
|
11
|
+
extensions: [Document, Paragraph, Text, CommentExtension],
|
|
12
|
+
content: '<span data-type="comment" data-content="test comment">text</span>'
|
|
13
|
+
});
|
|
14
|
+
const json = editor.getJSON();
|
|
15
|
+
const paragraph = (_a = json.content) === null || _a === void 0 ? void 0 : _a[0];
|
|
16
|
+
const textNode = (_b = paragraph === null || paragraph === void 0 ? void 0 : paragraph.content) === null || _b === void 0 ? void 0 : _b[0];
|
|
17
|
+
expect(textNode === null || textNode === void 0 ? void 0 : textNode.marks).toEqual([
|
|
18
|
+
{
|
|
19
|
+
type: 'comment',
|
|
20
|
+
attrs: {
|
|
21
|
+
content: 'test comment'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
]);
|
|
25
|
+
});
|
|
26
|
+
it('should render span with correct attributes', () => {
|
|
27
|
+
const editor = new Editor({
|
|
28
|
+
extensions: [Document, Paragraph, Text, CommentExtension],
|
|
29
|
+
content: {
|
|
30
|
+
type: 'doc',
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: 'paragraph',
|
|
34
|
+
content: [
|
|
35
|
+
{
|
|
36
|
+
type: 'text',
|
|
37
|
+
text: 'text',
|
|
38
|
+
marks: [
|
|
39
|
+
{
|
|
40
|
+
type: 'comment',
|
|
41
|
+
attrs: {
|
|
42
|
+
content: 'test comment'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const html = editor.getHTML();
|
|
53
|
+
expect(html).toContain('data-type="comment"');
|
|
54
|
+
expect(html).toContain('data-content="test comment"');
|
|
55
|
+
});
|
|
56
|
+
it('should execute setComment command', () => {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
const editor = new Editor({
|
|
59
|
+
extensions: [Document, Paragraph, Text, CommentExtension]
|
|
60
|
+
});
|
|
61
|
+
editor.commands.setContent('<p>test</p>');
|
|
62
|
+
editor.commands.setTextSelection({ from: 1, to: 5 });
|
|
63
|
+
editor.commands.setComment('new comment');
|
|
64
|
+
const json = editor.getJSON();
|
|
65
|
+
const textNode = (_b = (_a = json.content) === null || _a === void 0 ? void 0 : _a[0].content) === null || _b === void 0 ? void 0 : _b[0];
|
|
66
|
+
expect(textNode === null || textNode === void 0 ? void 0 : textNode.marks).toEqual([
|
|
67
|
+
{
|
|
68
|
+
type: 'comment',
|
|
69
|
+
attrs: {
|
|
70
|
+
content: 'new comment'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
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 { CommentExtension } from '../comment-extension';
|
|
8
|
+
|
|
9
|
+
describe('CommentExtension', () => {
|
|
10
|
+
it('should parse span with data-type="comment"', () => {
|
|
11
|
+
const editor = new Editor({
|
|
12
|
+
extensions: [Document, Paragraph, Text, CommentExtension],
|
|
13
|
+
content:
|
|
14
|
+
'<span data-type="comment" data-content="test comment">text</span>'
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const json = editor.getJSON();
|
|
18
|
+
const paragraph = json.content?.[0];
|
|
19
|
+
const textNode = paragraph?.content?.[0];
|
|
20
|
+
|
|
21
|
+
expect(textNode?.marks).toEqual([
|
|
22
|
+
{
|
|
23
|
+
type: 'comment',
|
|
24
|
+
attrs: {
|
|
25
|
+
content: 'test comment'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
]);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should render span with correct attributes', () => {
|
|
32
|
+
const editor = new Editor({
|
|
33
|
+
extensions: [Document, Paragraph, Text, CommentExtension],
|
|
34
|
+
content: {
|
|
35
|
+
type: 'doc',
|
|
36
|
+
content: [
|
|
37
|
+
{
|
|
38
|
+
type: 'paragraph',
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'text',
|
|
42
|
+
text: 'text',
|
|
43
|
+
marks: [
|
|
44
|
+
{
|
|
45
|
+
type: 'comment',
|
|
46
|
+
attrs: {
|
|
47
|
+
content: 'test comment'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const html = editor.getHTML();
|
|
59
|
+
expect(html).toContain('data-type="comment"');
|
|
60
|
+
expect(html).toContain('data-content="test comment"');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('should execute setComment command', () => {
|
|
64
|
+
const editor = new Editor({
|
|
65
|
+
extensions: [Document, Paragraph, Text, CommentExtension]
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
editor.commands.setContent('<p>test</p>');
|
|
69
|
+
editor.commands.setTextSelection({ from: 1, to: 5 });
|
|
70
|
+
editor.commands.setComment('new comment');
|
|
71
|
+
|
|
72
|
+
const json = editor.getJSON();
|
|
73
|
+
const textNode = json.content?.[0].content?.[0];
|
|
74
|
+
|
|
75
|
+
expect(textNode?.marks).toEqual([
|
|
76
|
+
{
|
|
77
|
+
type: 'comment',
|
|
78
|
+
attrs: {
|
|
79
|
+
content: 'new comment'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-table-cell-extension.test.d.ts","sourceRoot":"","sources":["../../../../../src/tiptap/extensions/__tests__/custom-table-cell-extension.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import Document from '@tiptap/extension-document';
|
|
3
|
+
import Paragraph from '@tiptap/extension-paragraph';
|
|
4
|
+
import { Table, TableHeader, TableRow } from '@tiptap/extension-table';
|
|
5
|
+
import Text from '@tiptap/extension-text';
|
|
6
|
+
import { describe, expect, it } from 'vitest';
|
|
7
|
+
import { CustomTableCell } from '../custom-table-cell-extension';
|
|
8
|
+
describe('CustomTableCell', () => {
|
|
9
|
+
it('should parse style attributes', () => {
|
|
10
|
+
var _a, _b, _c, _d, _e;
|
|
11
|
+
const editor = new Editor({
|
|
12
|
+
extensions: [
|
|
13
|
+
Document,
|
|
14
|
+
Paragraph,
|
|
15
|
+
Text,
|
|
16
|
+
Table,
|
|
17
|
+
TableRow,
|
|
18
|
+
TableHeader,
|
|
19
|
+
CustomTableCell
|
|
20
|
+
],
|
|
21
|
+
content: '<table><tbody><tr><td style="background-color: red; border-color: blue; border-width: 2px; border-style: dotted">cell</td></tr></tbody></table>'
|
|
22
|
+
});
|
|
23
|
+
const json = editor.getJSON();
|
|
24
|
+
const cell = (_e = (_d = (_c = (_b = (_a = json.content) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e[0];
|
|
25
|
+
expect(cell === null || cell === void 0 ? void 0 : cell.attrs).toMatchObject({
|
|
26
|
+
backgroundColor: 'red',
|
|
27
|
+
borderColor: 'blue',
|
|
28
|
+
borderWidth: '2px',
|
|
29
|
+
borderStyle: 'dotted'
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
it('should render style attributes', () => {
|
|
33
|
+
const editor = new Editor({
|
|
34
|
+
extensions: [
|
|
35
|
+
Document,
|
|
36
|
+
Paragraph,
|
|
37
|
+
Text,
|
|
38
|
+
Table,
|
|
39
|
+
TableRow,
|
|
40
|
+
TableHeader,
|
|
41
|
+
CustomTableCell
|
|
42
|
+
],
|
|
43
|
+
content: {
|
|
44
|
+
type: 'doc',
|
|
45
|
+
content: [
|
|
46
|
+
{
|
|
47
|
+
type: 'table',
|
|
48
|
+
content: [
|
|
49
|
+
{
|
|
50
|
+
type: 'tableRow',
|
|
51
|
+
content: [
|
|
52
|
+
{
|
|
53
|
+
type: 'tableCell',
|
|
54
|
+
attrs: {
|
|
55
|
+
backgroundColor: 'red',
|
|
56
|
+
borderColor: 'blue'
|
|
57
|
+
},
|
|
58
|
+
content: [
|
|
59
|
+
{
|
|
60
|
+
type: 'paragraph',
|
|
61
|
+
content: [{ type: 'text', text: 'cell' }]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const html = editor.getHTML();
|
|
73
|
+
expect(html).toContain('background-color: red');
|
|
74
|
+
expect(html).toContain('border-color: blue');
|
|
75
|
+
});
|
|
76
|
+
it('should preserve existing styles', () => {
|
|
77
|
+
const editor = new Editor({
|
|
78
|
+
extensions: [
|
|
79
|
+
Document,
|
|
80
|
+
Paragraph,
|
|
81
|
+
Text,
|
|
82
|
+
Table,
|
|
83
|
+
TableRow,
|
|
84
|
+
TableHeader,
|
|
85
|
+
CustomTableCell
|
|
86
|
+
],
|
|
87
|
+
content: '<table><tbody><tr><td style="color: pink; background-color: red">cell</td></tr></tbody></table>'
|
|
88
|
+
});
|
|
89
|
+
const html = editor.getHTML();
|
|
90
|
+
expect(html).toContain('color: pink');
|
|
91
|
+
expect(html).toContain('background-color: red');
|
|
92
|
+
});
|
|
93
|
+
it('should execute updateCellAttributes command', () => {
|
|
94
|
+
var _a, _b, _c;
|
|
95
|
+
const editor = new Editor({
|
|
96
|
+
extensions: [
|
|
97
|
+
Document,
|
|
98
|
+
Paragraph,
|
|
99
|
+
Text,
|
|
100
|
+
Table,
|
|
101
|
+
TableRow,
|
|
102
|
+
TableHeader,
|
|
103
|
+
CustomTableCell
|
|
104
|
+
],
|
|
105
|
+
content: '<table><tbody><tr><td>cell</td></tr></tbody></table>'
|
|
106
|
+
});
|
|
107
|
+
editor.commands.setTextSelection(4); // Inside the cell
|
|
108
|
+
editor.commands.updateCellAttributes({ backgroundColor: 'green' });
|
|
109
|
+
const json = editor.getJSON();
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
111
|
+
const cell = (_c = (_b = (_a = json.content) === null || _a === void 0 ? void 0 : _a[0].content) === null || _b === void 0 ? void 0 : _b[0].content) === null || _c === void 0 ? void 0 : _c[0];
|
|
112
|
+
expect(cell === null || cell === void 0 ? void 0 : cell.attrs).toMatchObject({
|
|
113
|
+
backgroundColor: 'green'
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
});
|