From 2cdfbded99481f43953dcddaec91adacb49de08b Mon Sep 17 00:00:00 2001 From: Marat Date: Fri, 26 Aug 2016 12:15:43 +0200 Subject: [PATCH] advanced editor mode configuration some editor modes allow extended options, e.g. inline:true for php mode ( https://github.com/ajaxorg/ace/issues/2542 ) It can be used this way: ```html
``` although setMode() is still undocumented, this should work for all other possible options, too. --- src/ui-ace.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui-ace.js b/src/ui-ace.js index a664fb1..4f6b5f8 100644 --- a/src/ui-ace.js +++ b/src/ui-ace.js @@ -86,6 +86,9 @@ angular.module('ui.ace', []) if (angular.isString(opts.mode)) { session.setMode('ace/mode/' + opts.mode); } + else if(angular.isObject(opts.mode)) { + session.setMode( opts.mode ); + } // Advanced options if (angular.isDefined(opts.firstLineNumber)) { if (angular.isNumber(opts.firstLineNumber)) {