@fabwcie/free-drawing / utils/link
utils/link
Variables
linkProtocols
constlinkProtocols:string[]
Defined in: packages/free-drawing/src/utils/link.ts:2
Protocols of links of shapes: web pages and emails (no javascript:, data:...)
maxLinkLength
constmaxLinkLength:2048=2048
Defined in: packages/free-drawing/src/utils/link.ts:5
Longest link of a shape, in characters
Functions
parseLink()
parseLink(
value):string|null
Defined in: packages/free-drawing/src/utils/link.ts:13
Link of a shape from a typed address or from a link attribute (files, links and changes of collaborators come from anyone): web page or email address
Parameters
value
unknown
typed address (https:// added without protocol, mailto: for an email address) or attribute
Returns
string | null
normalized url, null when empty, too long, invalid or of another protocol