mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 03:39:01 +08:00
docs: update link in input and paste rules docstrings (#5771)
This commit is contained in:
parent
4f4a72f855
commit
9386de5087
@ -29,7 +29,7 @@ export type PasteRuleFinder =
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Paste rules are used to react to pasted content.
|
* Paste rules are used to react to pasted content.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#paste-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules
|
||||||
*/
|
*/
|
||||||
export class PasteRule {
|
export class PasteRule {
|
||||||
find: PasteRuleFinder
|
find: PasteRuleFinder
|
||||||
|
@ -8,7 +8,7 @@ import { callOrReturn } from '../utilities/callOrReturn.js'
|
|||||||
/**
|
/**
|
||||||
* Build an input rule that adds a mark when the
|
* Build an input rule that adds a mark when the
|
||||||
* matched text is typed into it.
|
* matched text is typed into it.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#input-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules
|
||||||
*/
|
*/
|
||||||
export function markInputRule(config: {
|
export function markInputRule(config: {
|
||||||
find: InputRuleFinder
|
find: InputRuleFinder
|
||||||
|
@ -7,7 +7,7 @@ import { callOrReturn } from '../utilities/callOrReturn.js'
|
|||||||
/**
|
/**
|
||||||
* Build an input rule that adds a node when the
|
* Build an input rule that adds a node when the
|
||||||
* matched text is typed into it.
|
* matched text is typed into it.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#input-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules
|
||||||
*/
|
*/
|
||||||
export function nodeInputRule(config: {
|
export function nodeInputRule(config: {
|
||||||
/**
|
/**
|
||||||
|
@ -3,7 +3,7 @@ import { InputRule, InputRuleFinder } from '../InputRule.js'
|
|||||||
/**
|
/**
|
||||||
* Build an input rule that replaces text when the
|
* Build an input rule that replaces text when the
|
||||||
* matched text is typed into it.
|
* matched text is typed into it.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#input-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules
|
||||||
*/
|
*/
|
||||||
export function textInputRule(config: {
|
export function textInputRule(config: {
|
||||||
find: InputRuleFinder,
|
find: InputRuleFinder,
|
||||||
|
@ -9,7 +9,7 @@ import { callOrReturn } from '../utilities/callOrReturn.js'
|
|||||||
* matched text is typed into it. When using a regular expresion you’ll
|
* matched text is typed into it. When using a regular expresion you’ll
|
||||||
* probably want the regexp to start with `^`, so that the pattern can
|
* probably want the regexp to start with `^`, so that the pattern can
|
||||||
* only occur at the start of a textblock.
|
* only occur at the start of a textblock.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#input-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules
|
||||||
*/
|
*/
|
||||||
export function textblockTypeInputRule(config: {
|
export function textblockTypeInputRule(config: {
|
||||||
find: InputRuleFinder
|
find: InputRuleFinder
|
||||||
|
@ -19,7 +19,7 @@ import { callOrReturn } from '../utilities/callOrReturn.js'
|
|||||||
* two nodes. You can pass a join predicate, which takes a regular
|
* two nodes. You can pass a join predicate, which takes a regular
|
||||||
* expression match and the node before the wrapped node, and can
|
* expression match and the node before the wrapped node, and can
|
||||||
* return a boolean to indicate whether a join should happen.
|
* return a boolean to indicate whether a join should happen.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#input-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules
|
||||||
*/
|
*/
|
||||||
export function wrappingInputRule(config: {
|
export function wrappingInputRule(config: {
|
||||||
find: InputRuleFinder,
|
find: InputRuleFinder,
|
||||||
|
@ -8,7 +8,7 @@ import { callOrReturn } from '../utilities/callOrReturn.js'
|
|||||||
/**
|
/**
|
||||||
* Build an paste rule that adds a mark when the
|
* Build an paste rule that adds a mark when the
|
||||||
* matched text is pasted into it.
|
* matched text is pasted into it.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#paste-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules
|
||||||
*/
|
*/
|
||||||
export function markPasteRule(config: {
|
export function markPasteRule(config: {
|
||||||
find: PasteRuleFinder
|
find: PasteRuleFinder
|
||||||
|
@ -7,7 +7,7 @@ import { callOrReturn } from '../utilities/index.js'
|
|||||||
/**
|
/**
|
||||||
* Build an paste rule that adds a node when the
|
* Build an paste rule that adds a node when the
|
||||||
* matched text is pasted into it.
|
* matched text is pasted into it.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#paste-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules
|
||||||
*/
|
*/
|
||||||
export function nodePasteRule(config: {
|
export function nodePasteRule(config: {
|
||||||
find: PasteRuleFinder
|
find: PasteRuleFinder
|
||||||
|
@ -3,7 +3,7 @@ import { PasteRule, PasteRuleFinder } from '../PasteRule.js'
|
|||||||
/**
|
/**
|
||||||
* Build an paste rule that replaces text when the
|
* Build an paste rule that replaces text when the
|
||||||
* matched text is pasted into it.
|
* matched text is pasted into it.
|
||||||
* @see https://tiptap.dev/guide/custom-extensions/#paste-rules
|
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules
|
||||||
*/
|
*/
|
||||||
export function textPasteRule(config: {
|
export function textPasteRule(config: {
|
||||||
find: PasteRuleFinder,
|
find: PasteRuleFinder,
|
||||||
|
Loading…
Reference in New Issue
Block a user