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[]>;
}
* 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
*/
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;
}
Link
/**
* @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;
};
* @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;
};