A command to open either a given URI path (on execute) or the URI path available in the current model state.

Hierarchy (view full)

Constructors

  • Creates an OpenInTabCommand.

    The OpenInTabCommand triggers the WorkAreaService.openEntitiesInTab of the current selected model element, if it is the element this command is registered for.

    This command only executes if the selected model element has the given elementName and an attribute with the given attributeName.

    The "isEnabled" property can be used to update the state of any bound ui element and restrict its execution.

    If no elementName is given, it defaults to undefined. This is a special case for textNodes as textNodes are not represented as elements.

    Parameters

    • editor: default

      the ckeditor instance

    Returns OpenContentInTabCommand

Methods

  • Updates the value and enabled state.

    Only if valueFromModel resolves to a content URI, the value of this command is set accordingly, otherwise set to undefined.

    Enabled state in addition to that respects if a referenced content can be opened. Due to asynchronous behavior to validate content, meanwhile, a default enabled state is assumed.

    Parameters

    • valueFromModel: unknown

      value as retrieved from the model

    • defaultEnabled: boolean = true

      default enabled state to take, until ability to open a given content has been checked.

    Returns void