NEWCKEditor AI on your premises: Hook your LLM and register MCP tools. Webinar coming soon!
Sign up (with export icon)

link/utils/conflictingdecorators

Api-module iconmodule

Functions

  • Chevron-right icon

    areDecoratorsConflicting( a, b ) → boolean
    internal

    Checks if two decorators conflict with each other.

    Decorators conflict when they share the same HTML attribute names (excluding mergeable attributes) or style properties.

    Parameters

    a : DecoratorLike

    The first decorator.

    b : DecoratorLike

    The second decorator.

    Returns

    boolean
  • Chevron-right icon

    resolveConflictingDecorators( options = { options.allDecorators, options.decoratorStates } ) → Record<string, boolean>
    internal

    Resolves conflicting manual decorators by automatically disabling decorators that share the same HTML attributes with newly enabled decorators.

    Parameters

    options : object

    Configuration object.

    Properties
    options.allDecorators : Array<object>

    Collection of all manual decorators.

    options.decoratorStates : Record<string, boolean>

    Initial decorator states.

    Returns

    Record<string, boolean>

    Updated decorator states with conflicts resolved.