ace-editor

How to get useragent variables of Ace editor


https://ace.c9.io/api/modules/src_lib_useragent.html

I need useragent.isMac variable for display in markup hot keys for the mac(Cmd) user and for win(ctrl). How to get useragent variables in ace_builds?

I've tried to search by logging to console the imported ace object, but no results

import * as ace from "ace-builds/src-noconflict/ace"

Solution

  • with ace-builds you can do

    ace.require("ace/lib/useragent")