Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //snippet manager is included for managing snippets
- var snippetManager = ace.acequire('ace/snippets').snippetManager;
- // getting existing snippet array (free from special characters, n etc)
- var m = snippetManager.files[this.editor._editor.session.$mode.$id];
- m.snippetText = this.snippettext;
- // unregister already esisting snippets
- snippetManager.unregister(m.snippets);
- m.snippets = snippetManager.parseSnippetFile(m.snippetText, m.scope);
- // register newly added snippets along with old snippets
- snippetManager.register(m.snippets,'tex');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement