-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto link enhancements #2798
Auto link enhancements #2798
Conversation
|
||
/** | ||
* @internal | ||
*/ | ||
export function createLink(editor: IEditor) { | ||
export function createLink( | ||
editor: IEditor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use an option object instead of multiple parameters. You can create an option type for createLink, then let AutoFormatOptions
extend from it.
interface AutoLinkOptions {
autoLink?: boolean;
...
}
interface AutoFormatOptions extends AutoLinkOptions {
...
}
*/ | ||
export function getLinkUrl( | ||
text: string, | ||
shouldLink: boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@@ -12,12 +12,15 @@ import type { | |||
export function createLinkAfterSpace( | |||
previousSegment: ContentModelText, | |||
paragraph: ShallowMutableContentModelParagraph, | |||
context: FormatContentModelContext | |||
context: FormatContentModelContext, | |||
autoLink: boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
…u/juliaroldi/link-enhancements
Add to new options of auto transformation, automatically transform telephone numbers and email addresses in hyperlink. This change adds two new options
autoTel
andautoMailto
.