How to use the ace-builds/src-noconflict/ace.edit function in ace-builds

To help you get started, we’ve selected a few ace-builds examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shopware / administration / Resources / administration / src / app / component / form / sw-code-editor / index.js View on Github external
mountedComponent() {
            const config = {
                ...{ mode: `ace/mode/${this.mode}`,
                    showPrintMargin: false,
                    wrap: this.softWraps },
                ...this.editorConfig
            };
            this.editor = Ace.edit(this.$refs['editor'.concat(this.editorId)], config);

            this.defineAutocompletion(this.completerFunction);

            this.editor.setValue(this.value || '', 1);
            this.editor.on('input', this.onInput);
            this.editor.on('blur', this.onBlur);

            if (this.setFocus) {
                this.editor.focus();
            }
        },
github NREL / api-umbrella / src / api-umbrella / admin-ui / app / components / form-fields / ace-field.js View on Github external
didInsertElement() {
    this._super();

    let aceId = this.aceId;
    let $element = this.$().find('textarea');
    $element.hide();
    $element.before('<div class="span12" data-form-property="' + this.fieldName + '" id="' + aceId + '"></div>');

    this.editor = ace.edit(aceId);

    let editor = this.editor;
    let session = this.editor.getSession();

    editor.$blockScrolling = Infinity;
    editor.setTheme('ace/theme/textmate');
    editor.setShowPrintMargin(false);
    editor.setHighlightActiveLine(false);
    session.setUseWorker(false);
    session.setTabSize(2);
    session.setMode('ace/mode/' + $element.data('ace-mode'));
    session.setValue($element.val());

    let $textElement = $(editor.textInput.getElement());
    $textElement.attr('id', this.aceTextInputId);
    $textElement.attr('data-raw-input-id', $element.attr('id'));
github shopware / platform / src / Administration / Resources / app / administration / src / app / component / form / sw-code-editor / index.js View on Github external
mountedComponent() {
            const config = {
                ...{ mode: `ace/mode/${this.mode}`,
                    showPrintMargin: false,
                    wrap: this.softWraps },
                ...this.editorConfig
            };
            this.editor = Ace.edit(this.$refs['editor'.concat(this.editorId)], config);

            this.defineAutocompletion(this.completerFunction);

            this.editor.setValue(this.value || '', 1);
            this.editor.on('input', this.onInput);
            this.editor.on('blur', this.onBlur);

            if (this.setFocus) {
                this.editor.focus();
            }
        },
github inspectIT / inspectit-ocelot / components / inspectit-ocelot-configurationserver-ui / src / components / editor / AceEditor.js View on Github external
componentDidMount() {
        this.editor = ace.edit(this.divRef.current)
        const editorRef = this.editor;

        ace.config.loadModule("ace/ext/keybinding_menu", function (module) {
            module.init(editorRef);
        })
        if(this.props.onCreate) {
            this.props.onCreate(this.editor);
        }

        this.configureEditor();
        this.updateValue();
    }