Skip to content

don't want insert internal links starting with / #4591

@tomdyqin

Description

@tomdyqin

i don't want insert internal links starting with /, may I ask if you can increase the priority of user-defined isUrl options

const customValidateUrl = (editor, url) => {
  if (url.startsWith('/')) return false;
  // ...rest of the original logic
};

const linkPlugin = createLinkPlugin({
  options: {
    isUrl: customValidateUrl,
  },
});
  1. Copy '/aaa'
  2. Paste on editor
  3. Expected to insert text /aaa

Originally posted by @tomdyqin in #4450

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions