Interactive demonstration of the LinkSelector component for linking translated content.
This is a demo page. In production, the component would be integrated into WordPress admin with a real REST API endpoint. For this demo, we'll use mock data.
Initializing...
Initializing with 2 pre-selected links...
Initializing with custom post types...
Ready for programmatic control...
container (required): Container element or selector
sourcePostId (required): Source post ID
targetLanguage (required): Target language code
sourceLanguage (optional): Source language (default: 'en')
postTypes (optional): Array of post types (default: ['post', 'page'])
selectedLinks (optional): Pre-selected links
onChange (optional): Callback when selection changes
apiEndpoint (optional): Custom REST API endpoint
getSelectedLinks(): Get currently selected links
setSelectedLinks(links): Programmatically set selected links
destroy(): Destroy the component and clean up