@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,87 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { mergeAttributes, Node } from '@tiptap/core';
|
|
13
|
+
import { HTML_ELEMENTS } from '../constants';
|
|
14
|
+
export const HtmlInlineExtension = Node.create({
|
|
15
|
+
name: 'htmlInline',
|
|
16
|
+
group: 'inline',
|
|
17
|
+
inline: true,
|
|
18
|
+
content: 'inline*',
|
|
19
|
+
addOptions() {
|
|
20
|
+
return {
|
|
21
|
+
HTMLAttributes: {}
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
addAttributes() {
|
|
25
|
+
return {
|
|
26
|
+
tagName: {
|
|
27
|
+
default: HTML_ELEMENTS.SPAN,
|
|
28
|
+
parseHTML: element => element.tagName.toLowerCase(),
|
|
29
|
+
renderHTML: () => {
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
style: {
|
|
34
|
+
default: null
|
|
35
|
+
},
|
|
36
|
+
class: {
|
|
37
|
+
default: null
|
|
38
|
+
},
|
|
39
|
+
id: {
|
|
40
|
+
default: null
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
parseHTML() {
|
|
45
|
+
return [
|
|
46
|
+
{ tag: HTML_ELEMENTS.SPAN },
|
|
47
|
+
{ tag: HTML_ELEMENTS.LABEL },
|
|
48
|
+
{ tag: HTML_ELEMENTS.A },
|
|
49
|
+
{ tag: HTML_ELEMENTS.BR },
|
|
50
|
+
{ tag: HTML_ELEMENTS.Q },
|
|
51
|
+
{ tag: HTML_ELEMENTS.CITE },
|
|
52
|
+
{ tag: HTML_ELEMENTS.DFN },
|
|
53
|
+
{ tag: HTML_ELEMENTS.MARK },
|
|
54
|
+
{ tag: HTML_ELEMENTS.TIME },
|
|
55
|
+
{ tag: HTML_ELEMENTS.VAR },
|
|
56
|
+
{ tag: HTML_ELEMENTS.ABBR },
|
|
57
|
+
{ tag: HTML_ELEMENTS.KBD },
|
|
58
|
+
{ tag: HTML_ELEMENTS.SAMP },
|
|
59
|
+
{ tag: HTML_ELEMENTS.SMALL },
|
|
60
|
+
{ tag: HTML_ELEMENTS.BIG },
|
|
61
|
+
{ tag: HTML_ELEMENTS.SUB },
|
|
62
|
+
{ tag: HTML_ELEMENTS.SUP },
|
|
63
|
+
{ tag: HTML_ELEMENTS.BDI },
|
|
64
|
+
{ tag: HTML_ELEMENTS.BDO },
|
|
65
|
+
{ tag: HTML_ELEMENTS.DATA },
|
|
66
|
+
{ tag: HTML_ELEMENTS.METER },
|
|
67
|
+
{ tag: HTML_ELEMENTS.OUTPUT },
|
|
68
|
+
{ tag: HTML_ELEMENTS.PROGRESS },
|
|
69
|
+
{ tag: HTML_ELEMENTS.RUBY },
|
|
70
|
+
{ tag: HTML_ELEMENTS.RT },
|
|
71
|
+
{ tag: HTML_ELEMENTS.RP },
|
|
72
|
+
{ tag: HTML_ELEMENTS.WBR },
|
|
73
|
+
{ tag: HTML_ELEMENTS.INS },
|
|
74
|
+
{ tag: HTML_ELEMENTS.DEL },
|
|
75
|
+
{ tag: HTML_ELEMENTS.S }
|
|
76
|
+
];
|
|
77
|
+
},
|
|
78
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
79
|
+
const _a = node.attrs, { tagName } = _a, otherAttributes = __rest(_a, ["tagName"]);
|
|
80
|
+
const tag = tagName || HTML_ELEMENTS.SPAN;
|
|
81
|
+
return [
|
|
82
|
+
tag,
|
|
83
|
+
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, otherAttributes),
|
|
84
|
+
0
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface IframeOptions {
|
|
3
|
+
allowFullscreen: boolean;
|
|
4
|
+
HTMLAttributes: Record<string, string | number | boolean | null | undefined>;
|
|
5
|
+
}
|
|
6
|
+
declare module '@tiptap/core' {
|
|
7
|
+
interface Commands<ReturnType> {
|
|
8
|
+
iframe: {
|
|
9
|
+
setIframe: (options: {
|
|
10
|
+
src: string;
|
|
11
|
+
width?: string | number;
|
|
12
|
+
height?: string | number;
|
|
13
|
+
}) => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const IframeExtension: Node<IframeOptions, any>;
|
|
18
|
+
//# sourceMappingURL=iframe-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iframe-extension.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/extensions/iframe-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CAC9E;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,QAAQ,CAAC,UAAU;QAC3B,MAAM,EAAE;YACN,SAAS,EAAE,CAAC,OAAO,EAAE;gBACnB,GAAG,EAAE,MAAM,CAAC;gBACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;gBACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;aAC1B,KAAK,UAAU,CAAC;SAClB,CAAC;KACH;CACF;AA2BD,eAAO,MAAM,eAAe,0BA0J1B,CAAC"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { mergeAttributes, Node } from '@tiptap/core';
|
|
2
|
+
const IFRAME_ATTRIBUTES = {
|
|
3
|
+
src: 'src',
|
|
4
|
+
width: 'width',
|
|
5
|
+
height: 'height',
|
|
6
|
+
frameborder: 'frameborder',
|
|
7
|
+
allowfullscreen: 'allowfullscreen',
|
|
8
|
+
style: 'style',
|
|
9
|
+
class: 'class',
|
|
10
|
+
id: 'id',
|
|
11
|
+
title: 'title',
|
|
12
|
+
loading: 'loading'
|
|
13
|
+
};
|
|
14
|
+
const DEFAULT_VALUES = {
|
|
15
|
+
width: '100%',
|
|
16
|
+
height: '400',
|
|
17
|
+
frameborder: '0',
|
|
18
|
+
allowfullscreen: true,
|
|
19
|
+
style: null,
|
|
20
|
+
class: null,
|
|
21
|
+
id: null,
|
|
22
|
+
title: null,
|
|
23
|
+
loading: 'lazy'
|
|
24
|
+
};
|
|
25
|
+
export const IframeExtension = Node.create({
|
|
26
|
+
name: 'iframe',
|
|
27
|
+
group: 'block',
|
|
28
|
+
atom: true,
|
|
29
|
+
addOptions() {
|
|
30
|
+
return {
|
|
31
|
+
allowFullscreen: true,
|
|
32
|
+
HTMLAttributes: {}
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
addAttributes() {
|
|
36
|
+
return {
|
|
37
|
+
src: {
|
|
38
|
+
default: null,
|
|
39
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.src),
|
|
40
|
+
renderHTML: attributes => {
|
|
41
|
+
if (!attributes.src) {
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
src: attributes.src
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
width: {
|
|
50
|
+
default: DEFAULT_VALUES.width,
|
|
51
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.width),
|
|
52
|
+
renderHTML: attributes => {
|
|
53
|
+
return {
|
|
54
|
+
width: attributes.width
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
height: {
|
|
59
|
+
default: DEFAULT_VALUES.height,
|
|
60
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.height),
|
|
61
|
+
renderHTML: attributes => {
|
|
62
|
+
return {
|
|
63
|
+
height: attributes.height
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
frameborder: {
|
|
68
|
+
default: DEFAULT_VALUES.frameborder,
|
|
69
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.frameborder),
|
|
70
|
+
renderHTML: attributes => {
|
|
71
|
+
return {
|
|
72
|
+
frameborder: attributes.frameborder
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
allowfullscreen: {
|
|
77
|
+
default: DEFAULT_VALUES.allowfullscreen,
|
|
78
|
+
parseHTML: element => element.hasAttribute(IFRAME_ATTRIBUTES.allowfullscreen),
|
|
79
|
+
renderHTML: attributes => {
|
|
80
|
+
if (!attributes.allowfullscreen) {
|
|
81
|
+
return {};
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
allowfullscreen: 'true'
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
style: {
|
|
89
|
+
default: DEFAULT_VALUES.style,
|
|
90
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.style),
|
|
91
|
+
renderHTML: attributes => {
|
|
92
|
+
if (!attributes.style) {
|
|
93
|
+
return {};
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
style: attributes.style
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
class: {
|
|
101
|
+
default: DEFAULT_VALUES.class,
|
|
102
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.class),
|
|
103
|
+
renderHTML: attributes => {
|
|
104
|
+
if (!attributes.class) {
|
|
105
|
+
return {};
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
class: attributes.class
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
id: {
|
|
113
|
+
default: DEFAULT_VALUES.id,
|
|
114
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.id),
|
|
115
|
+
renderHTML: attributes => {
|
|
116
|
+
if (!attributes.id) {
|
|
117
|
+
return {};
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
id: attributes.id
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
title: {
|
|
125
|
+
default: DEFAULT_VALUES.title,
|
|
126
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.title),
|
|
127
|
+
renderHTML: attributes => {
|
|
128
|
+
if (!attributes.title) {
|
|
129
|
+
return {};
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
title: attributes.title
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
loading: {
|
|
137
|
+
default: DEFAULT_VALUES.loading,
|
|
138
|
+
parseHTML: element => element.getAttribute(IFRAME_ATTRIBUTES.loading),
|
|
139
|
+
renderHTML: attributes => {
|
|
140
|
+
return {
|
|
141
|
+
loading: attributes.loading
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
parseHTML() {
|
|
148
|
+
return [
|
|
149
|
+
{
|
|
150
|
+
tag: 'iframe'
|
|
151
|
+
}
|
|
152
|
+
];
|
|
153
|
+
},
|
|
154
|
+
renderHTML({ HTMLAttributes }) {
|
|
155
|
+
return [
|
|
156
|
+
'iframe',
|
|
157
|
+
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)
|
|
158
|
+
];
|
|
159
|
+
},
|
|
160
|
+
addCommands() {
|
|
161
|
+
return {
|
|
162
|
+
setIframe: options => ({ commands }) => {
|
|
163
|
+
return commands.insertContent({
|
|
164
|
+
type: this.name,
|
|
165
|
+
attrs: options
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-upload-extension.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/extensions/image-upload-extension.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAyB,MAAM,cAAc,CAAC;AAM5E,eAAO,MAAM,oBAAoB,gBA0B/B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { mergeAttributes, Node } from '@tiptap/core';
|
|
2
|
+
import { ReactNodeViewRenderer } from '@tiptap/react';
|
|
3
|
+
import { ImageUploadPlaceholder } from '../components/image-upload-placeholder';
|
|
4
|
+
import { EXTENSION_PRIORITIES } from '../constants';
|
|
5
|
+
export const ImageUploadExtension = Node.create({
|
|
6
|
+
name: 'imageUpload',
|
|
7
|
+
group: 'block',
|
|
8
|
+
atom: true,
|
|
9
|
+
addAttributes() {
|
|
10
|
+
return {};
|
|
11
|
+
},
|
|
12
|
+
parseHTML() {
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
tag: 'div[data-type="image-upload"]',
|
|
16
|
+
priority: EXTENSION_PRIORITIES.IMAGE_UPLOAD
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
},
|
|
20
|
+
renderHTML({ HTMLAttributes }) {
|
|
21
|
+
return [
|
|
22
|
+
'div',
|
|
23
|
+
mergeAttributes(HTMLAttributes, { 'data-type': 'image-upload' })
|
|
24
|
+
];
|
|
25
|
+
},
|
|
26
|
+
addNodeView() {
|
|
27
|
+
return ReactNodeViewRenderer(ImageUploadPlaceholder);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './comment-extension';
|
|
2
|
+
export * from './custom-table-cell-extension';
|
|
3
|
+
export * from './custom-table-header-extension';
|
|
4
|
+
export * from './html-block-extension';
|
|
5
|
+
export * from './html-inline-extension';
|
|
6
|
+
export * from './iframe-extension';
|
|
7
|
+
export * from './image-upload-extension';
|
|
8
|
+
export * from './reset-marks-extension';
|
|
9
|
+
export * from './secure-script-extension';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/extensions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './comment-extension';
|
|
2
|
+
export * from './custom-table-cell-extension';
|
|
3
|
+
export * from './custom-table-header-extension';
|
|
4
|
+
export * from './html-block-extension';
|
|
5
|
+
export * from './html-inline-extension';
|
|
6
|
+
export * from './iframe-extension';
|
|
7
|
+
export * from './image-upload-extension';
|
|
8
|
+
export * from './reset-marks-extension';
|
|
9
|
+
export * from './secure-script-extension';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset-marks-extension.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/extensions/reset-marks-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,iBAAiB,qBAmB5B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
export const ResetMarksOnEnter = Extension.create({
|
|
3
|
+
name: 'resetMarksOnEnter',
|
|
4
|
+
addKeyboardShortcuts() {
|
|
5
|
+
return {
|
|
6
|
+
Enter: ({ editor }) => {
|
|
7
|
+
if (editor.isActive('listItem') ||
|
|
8
|
+
editor.isActive('codeBlock') ||
|
|
9
|
+
editor.isActive('taskItem') ||
|
|
10
|
+
editor.isActive('blockquote')) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return editor.commands.splitBlock({ keepMarks: false });
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-script-extension.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/extensions/secure-script-extension.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AAYrD,eAAO,MAAM,qBAAqB,gBA6ChC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { mergeAttributes, Node } from '@tiptap/core';
|
|
2
|
+
import { ReactNodeViewRenderer } from '@tiptap/react';
|
|
3
|
+
import { SecureScriptComponent } from '../components/secure-script-component';
|
|
4
|
+
import { HTML_ELEMENTS } from '../constants';
|
|
5
|
+
/**
|
|
6
|
+
* Valid script types that browser won't execute by default,
|
|
7
|
+
* effectively making the script "inert" or data-only block.
|
|
8
|
+
*/
|
|
9
|
+
const INERT_TYPE = 'text/inert';
|
|
10
|
+
export const SecureScriptExtension = Node.create({
|
|
11
|
+
name: 'secureScript',
|
|
12
|
+
group: 'block',
|
|
13
|
+
content: 'text*',
|
|
14
|
+
marks: '',
|
|
15
|
+
code: true,
|
|
16
|
+
addAttributes() {
|
|
17
|
+
return {
|
|
18
|
+
src: {
|
|
19
|
+
default: null
|
|
20
|
+
},
|
|
21
|
+
type: {
|
|
22
|
+
default: null
|
|
23
|
+
},
|
|
24
|
+
async: {
|
|
25
|
+
default: null
|
|
26
|
+
},
|
|
27
|
+
defer: {
|
|
28
|
+
default: null
|
|
29
|
+
},
|
|
30
|
+
crossorigin: {
|
|
31
|
+
default: null
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
parseHTML() {
|
|
36
|
+
return [
|
|
37
|
+
{
|
|
38
|
+
tag: HTML_ELEMENTS.SCRIPT
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
},
|
|
42
|
+
renderHTML({ HTMLAttributes }) {
|
|
43
|
+
// SECURITY CRITICAL:
|
|
44
|
+
// We force the type to be 'text/inert' so the browser DOES NOT execute this script
|
|
45
|
+
// when Tiptap renders it into the editor DOM (or when getHTML() is called).
|
|
46
|
+
return [
|
|
47
|
+
HTML_ELEMENTS.SCRIPT,
|
|
48
|
+
mergeAttributes(HTMLAttributes, { type: INERT_TYPE }),
|
|
49
|
+
0
|
|
50
|
+
];
|
|
51
|
+
},
|
|
52
|
+
addNodeView() {
|
|
53
|
+
return ReactNodeViewRenderer(SecureScriptComponent);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import type { JSONContent } from '@tiptap/core';
|
|
2
|
+
import { TOOLBAR_BUTTON_IDS, TOOLBAR_GROUP_IDS } from '../constants';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the current state of the Tiptap editor.
|
|
5
|
+
* This interface tracks both the active formatting/block types and the available actions
|
|
6
|
+
* based on the current cursor position and selection.
|
|
7
|
+
*/
|
|
8
|
+
export interface EditorState {
|
|
9
|
+
isBold: boolean;
|
|
10
|
+
isItalic: boolean;
|
|
11
|
+
isUnderline: boolean;
|
|
12
|
+
isStrike: boolean;
|
|
13
|
+
isCode: boolean;
|
|
14
|
+
isHighlight: boolean;
|
|
15
|
+
isParagraph: boolean;
|
|
16
|
+
isHeading1: boolean;
|
|
17
|
+
isHeading2: boolean;
|
|
18
|
+
isHeading3: boolean;
|
|
19
|
+
isHeading4: boolean;
|
|
20
|
+
isCodeBlock: boolean;
|
|
21
|
+
isBlockquote: boolean;
|
|
22
|
+
isBulletList: boolean;
|
|
23
|
+
isOrderedList: boolean;
|
|
24
|
+
isTaskList: boolean;
|
|
25
|
+
isLink: boolean;
|
|
26
|
+
isTable: boolean;
|
|
27
|
+
isLeftAlign: boolean;
|
|
28
|
+
isCenterAlign: boolean;
|
|
29
|
+
isRightAlign: boolean;
|
|
30
|
+
isJustifyAlign: boolean;
|
|
31
|
+
canUndo: boolean;
|
|
32
|
+
canRedo: boolean;
|
|
33
|
+
canBold: boolean;
|
|
34
|
+
canItalic: boolean;
|
|
35
|
+
canUnderline: boolean;
|
|
36
|
+
canStrike: boolean;
|
|
37
|
+
canCode: boolean;
|
|
38
|
+
canClearMarks: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Union type representing all possible toolbar button identifiers.
|
|
42
|
+
* This type is derived from the TOOLBAR_BUTTON_IDS constant object.
|
|
43
|
+
* Used to identify and reference specific buttons in the editor toolbar.
|
|
44
|
+
*/
|
|
45
|
+
export type ToolbarButtonId = (typeof TOOLBAR_BUTTON_IDS)[keyof typeof TOOLBAR_BUTTON_IDS];
|
|
46
|
+
/**
|
|
47
|
+
* Union type representing all possible toolbar group identifiers.
|
|
48
|
+
* This type is derived from the TOOLBAR_GROUP_IDS constant object.
|
|
49
|
+
* Used to identify and reference groups of related buttons in the editor toolbar.
|
|
50
|
+
*/
|
|
51
|
+
export type ToolbarGroupId = (typeof TOOLBAR_GROUP_IDS)[keyof typeof TOOLBAR_GROUP_IDS];
|
|
52
|
+
/**
|
|
53
|
+
* Configuration interface for customizing the editor toolbar visibility.
|
|
54
|
+
* Allows selective hiding of individual buttons or entire button groups.
|
|
55
|
+
*/
|
|
56
|
+
export interface ToolbarConfig {
|
|
57
|
+
/**
|
|
58
|
+
* Array of toolbar button IDs to hide from the toolbar.
|
|
59
|
+
* Use this to selectively remove specific buttons while keeping others visible.
|
|
60
|
+
*
|
|
61
|
+
* **Available button IDs:**
|
|
62
|
+
* - Text formatting: `bold`, `italic`, `strike`, `underline`, `clear`, `highlight`
|
|
63
|
+
* - Text blocks: `paragraph`, `h1`, `h2`, `h3`, `h4`, `heading`
|
|
64
|
+
* - Lists: `bulletList`, `orderedList`, `taskList`
|
|
65
|
+
* - Code: `code`, `codeBlock`
|
|
66
|
+
* - Content: `blockquote`, `horizontalRule`, `link`, `image`, `table`, `youtube`
|
|
67
|
+
* - History: `undo`, `redo`
|
|
68
|
+
* - Other: `sourceMode`
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```tsx
|
|
72
|
+
* // Hide bold and italic buttons
|
|
73
|
+
* toolbar={{ hiddenButtons: ['bold', 'italic'] }}
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* // Hide all heading buttons
|
|
79
|
+
* toolbar={{ hiddenButtons: ['h1', 'h2', 'h3', 'h4'] }}
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
hiddenButtons?: Array<ToolbarButtonId>;
|
|
83
|
+
/**
|
|
84
|
+
* Array of toolbar group IDs to hide from the toolbar.
|
|
85
|
+
* Use this to hide entire groups of related buttons at once for cleaner customization.
|
|
86
|
+
*
|
|
87
|
+
* **Available group IDs:**
|
|
88
|
+
* - `heading` - Paragraph and heading selector dropdown
|
|
89
|
+
* - `formatting` - Bold, italic, underline, strikethrough, highlight, code, and clear formatting
|
|
90
|
+
* - `list` - Bullet list, ordered list, and task list
|
|
91
|
+
* - `link` - Link insertion and management
|
|
92
|
+
* - `media` - Image upload, table, YouTube embed, horizontal rule, and blockquote
|
|
93
|
+
* - `history` - Undo and redo actions
|
|
94
|
+
* - `alignment` - Text alignment options (left, center, right, justify)
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```tsx
|
|
98
|
+
* // Hide all formatting and media buttons
|
|
99
|
+
* toolbar={{ hiddenGroups: ['formatting', 'media'] }}
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```tsx
|
|
104
|
+
* // Keep only basic text editing (hide media and alignment)
|
|
105
|
+
* toolbar={{ hiddenGroups: ['media', 'alignment'] }}
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
hiddenGroups?: Array<ToolbarGroupId>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The props of the AkiTextEditor component.
|
|
112
|
+
*/
|
|
113
|
+
export interface TextEditorProps {
|
|
114
|
+
/**
|
|
115
|
+
* The current HTML content of the editor. Use this for controlled mode.
|
|
116
|
+
*/
|
|
117
|
+
value?: string;
|
|
118
|
+
/**
|
|
119
|
+
* The initial HTML content of the editor. Use this for uncontrolled mode.
|
|
120
|
+
*/
|
|
121
|
+
defaultValue?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Callback fired when the editor content changes.
|
|
124
|
+
*/
|
|
125
|
+
onChange?: (value: {
|
|
126
|
+
html: string;
|
|
127
|
+
json: JSONContent;
|
|
128
|
+
}) => void;
|
|
129
|
+
/**
|
|
130
|
+
* Disables all editing capabilities and hides the toolbar.
|
|
131
|
+
* @default false
|
|
132
|
+
*/
|
|
133
|
+
readOnly?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Custom class names for different parts of the editor.
|
|
136
|
+
* Use this to apply custom styling to specific editor sections.
|
|
137
|
+
*
|
|
138
|
+
* **Available class names:**
|
|
139
|
+
* - `editorWrapper` - Applied to the outermost container of the editor
|
|
140
|
+
* - `editorContent` - Applied to the content area where text is edited
|
|
141
|
+
* - `editorToolbar` - Applied to the toolbar container at the top
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```tsx
|
|
145
|
+
* <AkiTextEditor
|
|
146
|
+
* classNames={{
|
|
147
|
+
* editorWrapper: 'my-editor',
|
|
148
|
+
* editorContent: 'custom-content',
|
|
149
|
+
* editorToolbar: 'custom-toolbar'
|
|
150
|
+
* }}
|
|
151
|
+
* />
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
classNames?: {
|
|
155
|
+
/** Class name for the outermost editor wrapper */
|
|
156
|
+
editorWrapper?: string;
|
|
157
|
+
/** Class name for the editor content area */
|
|
158
|
+
editorContent?: string;
|
|
159
|
+
/** Class name for the toolbar container */
|
|
160
|
+
editorToolbar?: string;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Configuration object to customize the toolbar visibility.
|
|
164
|
+
* Use `hiddenButtons` to hide specific buttons or `hiddenGroups` to hide entire groups.
|
|
165
|
+
*
|
|
166
|
+
* **Available button IDs to hide:**
|
|
167
|
+
* - Text formatting: `bold`, `italic`, `strike`, `underline`, `clear`, `highlight`
|
|
168
|
+
* - Text blocks: `paragraph`, `h1`, `h2`, `h3`, `h4`, `heading`
|
|
169
|
+
* - Lists: `bulletList`, `orderedList`, `taskList`
|
|
170
|
+
* - Code: `code`, `codeBlock`
|
|
171
|
+
* - Content: `blockquote`, `horizontalRule`, `link`, `image`, `table`, `youtube`
|
|
172
|
+
* - History: `undo`, `redo`
|
|
173
|
+
* - Other: `sourceMode`
|
|
174
|
+
*
|
|
175
|
+
* **Available group IDs to hide:**
|
|
176
|
+
* - `heading` - Paragraph and heading selector dropdown
|
|
177
|
+
* - `formatting` - Bold, italic, underline, strikethrough, highlight, code, and clear formatting
|
|
178
|
+
* - `list` - Bullet list, ordered list, and task list
|
|
179
|
+
* - `link` - Link insertion and management
|
|
180
|
+
* - `media` - Image upload, table, YouTube embed, horizontal rule, and blockquote
|
|
181
|
+
* - `history` - Undo and redo actions
|
|
182
|
+
* - `alignment` - Text alignment options (left, center, right, justify)
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```tsx
|
|
186
|
+
* // Hide specific formatting buttons
|
|
187
|
+
* <AkiTextEditor toolbar={{ hiddenButtons: ['bold', 'italic'] }} />
|
|
188
|
+
* ```
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```tsx
|
|
192
|
+
* // Hide entire groups
|
|
193
|
+
* <AkiTextEditor toolbar={{ hiddenGroups: ['formatting', 'media'] }} />
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```tsx
|
|
198
|
+
* // Combine both for fine-grained control
|
|
199
|
+
* <AkiTextEditor
|
|
200
|
+
* toolbar={{
|
|
201
|
+
* hiddenGroups: ['media'],
|
|
202
|
+
* hiddenButtons: ['highlight', 'codeBlock']
|
|
203
|
+
* }}
|
|
204
|
+
* />
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
toolbar?: ToolbarConfig;
|
|
208
|
+
/**
|
|
209
|
+
* Sets the initial mode of the editor.
|
|
210
|
+
* If true, the editor starts in Source Mode (HTML view).
|
|
211
|
+
* If false, it starts in WYSIWYG mode.
|
|
212
|
+
* Note: If the `sourceMode` button is hidden via `toolbar.hiddenButtons`, this will default to `false`.
|
|
213
|
+
* @default true
|
|
214
|
+
*/
|
|
215
|
+
defaultSourceMode?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Placeholder text to display when the editor is empty.
|
|
218
|
+
*/
|
|
219
|
+
placeholder?: string;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Interface representing a color value object from Ant Design's color picker.
|
|
223
|
+
* This interface is used for type safety when working with color picker components.
|
|
224
|
+
*/
|
|
225
|
+
export interface ColorValue {
|
|
226
|
+
/**
|
|
227
|
+
* Converts the color value to a hexadecimal string representation.
|
|
228
|
+
* @returns A hex color string (e.g., "#FF5733")
|
|
229
|
+
*/
|
|
230
|
+
toHexString(): string;
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tiptap/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACzB,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAEvC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CACtC;AACD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAEhE;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,UAAU,CAAC,EAAE;QACX,kDAAkD;QAClD,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,6CAA6C;QAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,2CAA2C;QAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,WAAW,IAAI,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|