I want to create an angular service module can generate custom mode of ace-editor. But for creating custom mode of ace-editor, it used requireJS. I don't want to use it in my angular service module. So I wonder how to create custom mode of ace-editor without requireJS?
Create custom mode of ace-editor without requireJS
1.6k views Asked by Chen Han At
1
You need to use
ace.require
to get submodules fromace.define
to register your mode with ace.E.g this example http://plnkr.co/edit/HIFlsg889L4Z7dVYiV1y?p=info defines a mode without using requirejs
You can also create
MyModeConstructor
function in any way you want and then callace.define("my/mode/id", [] {Mode:MyModeConstructor})
to register it.