diff --git a/.changeset/orange-spoons-rescue.md b/.changeset/orange-spoons-rescue.md new file mode 100644 index 00000000000..3ab081e5a4c --- /dev/null +++ b/.changeset/orange-spoons-rescue.md @@ -0,0 +1,5 @@ +--- +'@tiptap/extension-text-style': minor +--- + +Add `toggleTextStyle` command and add typings for the commands parameters based on the installed extensions that include `textStyle` diff --git a/.changeset/smart-turtles-happen.md b/.changeset/smart-turtles-happen.md new file mode 100644 index 00000000000..b8976b6c88b --- /dev/null +++ b/.changeset/smart-turtles-happen.md @@ -0,0 +1,5 @@ +--- +'@tiptap/extension-background-color': patch +--- + +Adds a new extension, `extension-background-color` which can color the background of `textStyle`s diff --git a/.changeset/twelve-paws-work.md b/.changeset/twelve-paws-work.md new file mode 100644 index 00000000000..6168596d8ad --- /dev/null +++ b/.changeset/twelve-paws-work.md @@ -0,0 +1,5 @@ +--- +'@tiptap/extension-line-height': patch +--- + +This adds the `extension-line-height` package which controls the line-height of text like `font-size`, `font-family`, etc. diff --git a/demos/src/Commands/Cut/React/index.jsx b/demos/src/Commands/Cut/React/index.jsx index 84adce0f8af..67a5980a16d 100644 --- a/demos/src/Commands/Cut/React/index.jsx +++ b/demos/src/Commands/Cut/React/index.jsx @@ -1,8 +1,7 @@ import './styles.scss' -import { Color } from '@tiptap/extension-color' import ListItem from '@tiptap/extension-list-item' -import TextStyle from '@tiptap/extension-text-style' +import { Color, TextStyle } from '@tiptap/extension-text-style' import { EditorContent, useEditor } from '@tiptap/react' import StarterKit from '@tiptap/starter-kit' import React, { useCallback } from 'react' diff --git a/demos/src/Commands/InsertContent/React/index.jsx b/demos/src/Commands/InsertContent/React/index.jsx index 44d320aec92..2032f0fb226 100644 --- a/demos/src/Commands/InsertContent/React/index.jsx +++ b/demos/src/Commands/InsertContent/React/index.jsx @@ -1,10 +1,9 @@ import './styles.scss' -import { Color } from '@tiptap/extension-color' import { Image } from '@tiptap/extension-image' import Link from '@tiptap/extension-link' import ListItem from '@tiptap/extension-list-item' -import TextStyle from '@tiptap/extension-text-style' +import { Color, TextStyle } from '@tiptap/extension-text-style' import { EditorProvider, useCurrentEditor } from '@tiptap/react' import StarterKit from '@tiptap/starter-kit' import React, { useCallback } from 'react' diff --git a/demos/src/Commands/SetContent/React/index.jsx b/demos/src/Commands/SetContent/React/index.jsx index 854731e45af..2ce131d0668 100644 --- a/demos/src/Commands/SetContent/React/index.jsx +++ b/demos/src/Commands/SetContent/React/index.jsx @@ -1,9 +1,8 @@ import './styles.scss' -import { Color } from '@tiptap/extension-color' import ListItem from '@tiptap/extension-list-item' import Mentions from '@tiptap/extension-mention' -import TextStyle from '@tiptap/extension-text-style' +import { Color , TextStyle } from '@tiptap/extension-text-style' import { EditorProvider } from '@tiptap/react' import StarterKit from '@tiptap/starter-kit' import React from 'react' diff --git a/demos/src/Examples/Default/React/index.jsx b/demos/src/Examples/Default/React/index.jsx index 24194ee1c99..6f410db6fbc 100644 --- a/demos/src/Examples/Default/React/index.jsx +++ b/demos/src/Examples/Default/React/index.jsx @@ -1,8 +1,7 @@ import './styles.scss' -import { Color } from '@tiptap/extension-color' import ListItem from '@tiptap/extension-list-item' -import TextStyle from '@tiptap/extension-text-style' +import { Color , TextStyle } from '@tiptap/extension-text-style' import { EditorProvider, useCurrentEditor, useEditorState } from '@tiptap/react' import StarterKit from '@tiptap/starter-kit' import React from 'react' diff --git a/demos/src/Examples/Default/Svelte/index.svelte b/demos/src/Examples/Default/Svelte/index.svelte index 6e915f09d6e..a0cdc590ffa 100644 --- a/demos/src/Examples/Default/Svelte/index.svelte +++ b/demos/src/Examples/Default/Svelte/index.svelte @@ -1,9 +1,9 @@ + + diff --git a/demos/src/Extensions/Color/React/index.jsx b/demos/src/Extensions/Color/React/index.tsx similarity index 96% rename from demos/src/Extensions/Color/React/index.jsx rename to demos/src/Extensions/Color/React/index.tsx index e19b94f5c1f..5e94d9b9264 100644 --- a/demos/src/Extensions/Color/React/index.jsx +++ b/demos/src/Extensions/Color/React/index.tsx @@ -1,10 +1,9 @@ import './styles.scss' -import { Color } from '@tiptap/extension-color' import Document from '@tiptap/extension-document' import Paragraph from '@tiptap/extension-paragraph' import Text from '@tiptap/extension-text' -import TextStyle from '@tiptap/extension-text-style' +import { Color, TextStyle } from '@tiptap/extension-text-style' import { EditorContent, useEditor, useEditorState } from '@tiptap/react' import React from 'react' @@ -42,7 +41,7 @@ export default () => {