create-starlight-cms 0.9.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/LICENSE +21 -0
- package/README.md +18 -0
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/bin/index.js +147 -0
- package/package.json +46 -0
- package/template/.nvmrc +1 -0
- package/template/LICENSE +21 -0
- package/template/README.md +68 -0
- package/template/THIRD_PARTY_NOTICES.md +12 -0
- package/template/_gitignore +14 -0
- package/template/astro.config.mjs +26 -0
- package/template/migrations/0001_schema.sql +73 -0
- package/template/migrations/0002_publish_delivery.sql +16 -0
- package/template/package-lock.json.template +9123 -0
- package/template/package.json +89 -0
- package/template/scripts/build-admin.mjs +38 -0
- package/template/scripts/check-linux-bindings.mjs +18 -0
- package/template/scripts/dev.mjs +94 -0
- package/template/src/admin/admin.scss +182 -0
- package/template/src/admin/app.ts +130 -0
- package/template/src/admin/client.tsx +684 -0
- package/template/src/admin/components/tiptap-extension/node-background-extension.ts +150 -0
- package/template/src/admin/components/tiptap-icons/align-center-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/align-justify-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/align-left-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/align-right-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/arrow-left-icon.tsx +24 -0
- package/template/src/admin/components/tiptap-icons/arrow-right-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/ban-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/blockquote-icon.tsx +44 -0
- package/template/src/admin/components/tiptap-icons/bold-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/case-sensitive-icon.tsx +32 -0
- package/template/src/admin/components/tiptap-icons/check-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/chevron-down-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/chevron-up-icon.tsx +22 -0
- package/template/src/admin/components/tiptap-icons/close-icon.tsx +24 -0
- package/template/src/admin/components/tiptap-icons/code-block-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/code2-icon.tsx +32 -0
- package/template/src/admin/components/tiptap-icons/corner-down-left-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/external-link-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/heading-five-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/heading-four-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/heading-icon.tsx +24 -0
- package/template/src/admin/components/tiptap-icons/heading-one-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/heading-six-icon.tsx +30 -0
- package/template/src/admin/components/tiptap-icons/heading-three-icon.tsx +36 -0
- package/template/src/admin/components/tiptap-icons/heading-two-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/highlighter-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/image-plus-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/italic-icon.tsx +24 -0
- package/template/src/admin/components/tiptap-icons/link-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/list-icon.tsx +56 -0
- package/template/src/admin/components/tiptap-icons/list-ordered-icon.tsx +56 -0
- package/template/src/admin/components/tiptap-icons/list-todo-icon.tsx +50 -0
- package/template/src/admin/components/tiptap-icons/moon-star-icon.tsx +30 -0
- package/template/src/admin/components/tiptap-icons/redo2-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/search-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/strike-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/subscript-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/sun-icon.tsx +58 -0
- package/template/src/admin/components/tiptap-icons/superscript-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/trash-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/underline-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/undo2-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/whole-word-icon.tsx +36 -0
- package/template/src/admin/components/tiptap-node/blockquote-node/blockquote-node.scss +37 -0
- package/template/src/admin/components/tiptap-node/code-block-node/code-block-node.scss +54 -0
- package/template/src/admin/components/tiptap-node/heading-node/heading-node.scss +45 -0
- package/template/src/admin/components/tiptap-node/horizontal-rule-node/horizontal-rule-node-extension.ts +14 -0
- package/template/src/admin/components/tiptap-node/horizontal-rule-node/horizontal-rule-node.scss +25 -0
- package/template/src/admin/components/tiptap-node/image-node/image-node.scss +35 -0
- package/template/src/admin/components/tiptap-node/image-upload-node/image-upload-node-extension.ts +161 -0
- package/template/src/admin/components/tiptap-node/image-upload-node/image-upload-node.scss +249 -0
- package/template/src/admin/components/tiptap-node/image-upload-node/image-upload-node.tsx +554 -0
- package/template/src/admin/components/tiptap-node/image-upload-node/index.tsx +1 -0
- package/template/src/admin/components/tiptap-node/list-node/list-node.scss +208 -0
- package/template/src/admin/components/tiptap-node/paragraph-node/paragraph-node.scss +217 -0
- package/template/src/admin/components/tiptap-templates/simple/NOTICE.md +14 -0
- package/template/src/admin/components/tiptap-templates/simple/data/content.json +477 -0
- package/template/src/admin/components/tiptap-templates/simple/simple-editor.scss +97 -0
- package/template/src/admin/components/tiptap-templates/simple/simple-editor.tsx +348 -0
- package/template/src/admin/components/tiptap-templates/simple/theme-toggle.tsx +44 -0
- package/template/src/admin/components/tiptap-ui/blockquote-button/blockquote-button.tsx +122 -0
- package/template/src/admin/components/tiptap-ui/blockquote-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/blockquote-button/use-blockquote.ts +273 -0
- package/template/src/admin/components/tiptap-ui/code-block-button/code-block-button.tsx +122 -0
- package/template/src/admin/components/tiptap-ui/code-block-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/code-block-button/use-code-block.ts +283 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-button/color-highlight-button.scss +49 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx +170 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-button/use-color-highlight.ts +380 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx +231 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-popover/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui/heading-button/heading-button.tsx +124 -0
- package/template/src/admin/components/tiptap-ui/heading-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/heading-button/use-heading.ts +348 -0
- package/template/src/admin/components/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx +128 -0
- package/template/src/admin/components/tiptap-ui/heading-dropdown-menu/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/heading-dropdown-menu/use-heading-dropdown-menu.ts +132 -0
- package/template/src/admin/components/tiptap-ui/image-upload-button/image-upload-button.tsx +130 -0
- package/template/src/admin/components/tiptap-ui/image-upload-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/image-upload-button/use-image-upload.ts +197 -0
- package/template/src/admin/components/tiptap-ui/link-popover/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/link-popover/link-popover.scss +16 -0
- package/template/src/admin/components/tiptap-ui/link-popover/link-popover.tsx +315 -0
- package/template/src/admin/components/tiptap-ui/link-popover/use-link-popover.ts +297 -0
- package/template/src/admin/components/tiptap-ui/list-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/list-button/list-button.tsx +120 -0
- package/template/src/admin/components/tiptap-ui/list-button/use-list.ts +353 -0
- package/template/src/admin/components/tiptap-ui/list-dropdown-menu/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx +126 -0
- package/template/src/admin/components/tiptap-ui/list-dropdown-menu/use-list-dropdown-menu.ts +220 -0
- package/template/src/admin/components/tiptap-ui/mark-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/mark-button/mark-button.tsx +122 -0
- package/template/src/admin/components/tiptap-ui/mark-button/use-mark.ts +219 -0
- package/template/src/admin/components/tiptap-ui/search-and-replace/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/search-and-replace/search-and-replace.scss +300 -0
- package/template/src/admin/components/tiptap-ui/search-and-replace/search-and-replace.tsx +718 -0
- package/template/src/admin/components/tiptap-ui/search-and-replace/use-search-and-replace.ts +528 -0
- package/template/src/admin/components/tiptap-ui/text-align-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/text-align-button/text-align-button.tsx +144 -0
- package/template/src/admin/components/tiptap-ui/text-align-button/use-text-align.ts +237 -0
- package/template/src/admin/components/tiptap-ui/undo-redo-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/undo-redo-button/undo-redo-button.tsx +125 -0
- package/template/src/admin/components/tiptap-ui/undo-redo-button/use-undo-redo.ts +200 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/badge-colors.scss +395 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/badge-group.scss +16 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/badge.scss +99 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/badge.tsx +44 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/button/button-colors.scss +613 -0
- package/template/src/admin/components/tiptap-ui-primitive/button/button.scss +390 -0
- package/template/src/admin/components/tiptap-ui-primitive/button/button.tsx +158 -0
- package/template/src/admin/components/tiptap-ui-primitive/button/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/button-group/button-group.scss +89 -0
- package/template/src/admin/components/tiptap-ui-primitive/button-group/button-group.tsx +72 -0
- package/template/src/admin/components/tiptap-ui-primitive/button-group/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/card/card.scss +74 -0
- package/template/src/admin/components/tiptap-ui-primitive/card/card.tsx +79 -0
- package/template/src/admin/components/tiptap-ui-primitive/card/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss +152 -0
- package/template/src/admin/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.tsx +262 -0
- package/template/src/admin/components/tiptap-ui-primitive/dropdown-menu/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/input/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/input/input.scss +41 -0
- package/template/src/admin/components/tiptap-ui-primitive/input/input.tsx +22 -0
- package/template/src/admin/components/tiptap-ui-primitive/input-group/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/input-group/input-group.scss +225 -0
- package/template/src/admin/components/tiptap-ui-primitive/input-group/input-group.tsx +135 -0
- package/template/src/admin/components/tiptap-ui-primitive/popover/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/popover/popover.scss +64 -0
- package/template/src/admin/components/tiptap-ui-primitive/popover/popover.tsx +35 -0
- package/template/src/admin/components/tiptap-ui-primitive/separator/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/separator/separator.scss +23 -0
- package/template/src/admin/components/tiptap-ui-primitive/separator/separator.tsx +28 -0
- package/template/src/admin/components/tiptap-ui-primitive/spacer/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/spacer/spacer.tsx +24 -0
- package/template/src/admin/components/tiptap-ui-primitive/switch/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/switch/switch.scss +86 -0
- package/template/src/admin/components/tiptap-ui-primitive/switch/switch.tsx +29 -0
- package/template/src/admin/components/tiptap-ui-primitive/textarea/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/textarea/textarea.scss +42 -0
- package/template/src/admin/components/tiptap-ui-primitive/textarea/textarea.tsx +16 -0
- package/template/src/admin/components/tiptap-ui-primitive/toolbar/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/toolbar/toolbar.scss +98 -0
- package/template/src/admin/components/tiptap-ui-primitive/toolbar/toolbar.tsx +203 -0
- package/template/src/admin/components/tiptap-ui-primitive/tooltip/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/tooltip/tooltip.scss +43 -0
- package/template/src/admin/components/tiptap-ui-primitive/tooltip/tooltip.tsx +241 -0
- package/template/src/admin/hooks/use-composed-ref.ts +46 -0
- package/template/src/admin/hooks/use-cursor-visibility.ts +69 -0
- package/template/src/admin/hooks/use-element-rect.ts +166 -0
- package/template/src/admin/hooks/use-is-breakpoint.ts +35 -0
- package/template/src/admin/hooks/use-menu-navigation.ts +204 -0
- package/template/src/admin/hooks/use-scrolling.ts +75 -0
- package/template/src/admin/hooks/use-throttled-callback.ts +48 -0
- package/template/src/admin/hooks/use-tiptap-editor.ts +69 -0
- package/template/src/admin/hooks/use-unmount.ts +21 -0
- package/template/src/admin/hooks/use-window-size.ts +93 -0
- package/template/src/admin/html.ts +17 -0
- package/template/src/admin/lib/tiptap-utils.ts +652 -0
- package/template/src/admin/navigation-tree.tsx +82 -0
- package/template/src/admin/preview.ts +73 -0
- package/template/src/admin/styles/_cms-theme.scss +58 -0
- package/template/src/admin/styles/_keyframe-animations.scss +91 -0
- package/template/src/admin/styles/_variables.scss +298 -0
- package/template/src/assets/favicon.svg +1 -0
- package/template/src/assets/logo.svg +1 -0
- package/template/src/astro-env.d.ts +1 -0
- package/template/src/content.config.ts +12 -0
- package/template/src/db/bootstrap.ts +36 -0
- package/template/src/db/client.ts +7 -0
- package/template/src/db/schema.ts +45 -0
- package/template/src/documents/service.ts +178 -0
- package/template/src/documents/validation.ts +9 -0
- package/template/src/env.ts +9 -0
- package/template/src/index.ts +10 -0
- package/template/src/locales.ts +10 -0
- package/template/src/media/service.ts +120 -0
- package/template/src/navigation/service.ts +171 -0
- package/template/src/pages/[locale]/cms-preview-shell.astro +12 -0
- package/template/src/pages/cms-preview-shell.astro +5 -0
- package/template/src/publish/deploy-hook.ts +42 -0
- package/template/src/publish/record.ts +20 -0
- package/template/src/publish/service.ts +135 -0
- package/template/src/scss.d.ts +5 -0
- package/template/src/site.config.ts +7 -0
- package/template/src/sql.d.ts +4 -0
- package/template/src/starlight/cms-origin.ts +4 -0
- package/template/src/starlight/loader.ts +21 -0
- package/template/src/starlight/preview-render.ts +162 -0
- package/template/src/starlight/preview-shell.astro +14 -0
- package/template/src/starlight/render.ts +59 -0
- package/template/src/starlight/schema.ts +34 -0
- package/template/src/starlight/sidebar.ts +35 -0
- package/template/src/starlight/snapshot.ts +47 -0
- package/template/src/starlight/source.ts +26 -0
- package/template/src/starlight/tiptap.ts +29 -0
- package/template/src/styles/starlight.css +12 -0
- package/template/test-files/content.test.template.ts +82 -0
- package/template/test-files/deploy-hook.test.template.ts +32 -0
- package/template/test-files/media.test.template.ts +39 -0
- package/template/test-files/publishing.integration.test.template.ts +156 -0
- package/template/tsconfig.admin.json +18 -0
- package/template/tsconfig.json +23 -0
- package/template/worker-configuration.d.ts +15389 -0
- package/template/wrangler.jsonc +26 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "doc",
|
|
3
|
+
"content": [
|
|
4
|
+
{
|
|
5
|
+
"type": "heading",
|
|
6
|
+
"attrs": {
|
|
7
|
+
"textAlign": null,
|
|
8
|
+
"level": 1
|
|
9
|
+
},
|
|
10
|
+
"content": [
|
|
11
|
+
{
|
|
12
|
+
"type": "text",
|
|
13
|
+
"text": "Getting started"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "paragraph",
|
|
19
|
+
"attrs": {
|
|
20
|
+
"textAlign": null
|
|
21
|
+
},
|
|
22
|
+
"content": [
|
|
23
|
+
{
|
|
24
|
+
"type": "text",
|
|
25
|
+
"text": "Welcome to the "
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "text",
|
|
29
|
+
"marks": [
|
|
30
|
+
{
|
|
31
|
+
"type": "italic"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "highlight",
|
|
35
|
+
"attrs": {
|
|
36
|
+
"color": "var(--tt-color-highlight-yellow)"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"text": "Simple Editor"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "text",
|
|
44
|
+
"text": " template! This template integrates "
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "text",
|
|
48
|
+
"marks": [
|
|
49
|
+
{
|
|
50
|
+
"type": "bold"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"text": "open source"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "text",
|
|
57
|
+
"text": " UI components and Tiptap extensions licensed under "
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "text",
|
|
61
|
+
"marks": [
|
|
62
|
+
{
|
|
63
|
+
"type": "bold"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"text": "MIT"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "text",
|
|
70
|
+
"text": "."
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "paragraph",
|
|
76
|
+
"attrs": {
|
|
77
|
+
"textAlign": null
|
|
78
|
+
},
|
|
79
|
+
"content": [
|
|
80
|
+
{
|
|
81
|
+
"type": "text",
|
|
82
|
+
"text": "Integrate it by following the "
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "text",
|
|
86
|
+
"marks": [
|
|
87
|
+
{
|
|
88
|
+
"type": "link",
|
|
89
|
+
"attrs": {
|
|
90
|
+
"href": "https://tiptap.dev/docs/ui-components/templates/simple-editor",
|
|
91
|
+
"target": "_blank",
|
|
92
|
+
"rel": "noopener noreferrer nofollow",
|
|
93
|
+
"class": null
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"text": "Tiptap UI Components docs"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "text",
|
|
101
|
+
"text": " or using our CLI tool."
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "codeBlock",
|
|
107
|
+
"attrs": {
|
|
108
|
+
"language": null
|
|
109
|
+
},
|
|
110
|
+
"content": [
|
|
111
|
+
{
|
|
112
|
+
"type": "text",
|
|
113
|
+
"text": "npx @tiptap/cli init"
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "heading",
|
|
119
|
+
"attrs": {
|
|
120
|
+
"textAlign": null,
|
|
121
|
+
"level": 2
|
|
122
|
+
},
|
|
123
|
+
"content": [
|
|
124
|
+
{
|
|
125
|
+
"type": "text",
|
|
126
|
+
"text": "Features"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "blockquote",
|
|
132
|
+
"content": [
|
|
133
|
+
{
|
|
134
|
+
"type": "paragraph",
|
|
135
|
+
"attrs": {
|
|
136
|
+
"textAlign": null
|
|
137
|
+
},
|
|
138
|
+
"content": [
|
|
139
|
+
{
|
|
140
|
+
"type": "text",
|
|
141
|
+
"marks": [
|
|
142
|
+
{
|
|
143
|
+
"type": "italic"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"text": "A fully responsive rich text editor with built-in support for common formatting and layout tools. Type markdown "
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "text",
|
|
150
|
+
"marks": [
|
|
151
|
+
{
|
|
152
|
+
"type": "code"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"text": "**"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "text",
|
|
159
|
+
"marks": [
|
|
160
|
+
{
|
|
161
|
+
"type": "italic"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"text": " or use keyboard shortcuts "
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "text",
|
|
168
|
+
"marks": [
|
|
169
|
+
{
|
|
170
|
+
"type": "code"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"text": "⌘+B"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "text",
|
|
177
|
+
"text": " for "
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "text",
|
|
181
|
+
"marks": [
|
|
182
|
+
{
|
|
183
|
+
"type": "strike"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"text": "most"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "text",
|
|
190
|
+
"text": " all common markdown marks. 🪄"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "paragraph",
|
|
198
|
+
"attrs": {
|
|
199
|
+
"textAlign": "left"
|
|
200
|
+
},
|
|
201
|
+
"content": [
|
|
202
|
+
{
|
|
203
|
+
"type": "text",
|
|
204
|
+
"text": "Add images, customize alignment, and apply "
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"type": "text",
|
|
208
|
+
"marks": [
|
|
209
|
+
{
|
|
210
|
+
"type": "highlight",
|
|
211
|
+
"attrs": {
|
|
212
|
+
"color": "var(--tt-color-highlight-blue)"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"text": "advanced formatting"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"type": "text",
|
|
220
|
+
"text": " to make your writing more engaging and professional."
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"type": "image",
|
|
226
|
+
"attrs": {
|
|
227
|
+
"src": "/images/tiptap-ui-placeholder-image.jpg",
|
|
228
|
+
"alt": "placeholder-image",
|
|
229
|
+
"title": "placeholder-image"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "bulletList",
|
|
234
|
+
"content": [
|
|
235
|
+
{
|
|
236
|
+
"type": "listItem",
|
|
237
|
+
"content": [
|
|
238
|
+
{
|
|
239
|
+
"type": "paragraph",
|
|
240
|
+
"attrs": {
|
|
241
|
+
"textAlign": "left"
|
|
242
|
+
},
|
|
243
|
+
"content": [
|
|
244
|
+
{
|
|
245
|
+
"type": "text",
|
|
246
|
+
"marks": [
|
|
247
|
+
{
|
|
248
|
+
"type": "bold"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"text": "Superscript"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"type": "text",
|
|
255
|
+
"text": " (x"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"type": "text",
|
|
259
|
+
"marks": [
|
|
260
|
+
{
|
|
261
|
+
"type": "superscript"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"text": "2"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "text",
|
|
268
|
+
"text": ") and "
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"type": "text",
|
|
272
|
+
"marks": [
|
|
273
|
+
{
|
|
274
|
+
"type": "bold"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"text": "Subscript"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"type": "text",
|
|
281
|
+
"text": " (H"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"type": "text",
|
|
285
|
+
"marks": [
|
|
286
|
+
{
|
|
287
|
+
"type": "subscript"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"text": "2"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"type": "text",
|
|
294
|
+
"text": "O) for precision."
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"type": "listItem",
|
|
302
|
+
"content": [
|
|
303
|
+
{
|
|
304
|
+
"type": "paragraph",
|
|
305
|
+
"attrs": {
|
|
306
|
+
"textAlign": "left"
|
|
307
|
+
},
|
|
308
|
+
"content": [
|
|
309
|
+
{
|
|
310
|
+
"type": "text",
|
|
311
|
+
"marks": [
|
|
312
|
+
{
|
|
313
|
+
"type": "bold"
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"text": "Typographic conversion"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"type": "text",
|
|
320
|
+
"text": ": automatically convert to "
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"type": "text",
|
|
324
|
+
"marks": [
|
|
325
|
+
{
|
|
326
|
+
"type": "code"
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
"text": "->"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"type": "text",
|
|
333
|
+
"text": " an arrow "
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"type": "text",
|
|
337
|
+
"marks": [
|
|
338
|
+
{
|
|
339
|
+
"type": "bold"
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"text": "→"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"type": "text",
|
|
346
|
+
"text": "."
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"type": "paragraph",
|
|
356
|
+
"attrs": {
|
|
357
|
+
"textAlign": "left"
|
|
358
|
+
},
|
|
359
|
+
"content": [
|
|
360
|
+
{
|
|
361
|
+
"type": "text",
|
|
362
|
+
"marks": [
|
|
363
|
+
{
|
|
364
|
+
"type": "italic"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"text": "→ "
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"type": "text",
|
|
371
|
+
"marks": [
|
|
372
|
+
{
|
|
373
|
+
"type": "link",
|
|
374
|
+
"attrs": {
|
|
375
|
+
"href": "https://tiptap.dev/docs/ui-components/templates/simple-editor#features",
|
|
376
|
+
"target": "_blank",
|
|
377
|
+
"rel": "noopener noreferrer nofollow",
|
|
378
|
+
"class": null
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
"text": "Learn more"
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"type": "horizontalRule"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"type": "heading",
|
|
391
|
+
"attrs": {
|
|
392
|
+
"textAlign": "left",
|
|
393
|
+
"level": 2
|
|
394
|
+
},
|
|
395
|
+
"content": [
|
|
396
|
+
{
|
|
397
|
+
"type": "text",
|
|
398
|
+
"text": "Make it your own"
|
|
399
|
+
}
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"type": "paragraph",
|
|
404
|
+
"attrs": {
|
|
405
|
+
"textAlign": "left"
|
|
406
|
+
},
|
|
407
|
+
"content": [
|
|
408
|
+
{
|
|
409
|
+
"type": "text",
|
|
410
|
+
"text": "Switch between light and dark modes, and tailor the editor's appearance with customizable CSS to match your style."
|
|
411
|
+
}
|
|
412
|
+
]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"type": "taskList",
|
|
416
|
+
"content": [
|
|
417
|
+
{
|
|
418
|
+
"type": "taskItem",
|
|
419
|
+
"attrs": {
|
|
420
|
+
"checked": true
|
|
421
|
+
},
|
|
422
|
+
"content": [
|
|
423
|
+
{
|
|
424
|
+
"type": "paragraph",
|
|
425
|
+
"attrs": {
|
|
426
|
+
"textAlign": "left"
|
|
427
|
+
},
|
|
428
|
+
"content": [
|
|
429
|
+
{
|
|
430
|
+
"type": "text",
|
|
431
|
+
"text": "Test template"
|
|
432
|
+
}
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"type": "taskItem",
|
|
439
|
+
"attrs": {
|
|
440
|
+
"checked": false
|
|
441
|
+
},
|
|
442
|
+
"content": [
|
|
443
|
+
{
|
|
444
|
+
"type": "paragraph",
|
|
445
|
+
"attrs": {
|
|
446
|
+
"textAlign": "left"
|
|
447
|
+
},
|
|
448
|
+
"content": [
|
|
449
|
+
{
|
|
450
|
+
"type": "text",
|
|
451
|
+
"marks": [
|
|
452
|
+
{
|
|
453
|
+
"type": "link",
|
|
454
|
+
"attrs": {
|
|
455
|
+
"href": "https://tiptap.dev/docs/ui-components/templates/simple-editor",
|
|
456
|
+
"target": "_blank",
|
|
457
|
+
"rel": "noopener noreferrer nofollow",
|
|
458
|
+
"class": null
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"text": "Integrate the free template"
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
}
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"type": "paragraph",
|
|
472
|
+
"attrs": {
|
|
473
|
+
"textAlign": "left"
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
--tt-toolbar-height: 44px;
|
|
5
|
+
--tt-theme-text: var(--tt-gray-light-900);
|
|
6
|
+
|
|
7
|
+
.dark & {
|
|
8
|
+
--tt-theme-text: var(--tt-gray-dark-900);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
font-family: "Inter", sans-serif;
|
|
14
|
+
color: var(--tt-theme-text);
|
|
15
|
+
font-optical-sizing: auto;
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
padding: 0;
|
|
19
|
+
overscroll-behavior-y: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
html,
|
|
23
|
+
body {
|
|
24
|
+
overscroll-behavior-x: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
html,
|
|
28
|
+
body,
|
|
29
|
+
#root,
|
|
30
|
+
#app {
|
|
31
|
+
height: 100%;
|
|
32
|
+
background-color: var(--tt-bg-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
::-webkit-scrollbar {
|
|
36
|
+
width: 0.25rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
* {
|
|
40
|
+
scrollbar-width: thin;
|
|
41
|
+
scrollbar-color: var(--tt-scrollbar-color) transparent;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
::-webkit-scrollbar-thumb {
|
|
45
|
+
background-color: var(--tt-scrollbar-color);
|
|
46
|
+
border-radius: 9999px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
::-webkit-scrollbar-track {
|
|
50
|
+
background: transparent;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tiptap.ProseMirror {
|
|
54
|
+
font-family: "DM Sans", sans-serif;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.simple-editor-wrapper {
|
|
58
|
+
width: 100vw;
|
|
59
|
+
height: 100vh;
|
|
60
|
+
overflow: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.simple-editor-search-and-replace {
|
|
64
|
+
position: fixed;
|
|
65
|
+
top: calc(var(--tt-toolbar-height) + 0.5rem);
|
|
66
|
+
right: 0.5rem;
|
|
67
|
+
z-index: 51;
|
|
68
|
+
max-height: calc(100dvh - var(--tt-toolbar-height) - 1rem);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.simple-editor-content {
|
|
72
|
+
max-width: 648px;
|
|
73
|
+
width: 100%;
|
|
74
|
+
margin: 0 auto;
|
|
75
|
+
height: 100%;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
flex: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.simple-editor-content .tiptap.ProseMirror.simple-editor {
|
|
82
|
+
flex: 1;
|
|
83
|
+
padding: 3rem 3rem 30vh;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media screen and (max-width: 480px) {
|
|
87
|
+
.simple-editor-search-and-replace {
|
|
88
|
+
top: 0.5rem;
|
|
89
|
+
left: 0.5rem;
|
|
90
|
+
width: auto;
|
|
91
|
+
max-height: calc(100dvh - 1rem);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.simple-editor-content .tiptap.ProseMirror.simple-editor {
|
|
95
|
+
padding: 1rem 1.5rem 30vh;
|
|
96
|
+
}
|
|
97
|
+
}
|