Skip to content

possibility to add prefixe to relative URL #85

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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