Minor - format code

pull/3959/head
Julio 3 years ago
parent 4187c2d07e
commit f5cb4685f9
  1. 4
      assets/js/translatehtml.js
  2. 2
      public/libs/editor/tinymce_plugins/translatehtml/plugin.js

@ -1,7 +1,6 @@
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
document.addEventListener('DOMContentLoaded', function (){ document.addEventListener('DOMContentLoaded', function () {
if (window.user) { if (window.user) {
const isoCode = window.user.locale; const isoCode = window.user.locale;
const translateElement = document.querySelector('.mce-translatehtml'); const translateElement = document.querySelector('.mce-translatehtml');
@ -16,5 +15,4 @@ document.addEventListener('DOMContentLoaded', function (){
}); });
} }
} }
}); });

@ -14,7 +14,7 @@
}; };
var tinyWrap = function (open_tag, close_tag) { var tinyWrap = function (open_tag, close_tag) {
var ed = (tinymce.activeEditor || opener.tinymce.activeEditor); /* get editor instance */ var ed = tinymce.activeEditor || opener.tinymce.activeEditor; /* get editor instance */
var selection = ed.selection.getContent(); /* get user selection, if any */ var selection = ed.selection.getContent(); /* get user selection, if any */
var temp_name = new Date().getTime().toString(36).toLowerCase(); /* generate a unique string */ var temp_name = new Date().getTime().toString(36).toLowerCase(); /* generate a unique string */
var span_open = '<span id="' + temp_name + '">'; /* generate '<span id="unique">' */ var span_open = '<span id="' + temp_name + '">'; /* generate '<span id="unique">' */

Loading…
Cancel
Save