![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/wyomind/framework/view/adminhtml/web/js/form/element/ |
/* * Copyright © 2019 Wyomind. All rights reserved. * See LICENSE.txt for license details. */ define([ 'Magento_Ui/js/form/element/textarea'], function (AbstractField) { 'use strict'; return AbstractField.extend({ /** * @inheritdoc */ setInitialValue: function () { if (typeof codemirror == "undefined") { var codemirror = new Array; } if (typeof parent == "undefined") { var parent = new Array; } var elt = "#" + this.uid parent[elt.id] = this; var initializer = null; initializer = setInterval(function () { if (jQuery(elt).length > 0) { codemirror[elt.id] = CodeMirror.fromTextArea(jQuery(elt)[0], { matchBrackets: true, mode: "application/x-httpd-php", indentUnit: 2, indentWithTabs: false, lineWrapping: true, lineNumbers: true, styleActiveLine: true, autoRefresh: true }) clearInterval(initializer); codemirror[elt.id].on("blur", function (editor) { jQuery(elt).val(editor.getValue()); parent[elt.id].value(editor.getValue()) }); } }, 100); return this ._super(); }, }); });