🔗 Link Plugin

Enhanced link management and SEO optimization

Overview

The Link plugin provides comprehensive link management capabilities, including inserting, editing, and optimizing hyperlinks. Features include URL validation, preview, SEO metadata, tracking parameters, and accessibility enhancements.

Features

  • ✓ Easy link insertion
  • ✓ URL validation
  • ✓ Link preview
  • ✓ SEO meta tags
  • ✓ Tracking parameters
  • ✓ Link anchors
  • ✓ Accessibility attributes
  • ✓ Link analytics

Installation

npm install @editora/plugin-link

Basic Usage

import Editora from '@editora/core';
import LinkPlugin from '@editora/plugin-link';

const editor = new Editora('#editor');
editor.use(LinkPlugin);

// Select text and create link
editor.execCommand('createLink', 'https://example.com');

Link Management

Work with links efficiently:

  1. Create: Select text and add link via dialog or toolbar
  2. Edit: Double-click link to edit URL or properties
  3. Remove: Remove links while keeping text
  4. Properties: Add title, target, rel attributes

Configuration Options

Option Type Description
validateUrl boolean Validate URLs before insertion (default: true)
openInNewTab boolean Default link target (default: false)

API Methods

  • createLink(url): Create link from selection
  • removeLink(): Remove link from selection
  • editLink(url): Edit selected link
  • getLink(): Get current link properties