Merge pull request #5369 from ueberdosis/develop

This commit is contained in:
Nick Perez 2024-07-24 16:49:33 +02:00 committed by GitHub
commit 8337e53167
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
192 changed files with 6696 additions and 2330 deletions

View File

@ -0,0 +1,5 @@
---
"@tiptap/core": patch
---
Adjust the `splitBlock` command to return `false` when it was unsuccessful.

View File

@ -0,0 +1,5 @@
---
"@tiptap/extension-table": patch
---
Set correct `min-width` for a table fixes #5217

View File

@ -0,0 +1,5 @@
---
"@tiptap/core": patch
---
This fixes a bug with the placeholder extension where a heading level other than the default was not considered empty, when comparing node contents, we need to consider that the node attributes are carried over for a fair comparison of content instead of attribute values

View File

@ -0,0 +1,5 @@
---
"@tiptap/extension-link": patch
---
Links were opening twive when the editor was not editable and openOnclick was true, now openOnClick setting will check if it is editable before trying to open programmatically resolves #4877

View File

@ -0,0 +1,5 @@
---
"@tiptap/extension-code-block": patch
---
code-block: on arrow down move into the next node

View File

@ -0,0 +1,5 @@
---
"@tiptap/core": patch
---
Add a check beforecreateNodeViews so that view.setProps is not called when the view has already been destroyed

View File

@ -53,6 +53,7 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
createGithubReleases: false
publish: npm run publish
title: ${{ github.ref_name == 'main' && 'Publish a new stable version' || 'Publish a new pre-release version' }}
commit: >-

View File

@ -10,6 +10,7 @@ import React, { useCallback } from 'react'
export default () => {
const editor = useEditor({
editable: true,
extensions: [
Document,
Paragraph,

View File

@ -63,7 +63,7 @@ context('/src/Nodes/Table/React/', () => {
const html = editor.getHTML()
expect(html).to.equal(
'<table style="minWidth: 25px"><colgroup><col></colgroup><tbody><tr><td colspan="1" rowspan="1"><p></p></td></tr></tbody></table>',
'<table style="min-width: 25px"><colgroup><col></colgroup><tbody><tr><td colspan="1" rowspan="1"><p></p></td></tr></tbody></table>',
)
})
})
@ -75,7 +75,7 @@ context('/src/Nodes/Table/React/', () => {
const html = editor.getHTML()
expect(html).to.equal(
'<table style="minWidth: 25px"><colgroup><col></colgroup><tbody><tr><th colspan="1" rowspan="1"><p></p></th></tr></tbody></table>',
'<table style="min-width: 25px"><colgroup><col></colgroup><tbody><tr><th colspan="1" rowspan="1"><p></p></th></tr></tbody></table>',
)
})
})

View File

@ -62,7 +62,7 @@ context('/src/Nodes/Table/Vue/', () => {
const html = editor.getHTML()
expect(html).to.equal('<table style="minWidth: 25px"><colgroup><col></colgroup><tbody><tr><td colspan="1" rowspan="1"><p></p></td></tr></tbody></table>')
expect(html).to.equal('<table style="min-width: 25px"><colgroup><col></colgroup><tbody><tr><td colspan="1" rowspan="1"><p></p></td></tr></tbody></table>')
})
})
@ -72,7 +72,7 @@ context('/src/Nodes/Table/Vue/', () => {
const html = editor.getHTML()
expect(html).to.equal('<table style="minWidth: 25px"><colgroup><col></colgroup><tbody><tr><th colspan="1" rowspan="1"><p></p></th></tr></tbody></table>')
expect(html).to.equal('<table style="min-width: 25px"><colgroup><col></colgroup><tbody><tr><th colspan="1" rowspan="1"><p></p></th></tr></tbody></table>')
})
})

5854
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- 4cca382: Make sure that atoms are used in-full without cutting the content. Node size for atoms is 1 which causes text to be cut unexpectedly.
- 3b67e8a: This changes the typing to not declare types on all HTMLElements, just a local one with the editor instance attached
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- 07f4c03: There was a bug where doing a `.configure` on an extension, node or mark would overwrite the extensions options instead of being merged with the default options.
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/core",
"description": "headless rich text editor",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -32,10 +32,10 @@
"dist"
],
"devDependencies": {
"@tiptap/pm": "^2.5.1"
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/pm": "^2.5.1"
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -39,10 +39,8 @@ import { isFunction } from './utilities/isFunction.js'
export * as extensions from './extensions/index.js'
declare global {
interface HTMLElement {
editor?: Editor;
}
export interface TiptapEditorHTMLElement extends HTMLElement {
editor?: Editor
}
export class Editor extends EventEmitter<EditorEvents> {
@ -342,7 +340,7 @@ export class Editor extends EventEmitter<EditorEvents> {
// Lets store the editor instance in the DOM element.
// So well have access to it for tests.
const dom = this.view.dom as HTMLElement
const dom = this.view.dom as TiptapEditorHTMLElement
dom.editor = this
}
@ -351,6 +349,10 @@ export class Editor extends EventEmitter<EditorEvents> {
* Creates all node views.
*/
public createNodeViews(): void {
if (this.view.isDestroyed) {
return
}
this.view.setProps({
nodeViews: this.extensionManager.nodeViews,
})
@ -406,6 +408,11 @@ export class Editor extends EventEmitter<EditorEvents> {
const state = this.state.apply(transaction)
const selectionHasChanged = !this.state.selection.eq(state.selection)
this.emit('beforeTransaction', {
editor: this,
transaction,
nextState: state,
})
this.view.updateState(state)
this.emit('transaction', {
editor: this,

View File

@ -459,8 +459,8 @@ export class Extension<Options = any, Storage = any> {
// with different calls of `configure`
const extension = this.extend({
...this.config,
addOptions() {
return mergeDeep(this.parent?.() || {}, options) as Options
addOptions: () => {
return mergeDeep(this.options as Record<string, any>, options) as Options
},
})

View File

@ -591,8 +591,8 @@ export class Mark<Options = any, Storage = any> {
// with different calls of `configure`
const extension = this.extend({
...this.config,
addOptions() {
return mergeDeep(this.parent?.() || {}, options) as Options
addOptions: () => {
return mergeDeep(this.options as Record<string, any>, options) as Options
},
})

View File

@ -782,8 +782,8 @@ export class Node<Options = any, Storage = any> {
// with different calls of `configure`
const extension = this.extend({
...this.config,
addOptions() {
return mergeDeep(this.parent?.() || {}, options) as Options
addOptions: () => {
return mergeDeep(this.options as Record<string, any>, options) as Options
},
})

View File

@ -61,13 +61,8 @@ export const splitBlock: RawCommands['splitBlock'] = ({ keepMarks = true } = {})
return false
}
if (dispatch) {
const atEnd = $to.parentOffset === $to.parent.content.size
if (selection instanceof TextSelection) {
tr.deleteSelection()
}
const deflt = $from.depth === 0
? undefined
: defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)))
@ -99,7 +94,12 @@ export const splitBlock: RawCommands['splitBlock'] = ({ keepMarks = true } = {})
: undefined
}
if (dispatch) {
if (can) {
if (selection instanceof TextSelection) {
tr.deleteSelection()
}
tr.split(tr.mapping.map($from.pos), 1, types)
if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) {
@ -119,5 +119,5 @@ export const splitBlock: RawCommands['splitBlock'] = ({ keepMarks = true } = {})
tr.scrollIntoView()
}
return true
return can
}

View File

@ -24,7 +24,7 @@ export const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => {
|| node.textContent
|| '%leaf%'
textBefore += chunk.slice(0, Math.max(0, sliceEndPos - pos))
textBefore += node.isAtom ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos))
},
)

View File

@ -1,7 +1,7 @@
import { Node as ProseMirrorNode } from '@tiptap/pm/model'
export function isNodeEmpty(node: ProseMirrorNode): boolean {
const defaultContent = node.type.createAndFill()
const defaultContent = node.type.createAndFill(node.attrs)
if (!defaultContent) {
return false

View File

@ -1,5 +1,8 @@
import {
Mark as ProseMirrorMark, Node as ProseMirrorNode, NodeType, ParseOptions,
Mark as ProseMirrorMark,
Node as ProseMirrorNode,
NodeType,
ParseOptions,
} from '@tiptap/pm/model'
import { EditorState, Transaction } from '@tiptap/pm/state'
import {
@ -14,266 +17,265 @@ import {
import { Mark } from './Mark.js'
import { Node } from './Node.js'
export type AnyConfig = ExtensionConfig | NodeConfig | MarkConfig
export type AnyExtension = Extension | Node | Mark
export type Extensions = AnyExtension[]
export type AnyConfig = ExtensionConfig | NodeConfig | MarkConfig;
export type AnyExtension = Extension | Node | Mark;
export type Extensions = AnyExtension[];
export type ParentConfig<T> = Partial<{
[P in keyof T]: Required<T>[P] extends (...args: any) => any
? (...args: Parameters<Required<T>[P]>) => ReturnType<Required<T>[P]>
: T[P]
}>
: T[P];
}>;
export type Primitive = null | undefined | string | number | boolean | symbol | bigint
export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
export type RemoveThis<T> = T extends (...args: any) => any
? (...args: Parameters<T>) => ReturnType<T>
: T
: T;
export type MaybeReturnType<T> = T extends (...args: any) => any ? ReturnType<T> : T
export type MaybeReturnType<T> = T extends (...args: any) => any ? ReturnType<T> : T;
export type MaybeThisParameterType<T> = Exclude<T, Primitive> extends (...args: any) => any
? ThisParameterType<Exclude<T, Primitive>>
: any
: any;
export interface EditorEvents {
beforeCreate: { editor: Editor }
create: { editor: Editor }
beforeCreate: { editor: Editor };
create: { editor: Editor };
contentError: {
editor: Editor,
error: Error,
editor: Editor;
error: Error;
/**
* If called, will re-initialize the editor with the collaboration extension removed.
* This will prevent syncing back deletions of content not present in the current schema.
*/
disableCollaboration: () => void
}
update: { editor: Editor; transaction: Transaction }
selectionUpdate: { editor: Editor; transaction: Transaction }
transaction: { editor: Editor; transaction: Transaction }
focus: { editor: Editor; event: FocusEvent; transaction: Transaction }
blur: { editor: Editor; event: FocusEvent; transaction: Transaction }
destroy: void
disableCollaboration: () => void;
};
update: { editor: Editor; transaction: Transaction };
selectionUpdate: { editor: Editor; transaction: Transaction };
beforeTransaction: { editor: Editor; transaction: Transaction; nextState: EditorState };
transaction: { editor: Editor; transaction: Transaction };
focus: { editor: Editor; event: FocusEvent; transaction: Transaction };
blur: { editor: Editor; event: FocusEvent; transaction: Transaction };
destroy: void;
}
export type EnableRules = (AnyExtension | string)[] | boolean
export type EnableRules = (AnyExtension | string)[] | boolean;
export interface EditorOptions {
element: Element
content: Content
extensions: Extensions
injectCSS: boolean
injectNonce: string | undefined
autofocus: FocusPosition
editable: boolean
editorProps: EditorProps
parseOptions: ParseOptions
element: Element;
content: Content;
extensions: Extensions;
injectCSS: boolean;
injectNonce: string | undefined;
autofocus: FocusPosition;
editable: boolean;
editorProps: EditorProps;
parseOptions: ParseOptions;
coreExtensionOptions?: {
clipboardTextSerializer?: {
blockSeparator?: string
}
}
enableInputRules: EnableRules
enablePasteRules: EnableRules
enableCoreExtensions: boolean
blockSeparator?: string;
};
};
enableInputRules: EnableRules;
enablePasteRules: EnableRules;
enableCoreExtensions: boolean;
/**
* If `true`, the editor will check the content for errors on initialization.
* Emitting the `contentError` event if the content is invalid.
* Which can be used to show a warning or error message to the user.
* @default false
*/
enableContentCheck: boolean
onBeforeCreate: (props: EditorEvents['beforeCreate']) => void
onCreate: (props: EditorEvents['create']) => void
enableContentCheck: boolean;
onBeforeCreate: (props: EditorEvents['beforeCreate']) => void;
onCreate: (props: EditorEvents['create']) => void;
/**
* Called when the editor encounters an error while parsing the content.
* Only enabled if `enableContentCheck` is `true`.
*/
onContentError: (props: EditorEvents['contentError']) => void
onUpdate: (props: EditorEvents['update']) => void
onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void
onTransaction: (props: EditorEvents['transaction']) => void
onFocus: (props: EditorEvents['focus']) => void
onBlur: (props: EditorEvents['blur']) => void
onDestroy: (props: EditorEvents['destroy']) => void
onContentError: (props: EditorEvents['contentError']) => void;
onUpdate: (props: EditorEvents['update']) => void;
onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void;
onTransaction: (props: EditorEvents['transaction']) => void;
onFocus: (props: EditorEvents['focus']) => void;
onBlur: (props: EditorEvents['blur']) => void;
onDestroy: (props: EditorEvents['destroy']) => void;
}
export type HTMLContent = string
export type HTMLContent = string;
export type JSONContent = {
type?: string
attrs?: Record<string, any>
content?: JSONContent[]
type?: string;
attrs?: Record<string, any>;
content?: JSONContent[];
marks?: {
type: string
attrs?: Record<string, any>
[key: string]: any
}[]
text?: string
[key: string]: any
}
type: string;
attrs?: Record<string, any>;
[key: string]: any;
}[];
text?: string;
[key: string]: any;
};
export type Content = HTMLContent | JSONContent | JSONContent[] | null
export type Content = HTMLContent | JSONContent | JSONContent[] | null;
export type CommandProps = {
editor: Editor
tr: Transaction
commands: SingleCommands
can: () => CanCommands
chain: () => ChainedCommands
state: EditorState
view: EditorView
dispatch: ((args?: any) => any) | undefined
}
editor: Editor;
tr: Transaction;
commands: SingleCommands;
can: () => CanCommands;
chain: () => ChainedCommands;
state: EditorState;
view: EditorView;
dispatch: ((args?: any) => any) | undefined;
};
export type Command = (props: CommandProps) => boolean
export type Command = (props: CommandProps) => boolean;
export type CommandSpec = (...args: any[]) => Command
export type CommandSpec = (...args: any[]) => Command;
export type KeyboardShortcutCommand = (props: { editor: Editor }) => boolean
export type KeyboardShortcutCommand = (props: { editor: Editor }) => boolean;
export type Attribute = {
default?: any
rendered?: boolean
renderHTML?: ((attributes: Record<string, any>) => Record<string, any> | null) | null
parseHTML?: ((element: HTMLElement) => any | null) | null
keepOnSplit?: boolean
isRequired?: boolean
}
default?: any;
rendered?: boolean;
renderHTML?: ((attributes: Record<string, any>) => Record<string, any> | null) | null;
parseHTML?: ((element: HTMLElement) => any | null) | null;
keepOnSplit?: boolean;
isRequired?: boolean;
};
export type Attributes = {
[key: string]: Attribute
}
[key: string]: Attribute;
};
export type ExtensionAttribute = {
type: string
name: string
attribute: Required<Attribute>
}
type: string;
name: string;
attribute: Required<Attribute>;
};
export type GlobalAttributes = {
/**
* The node & mark types this attribute should be applied to.
*/
types: string[]
types: string[];
/**
* The attributes to add to the node or mark types.
*/
attributes: {
[key: string]: Attribute
}
}[]
attributes: Record<string, Attribute | undefined>;
}[];
export type PickValue<T, K extends keyof T> = T[K]
export type PickValue<T, K extends keyof T> = T[K];
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
k: infer I,
k: infer I
) => void
? I
: never
: never;
export type Diff<T extends keyof any, U extends keyof any> = ({ [P in T]: P } & {
[P in U]: never
} & { [x: string]: never })[T]
[P in U]: never;
} & { [x: string]: never })[T];
export type Overwrite<T, U> = Pick<T, Diff<keyof T, keyof U>> & U
export type Overwrite<T, U> = Pick<T, Diff<keyof T, keyof U>> & U;
export type ValuesOf<T> = T[keyof T]
export type ValuesOf<T> = T[keyof T];
export type KeysWithTypeOf<T, Type> = { [P in keyof T]: T[P] extends Type ? P : never }[keyof T]
export type KeysWithTypeOf<T, Type> = { [P in keyof T]: T[P] extends Type ? P : never }[keyof T];
export type DecorationWithType = Decoration & {
type: NodeType
}
type: NodeType;
};
export type NodeViewProps = {
editor: Editor
node: ProseMirrorNode
decorations: DecorationWithType[]
selected: boolean
extension: Node
getPos: () => number
updateAttributes: (attributes: Record<string, any>) => void
deleteNode: () => void
}
editor: Editor;
node: ProseMirrorNode;
decorations: DecorationWithType[];
selected: boolean;
extension: Node;
getPos: () => number;
updateAttributes: (attributes: Record<string, any>) => void;
deleteNode: () => void;
};
export interface NodeViewRendererOptions {
stopEvent: ((props: { event: Event }) => boolean) | null
stopEvent: ((props: { event: Event }) => boolean) | null;
ignoreMutation:
| ((props: { mutation: MutationRecord | { type: 'selection'; target: Element } }) => boolean)
| null
contentDOMElementTag: string
| null;
contentDOMElementTag: string;
}
export type NodeViewRendererProps = {
editor: Editor
node: ProseMirrorNode
getPos: (() => number) | boolean
HTMLAttributes: Record<string, any>
decorations: Decoration[]
extension: Node
}
editor: Editor;
node: ProseMirrorNode;
getPos: (() => number) | boolean;
HTMLAttributes: Record<string, any>;
decorations: Decoration[];
extension: Node;
};
export type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView | {}
export type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView | {};
export type AnyCommands = Record<string, (...args: any[]) => Command>
export type AnyCommands = Record<string, (...args: any[]) => Command>;
export type UnionCommands<T = Command> = UnionToIntersection<
ValuesOf<Pick<Commands<T>, KeysWithTypeOf<Commands<T>, {}>>>
>
>;
export type RawCommands = {
[Item in keyof UnionCommands]: UnionCommands<Command>[Item]
}
[Item in keyof UnionCommands]: UnionCommands<Command>[Item];
};
export type SingleCommands = {
[Item in keyof UnionCommands]: UnionCommands<boolean>[Item]
}
[Item in keyof UnionCommands]: UnionCommands<boolean>[Item];
};
export type ChainedCommands = {
[Item in keyof UnionCommands]: UnionCommands<ChainedCommands>[Item]
[Item in keyof UnionCommands]: UnionCommands<ChainedCommands>[Item];
} & {
run: () => boolean
}
run: () => boolean;
};
export type CanCommands = SingleCommands & { chain: () => ChainedCommands }
export type CanCommands = SingleCommands & { chain: () => ChainedCommands };
export type FocusPosition = 'start' | 'end' | 'all' | number | boolean | null
export type FocusPosition = 'start' | 'end' | 'all' | number | boolean | null;
export type Range = {
from: number
to: number
}
from: number;
to: number;
};
export type NodeRange = {
node: ProseMirrorNode
from: number
to: number
}
node: ProseMirrorNode;
from: number;
to: number;
};
export type MarkRange = {
mark: ProseMirrorMark
from: number
to: number
}
mark: ProseMirrorMark;
from: number;
to: number;
};
export type Predicate = (node: ProseMirrorNode) => boolean
export type Predicate = (node: ProseMirrorNode) => boolean;
export type NodeWithPos = {
node: ProseMirrorNode
pos: number
}
node: ProseMirrorNode;
pos: number;
};
export type TextSerializer = (props: {
node: ProseMirrorNode
pos: number
parent: ProseMirrorNode
index: number
range: Range
}) => string
node: ProseMirrorNode;
pos: number;
parent: ProseMirrorNode;
index: number;
range: Range;
}) => string;
export type ExtendedRegExpMatchArray = RegExpMatchArray & {
data?: Record<string, any>
}
data?: Record<string, any>;
};
export type Dispatch = ((args?: any) => any) | undefined
export type Dispatch = ((args?: any) => any) | undefined;

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-blockquote",
"description": "blockquote extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-bold",
"description": "bold extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-bubble-menu",
"description": "bubble-menu extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -38,12 +38,12 @@
},
"sideEffects": false,
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"scripts": {
"clean": "rm -rf dist",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-bullet-list",
"description": "bullet list extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-character-count",
"description": "font family extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,42 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/extension-code-block@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/extension-code-block@2.5.4
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/extension-code-block@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/extension-code-block@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-code-block-lowlight",
"description": "code block extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,14 +29,14 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/extension-code-block": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/extension-code-block": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/extension-code-block": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/extension-code-block": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-code-block",
"description": "code block extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,10 @@
import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core'
import { Plugin, PluginKey, TextSelection } from '@tiptap/pm/state'
import {
Plugin,
PluginKey,
Selection,
TextSelection,
} from '@tiptap/pm/state'
export interface CodeBlockOptions {
/**
@ -222,7 +227,10 @@ export const CodeBlock = Node.create<CodeBlockOptions>({
const nodeAfter = doc.nodeAt(after)
if (nodeAfter) {
return false
return editor.commands.command(({ tr }) => {
tr.setSelection(Selection.near(doc.resolve(after)))
return true
})
}
return editor.commands.exitCode()

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-code",
"description": "code extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-collaboration-cursor",
"description": "collaboration cursor extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,11 +29,11 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/core": "^2.5.5",
"y-prosemirror": "^1.2.9"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/core": "^2.5.5",
"y-prosemirror": "^1.2.6"
},
"repository": {

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-collaboration",
"description": "collaboration extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,13 +29,13 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1",
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5",
"y-prosemirror": "^1.2.9"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1",
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5",
"y-prosemirror": "^1.2.6"
},
"repository": {

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/extension-text-style@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/extension-text-style@2.5.4
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/extension-text-style@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/extension-text-style@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-color",
"description": "text color extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/extension-text-style": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/extension-text-style": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/extension-text-style": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/extension-text-style": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-document",
"description": "document extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-dropcursor",
"description": "dropcursor extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-floating-menu",
"description": "floating-menu extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"dependencies": {
"tippy.js": "^6.3.7"

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-focus",
"description": "focus extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/extension-text-style@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/extension-text-style@2.5.4
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/extension-text-style@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/extension-text-style@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-font-family",
"description": "font family extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/extension-text-style": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/extension-text-style": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/extension-text-style": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/extension-text-style": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-gapcursor",
"description": "gapcursor extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-hard-break",
"description": "hard break extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-heading",
"description": "heading extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-highlight",
"description": "highlight extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-history",
"description": "history extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,38 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-horizontal-rule",
"description": "horizontal rule extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,12 +29,12 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-image",
"description": "image extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,34 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
## 2.5.3
### Patch Changes
- @tiptap/core@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-italic",
"description": "italic extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -29,10 +29,10 @@
"dist"
],
"devDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1"
"@tiptap/core": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -1,5 +1,39 @@
# Change Log
## 2.5.5
### Patch Changes
- Updated dependencies [4cca382]
- Updated dependencies [3b67e8a]
- @tiptap/core@2.5.5
- @tiptap/pm@2.5.5
## 2.5.4
### Patch Changes
- dd7f9ac: There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
- Updated dependencies [dd7f9ac]
- @tiptap/core@2.5.4
- @tiptap/pm@2.5.4
## 2.5.3
### Patch Changes
- a473826: Make openOnClick backwards compatible with previous `whenNotEditable` value, this is now the default and is deprecated
- @tiptap/core@2.5.3
- @tiptap/pm@2.5.3
## 2.5.2
### Patch Changes
- Updated dependencies [07f4c03]
- @tiptap/core@2.5.2
- @tiptap/pm@2.5.2
## 2.5.1
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-link",
"description": "link extension for tiptap",
"version": "2.5.1",
"version": "2.5.5",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@ -32,12 +32,12 @@
"linkifyjs": "^4.1.0"
},
"devDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"peerDependencies": {
"@tiptap/core": "^2.5.1",
"@tiptap/pm": "^2.5.1"
"@tiptap/core": "^2.5.5",
"@tiptap/pm": "^2.5.5"
},
"repository": {
"type": "git",

View File

@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [

View File

@ -3,7 +3,7 @@ import { MarkType } from '@tiptap/pm/model'
import { Plugin, PluginKey } from '@tiptap/pm/state'
type ClickHandlerOptions = {
type: MarkType
type: MarkType;
}
export function clickHandler(options: ClickHandlerOptions): Plugin {
@ -15,6 +15,10 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {
return false
}
if (!view.editable) {
return false
}
let a = event.target as HTMLElement
const els = []

View File

@ -27,6 +27,11 @@ export interface LinkProtocolOptions {
export const pasteRegex = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi
/**
* @deprecated The default behavior is now to open links when the editor is not editable.
*/
type DeprecatedOpenWhenNotEditable = 'whenNotEditable';
export interface LinkOptions {
/**
* If enabled, the extension will automatically add links as you type.
@ -51,9 +56,8 @@ export interface LinkOptions {
* If enabled, links will be opened on click.
* @default true
* @example false
* @example 'whenNotEditable'
*/
openOnClick: boolean
openOnClick: boolean | DeprecatedOpenWhenNotEditable
/**
* Adds a link to the current selection if the pasted content only contains an url.
* @default true
@ -269,7 +273,7 @@ export const Link = Mark.create<LinkOptions>({
)
}
if (this.options.openOnClick) {
if (this.options.openOnClick === true) {
plugins.push(
clickHandler({
type: this.type,

Some files were not shown because too many files have changed in this diff Show More