Link Suggest

Last modified by Manuel Leduc on 2024/10/23 15:39

Description

Provides link suggestion to page and attachments when creating links in the editor.

Supported Backends

  • XWiki
  • Nextcloud

User

Admin

N/A

Developer

Link Suggest Service

/**
 * Provide the operation to get links suggestions.
 * @since 0.8
 */

interface LinkSuggestService {
 /**
   * Returns a list of page links from a text query.
   * @param query a textual search value (e.g., PageName)
   */

  getLinks(query: string): Promise<Link[]>;
}

Link Suggest Service Provider

/**
 * @since 0.11
 */

interface LinkSuggestServiceProvider {
 /**
   * Resolve the LinkSuggestService for the current config type or for the
   * provided type
   * @param type an optional type to override the current config type
   */

  get(type?: string): LinkSuggestService | undefined;
}
/**
 * @since 0.11
 */

enum LinkType {
  PAGE,
  ATTACHMENT,
}


/**
 * Minimal data required to describe a link.
 * @since 0.8
 */

type Link = {
  id: string;
  url: string;
  reference: string;
  label: string;
  hint: string;
  type: LinkType;
};
France 2030 Logo

This project is being financed by the French State as part of the France 2030 program

Ce projet est financé par l’État Français dans le cadre de France 2030

  • Powered by XWiki 16.4.4-node2. Hosted and managed by XWiki SAS

Get Connected