rename function
This commit is contained in:
@@ -40,6 +40,7 @@ import {
|
|||||||
|
|
||||||
import insertText from './commands/insertText'
|
import insertText from './commands/insertText'
|
||||||
import markInputRule from './commands/markInputRule'
|
import markInputRule from './commands/markInputRule'
|
||||||
|
import pasteRule from './commands/pasteRule'
|
||||||
import removeMark from './commands/removeMark'
|
import removeMark from './commands/removeMark'
|
||||||
import replaceText from './commands/replaceText'
|
import replaceText from './commands/replaceText'
|
||||||
import setInlineBlockType from './commands/setInlineBlockType'
|
import setInlineBlockType from './commands/setInlineBlockType'
|
||||||
@@ -48,7 +49,6 @@ import toggleBlockType from './commands/toggleBlockType'
|
|||||||
import toggleList from './commands/toggleList'
|
import toggleList from './commands/toggleList'
|
||||||
import toggleWrap from './commands/toggleWrap'
|
import toggleWrap from './commands/toggleWrap'
|
||||||
import updateMark from './commands/updateMark'
|
import updateMark from './commands/updateMark'
|
||||||
import wrappingPasteRule from './commands/wrappingPasteRule'
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
// prosemirror-commands
|
// prosemirror-commands
|
||||||
@@ -91,6 +91,7 @@ export {
|
|||||||
// custom
|
// custom
|
||||||
insertText,
|
insertText,
|
||||||
markInputRule,
|
markInputRule,
|
||||||
|
pasteRule,
|
||||||
removeMark,
|
removeMark,
|
||||||
replaceText,
|
replaceText,
|
||||||
setInlineBlockType,
|
setInlineBlockType,
|
||||||
@@ -99,5 +100,4 @@ export {
|
|||||||
toggleList,
|
toggleList,
|
||||||
toggleWrap,
|
toggleWrap,
|
||||||
updateMark,
|
updateMark,
|
||||||
wrappingPasteRule,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Mark, Plugin, TextSelection } from 'tiptap'
|
import { Mark, Plugin, TextSelection } from 'tiptap'
|
||||||
import { updateMark, removeMark, wrappingPasteRule } from 'tiptap-commands'
|
import { updateMark, removeMark, pasteRule } from 'tiptap-commands'
|
||||||
import { getMarkRange } from 'tiptap-utils'
|
import { getMarkRange } from 'tiptap-utils'
|
||||||
|
|
||||||
export default class Link extends Mark {
|
export default class Link extends Mark {
|
||||||
@@ -43,7 +43,7 @@ export default class Link extends Mark {
|
|||||||
|
|
||||||
pasteRules({ type }) {
|
pasteRules({ type }) {
|
||||||
return [
|
return [
|
||||||
wrappingPasteRule(
|
pasteRule(
|
||||||
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g,
|
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g,
|
||||||
type,
|
type,
|
||||||
url => ({ href: url }),
|
url => ({ href: url }),
|
||||||
|
|||||||
Reference in New Issue
Block a user