CommandBars

Updated at:

This topic describes the CommandBars methods and lists the CommandBarIDs for online document collaboration.

Methods

CommandBars.CheckAvailable(CommandBarId)

Important

This feature is supported in JS-SDK V1.1.10 and later.

Use the CheckAvailable() method to check whether a CommandBarID is available.

  • Syntax

    expression.CommandBars.CheckAvailable(CommandBarId)

    expression: The application object for the document type.

  • Parameters

    Property

    Data type

    Required

    Description

    CmbID

    string

    Yes

    The CommandBarID to query.

  • Return value

    Property

    Data type

    Description

    Available

    Boolean

    Indicates whether the CommandBarID is available. Valid values:

    • true: Available.

    • false: Not available.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Check whether the CommandBarID is available.
      console.log(await app.CommandBars.CheckAvailable('MoreMenus'))
    
    }

CommandBarsID list

For a list of CommandBarIDs for online document collaboration, see Customizable list.