CoreMedia CKEditor 5 Plugins
    Preparing search index...

    Service, used to manage a list of blocked words within CKEditor. Blocked words are words that should not appear in the editor content and should be taken care of by an editor. They are therefore highlighted within the text.

    This service interface allows to add or remove words and observe the whole list. It is used in the ckeditor5-blocklist plugin.

    The service has to be registered globally on the serviceAgent and may then be retrieved by its descriptor, for example:

    serviceAgent
    .fetchService(createBlocklistServiceDescriptor())
    .then((service) => {});
    interface BlocklistService {
        addToBlocklist(wordToBlock: string): Promise<void>;
        getBlocklist(): Promise<string[]>;
        observe_blocklist(): Observable<string[]>;
        removeFromBlocklist(wordToUnblock: string): Promise<void>;
    }

    Implemented by

    Index

    Methods

    • Observes the blocklist and returns the whole list when words are added or removed. If only changed values are relevant, a previous state of the list must be stored so that changes can be restored by comparing with the current state of the list.

      Returns Observable<string[]>

      The whole blocklist