add a way to unregister snippets
This commit is contained in:
parent
19ea0fe979
commit
f9ed205557
3 changed files with 38 additions and 6 deletions
|
|
@ -450,14 +450,20 @@ require("ace/placeholder").PlaceHolder;
|
|||
var SnippetManager = require("ace/snippets").SnippetManager
|
||||
var jsSnippets = require("ace/snippets/javascript");
|
||||
window.SnippetManager = SnippetManager
|
||||
saveSnippets()
|
||||
|
||||
function saveSnippets() {
|
||||
jsSnippets.snippets = SnippetManager.parseSnippetFile(jsSnippets.snippetText);
|
||||
SnippetManager.snipp
|
||||
SnippetManager.register(jsSnippets.snippets, "javascript")
|
||||
}
|
||||
|
||||
env.editSnippets = function() {
|
||||
var sp = env.split;
|
||||
if (sp.getSplits() == 2) {
|
||||
sp.setSplits(1);
|
||||
return;
|
||||
}
|
||||
sp.setSplits(1);
|
||||
sp.setSplits(2);
|
||||
sp.setOrientation(sp.BESIDE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue