Skip to content

possibility to add prefixe to relative URL #85

@fab2713

Description

@fab2713

Hey @panphora,

It could be nice to have a way to add a prefixe to relative URL, because the document being edited does not necessarily have the same path/domain/… as the final published page and in this case the link would be broken in this editor.

This could be configured with a new component option named relativeUrlPrefixe for example, and the end of sanitizeUrl function could be modified like:

if (hasSafeProtocol) {
  return url;
} else if (isRelative) {
  return (this.relativeUrlPrefixe || "") + url;
} else {
  return "#";
}

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions