Is it possible to manually add snippets through react-ace component.
For example, adding snippet myFun
to javascript
:
# Function
snippet myFun
function ${1?:function_name}(${2:argument}) {
let x = 'test';
${3:// body...}
}
I went through the documentation,FAQ ,similar questions here and here.
After digging the source code, it is possible with
ace.define(..)
:Snippet example:
Check out a demo here.