Link Control Constants (link-control/constants.ts)

gutenberg · packages/block-editor/src/components/link-control/constants.ts · typescript · LGPL-3.0
ui, lang:typescript, fw:wordpress, tag:editor, tag:constants

Defines standard link types, entry formats, and default settings for block editor interfaces. Reuse when building rich text link pickers.

// Source: https://github.com/WordPress/gutenberg | License: LGPL-3.0 | Copyright 2016-2026 by the contributors | Modified files must remain under LGPL-3.0
// Modifications to this file must remain under LGPL-3.0.
// Provided via justclaw.it.com; keep this notice with the code.
import { __ } from '@wordpress/i18n';

// Used as a unique identifier for the "Create" option within search results.
// Used to help distinguish the "Create" suggestion within the search results in
// order to handle it as a unique case.
export const CREATE_TYPE = '__CREATE__';
export const TEL_TYPE = 'tel';
export const URL_TYPE = 'link';
export const MAILTO_TYPE = 'mailto';
export const INTERNAL_TYPE = 'internal';

export const LINK_ENTRY_TYPES = [
	URL_TYPE,
	MAILTO_TYPE,
	TEL_TYPE,
	INTERNAL_TYPE,
];

export con

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key