mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
Move to TanStack Start from Next.js (#184)
This commit is contained in:
45
web/shared/la-editor/extensions/index.ts
Normal file
45
web/shared/la-editor/extensions/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { StarterKit } from "./starter-kit"
|
||||
import { TaskList } from "./task-list"
|
||||
import { TaskItem } from "./task-item"
|
||||
import { HorizontalRule } from "./horizontal-rule"
|
||||
import { Blockquote } from "./blockquote/blockquote"
|
||||
import { SlashCommand } from "./slash-command"
|
||||
import { Heading } from "./heading"
|
||||
import { Link } from "./link"
|
||||
import { CodeBlockLowlight } from "./code-block-lowlight"
|
||||
import { Selection } from "./selection"
|
||||
import { Code } from "./code"
|
||||
import { Paragraph } from "./paragraph"
|
||||
import { BulletList } from "./bullet-list"
|
||||
import { OrderedList } from "./ordered-list"
|
||||
import { Dropcursor } from "./dropcursor"
|
||||
|
||||
export interface ExtensionOptions {
|
||||
placeholder?: string
|
||||
}
|
||||
|
||||
export const createExtensions = ({
|
||||
placeholder = "Start typing...",
|
||||
}: ExtensionOptions) => [
|
||||
Heading,
|
||||
Code,
|
||||
Link,
|
||||
TaskList,
|
||||
TaskItem,
|
||||
Selection,
|
||||
Paragraph,
|
||||
Dropcursor,
|
||||
Blockquote,
|
||||
BulletList,
|
||||
OrderedList,
|
||||
SlashCommand,
|
||||
HorizontalRule,
|
||||
CodeBlockLowlight,
|
||||
StarterKit.configure({
|
||||
placeholder: {
|
||||
placeholder: () => placeholder,
|
||||
},
|
||||
}),
|
||||
]
|
||||
|
||||
export default createExtensions
|
||||
Reference in New Issue
Block a user