I want to host an event when the theme changes. Do not use setTheme()
.
var editor = ace.edit("editor"); ace.require("ace/ext/settings_menu").init(editor); editor.session.setMode("ace/mode/java"); editor.setOptions({ theme: "ace/theme/tomorrow_night_bright" }); editor.on('changeTheme', function() { -> This is not working console.log(editor.mode) })
I tried change theme event and using $("#-theme").change()
event but it doesn't work
There are themeChange and themeLoaded events on
editor.renderer, see https://github.com/ajaxorg/ace/blob/31bbd6ade094c1e142565837a4ee93c7931399a4/src/virtual_renderer.js#L1721