TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/euclidesseg/euclides-workspace/llms.txt
Use this file to discover all available pages before exploring further.
LinkPopoverComponent provides a user interface for creating, editing, and removing hyperlinks within the Euclides Rich Editor.
Overview
This standalone Angular component displays a popover UI with an input field and action buttons for link management. It uses Angular signals for reactive state management. Component Selector:app-link-popover
Usage
The link popover is integrated into the main editor component and appears when users interact with the link button or existing links.Inputs
visible
Type:boolean
Default: false
Controls the visibility of the popover. When true, the popover is displayed.
initialUrl
Type:string
Default: ''
Sets the initial value in the URL input field. This is typically used when editing an existing link.
Outputs
confirm
Type:EventEmitter<string>
Emitted when the user confirms the link by clicking the confirm button. Returns the entered URL.
cancel
Type:EventEmitter<void>
Emitted when the user clicks the cancel button to close the popover without applying changes.
remove
Type:EventEmitter<void>
Emitted when the user clicks the remove button to delete an existing link.
Internal State
url Signal
The component uses an Angular signal to manage the URL input state:initialUrl input using an effect() hook:
Component Methods
onConfirm()
Validates and emits the URL when the user clicks the confirm button.The method prevents empty URLs from being confirmed, ensuring valid link creation.
Template Structure
The popover template conditionally renders based on thevisible input:
Action Buttons
The popover provides three action buttons:Confirm
Applies the entered URL to the selected text or creates a new link
Cancel
Closes the popover without making changes
Remove
Removes the link mark from the current selection
Integration with Editor
The link popover is used within the main editor component through the following workflow:1. Opening the Popover
2. Applying the Link
3. Removing the Link
URL Normalization
The editor automatically adds the
https:// protocol to URLs that don’t already have a protocol specified. This ensures all links are valid and clickable.State Management Pattern
The component demonstrates modern Angular patterns:- Signals for reactive state management
- Input signals for component inputs
- Output emitters for event communication
- Effects for side effects and synchronization
Standalone Component
This component is defined as standalone, making it independently importable:See Also
- Euclides Editor Component - Main editor component
- Links Guide - Guide to working with links in the editor