Ace editor should be aware of Noonian constructs...
here's a starting-point ( goes in FieldTypeUiSpec dbui.core.ace_editor_simple)
$scope.aceInit = {
theme:theme,
mode: mode,
useWrapMode : true,
showGutter: true,
require: ['ace/ext/language_tools'],
advanced: {
enableSnippets: false,
enableBasicAutocompletion: true,
enableLiveAutocompletion: true
}
};
var staticWordCompleter = {
getCompletions: function(editor, session, pos, prefix, callback) {
console.log('COMPLETER!', pos, prefix);
var completionArr = [
{
caption: 'value in dropdown',
value: 'value put in editor when selected',
meta: "noonian"
}
];
callback(null, completionArr);
}
};
$scope.aceInit.onLoad = function(editor) {
$scope.aceEditor = editor;
editor.$blockScrolling = Infinity;
editor.completers = editor.completers || [];
editor.completers.push(staticWordCompleter);
// var session = editor.getSession(); //http://ajaxorg.github.io/ace/#nav=api&api=edit_session
};