-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
103 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default function Heading() { | ||
return ( | ||
<h1 className="home-headline"> | ||
Tiptiz suits <br /> | ||
based on <br /> | ||
Tiptap & ProseMirror | ||
</h1> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use client" | ||
import type { ReactNode } from "react" | ||
|
||
import Document from "@tiptap/extension-document" | ||
import DropCursor from "@tiptap/extension-dropcursor" | ||
import History from "@tiptap/extension-history" | ||
import { EditorConsumer, EditorContent, EditorContext, useEditor } from "@tiptap/react" | ||
import TiptizSuites from "@tiptiz/rich-suits" | ||
|
||
const extensions = [ | ||
Document, | ||
DropCursor, | ||
History, | ||
TiptizSuites.configure({ | ||
// CodeBlockShiki: false | ||
}) | ||
] | ||
export default function TiptapEditor({ children }: { children: ReactNode }) { | ||
const editor = useEditor({ | ||
extensions, | ||
immediatelyRender: false, | ||
content: "<h1>Tiptiz Editor</h1>" | ||
}) | ||
return ( | ||
<EditorContext.Provider value={{ editor }}> | ||
{children} | ||
<EditorConsumer> | ||
{({ editor: currentEditor }) => <EditorContent editor={currentEditor} />} | ||
</EditorConsumer> | ||
</EditorContext.Provider> | ||
) | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.home-headline { | ||
font-size: min(4rem, max(8vw, 2rem)); | ||
font-weight: 700; | ||
font-feature-settings: initial; | ||
letter-spacing: -0.12rem; | ||
margin-left: -0.2rem; | ||
margin-top: 3.4rem; | ||
line-height: 1.1; | ||
color: transparent; | ||
background-image: linear-gradient(166deg, #003b76, #07c160); | ||
background-clip: text; | ||
} | ||
|
||
.dark .home-headline { | ||
background-image: linear-gradient(166deg, #2694ff, #00d164); | ||
} | ||
|
||
.home-headline::selection { | ||
color: #444444; | ||
} | ||
.dark .home-headline::selection { | ||
color: #dcdcdc; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# index page En | ||
--- | ||
title: "Home page" | ||
--- | ||
import "@/components/page-index/index.css" | ||
import Heading from "@/components/page-index/Heading" | ||
|
||
## introduction En | ||
<Heading/> | ||
|
||
```bash | ||
pnpm add @tiptiz/editor-icons | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
--- | ||
title: "首页" | ||
--- | ||
import Index from "@/components/pages/Index" | ||
import "@/components/page-index/index.css" | ||
import Heading from "@/components/page-index/Heading" | ||
import TiptapEditor from "@/components/page-index/TiptapEditor" | ||
|
||
<Index/> | ||
<Heading/> | ||
|
||
```bash | ||
pnpm add @tiptiz/editor-icons | ||
``` | ||
|
||
<TiptapEditor /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "@tiptiz/markdown-suits", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"repository": "https://github.com/tiptiz/editor.git", | ||
"author": "aolyang <[email protected]>", | ||
"exports": { | ||
".": { | ||
"import": "./src/index.ts" | ||
} | ||
}, | ||
"devDependencies": { | ||
}, | ||
"peerDependencies": { | ||
} | ||
} |
Empty file.