Your Search Results



    Reports whether or not the specified editor query command is supported by the browser.


    isSupported = document.queryCommandSupported(command);
    The command for which to determine support.

    If the command is not supported, a NotSupportedError exception is thrown.


    • If the command has no value or is disabled, an empty string is returned.
    • The "fontSize" command is handled specially; if its value override is set, that gets converted to an integer number of pixels and returned as a legacy font size.
    • If the command's value override is set, that gets returned.
    • Otherwise, the command's value is returned, as would be returned by document.queryCommandValue().


    var flg = document.queryCommandSupported("SelectAll");
    if(flg) {
      // ...Do something

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support ? 9.0 (9.0) 4.0 ? ?
    Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support ? 9.0 (9.0) ? ? ?


    Specification Status Comment
    HTML Editing APIs
    The definition of 'querycommandsupported' in that specification.
    Editor's Draft  

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy, MHasan, gurdev_singh, ethertank, kscarfone, mnoorenberghe, teoli
    Last updated by: teoli,
    Hide Sidebar