big-moving.ru/assets/vendor_plugins/ace-builds-master/ace-editor.min.js

6 lines
1.7 KiB
JavaScript
Executable File

/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2017 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
!function(global,factory){if("function"==typeof define&&define.amd)define("/Plugin/ace-editor",["exports","jquery","Plugin"],factory);else if("undefined"!=typeof exports)factory(exports,require("jquery"),require("Plugin"));else{var mod={exports:{}};factory(mod.exports,global.jQuery,global.Plugin),global.PluginAceEditor=mod.exports}}(this,function(exports,_jquery,_Plugin2){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _Plugin3=(babelHelpers.interopRequireDefault(_jquery),babelHelpers.interopRequireDefault(_Plugin2)),NAME="ace",AceEditor=function(_Plugin){function AceEditor(){return babelHelpers.classCallCheck(this,AceEditor),babelHelpers.possibleConstructorReturn(this,(AceEditor.__proto__||Object.getPrototypeOf(AceEditor)).apply(this,arguments))}return babelHelpers.inherits(AceEditor,_Plugin),babelHelpers.createClass(AceEditor,[{key:"getName",value:function(){return NAME}},{key:"render",value:function(){if("undefined"!=typeof ace){ace.config.loadModule("ace/ext/language_tools");var $el=this.$el,id=$el.attr("id"),editor=ace.edit(id);editor.container.style.opacity="",this.options.mode&&editor.session.setMode("ace/mode/"+this.options.mode),this.options.theme&&editor.setTheme("ace/theme/"+this.options.theme),editor.setOption("maxLines",40),editor.setAutoScrollEditorIntoView(!0),ace.config.loadModule("ace/ext/language_tools",function(){editor.setOptions({enableSnippets:!0,enableBasicAutocompletion:!0})})}}}]),AceEditor}(_Plugin3.default);_Plugin3.default.register(NAME,AceEditor),exports.default=AceEditor});