editor.quill.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. /**
  2. * Copyright (c) UNA, Inc - https://una.io
  3. * MIT License - https://opensource.org/licenses/MIT
  4. *
  5. * @defgroup UnaCore UNA Core
  6. * @{
  7. */
  8. function bx_editor_init(oEditor, oParams){
  9. hljs.configure({
  10. languages: ['javascript', 'php', 'html', 'css']
  11. });
  12. bEmptyToolbar = oParams.toolbar == false ? true : false;
  13. if (oParams.query_params == undefined)
  14. oParams.query_params = {};
  15. oParams.toolbar = {
  16. container: bEmptyToolbar ? [] : oParams.toolbar,
  17. handlers: {
  18. 'show-html': function() {
  19. bx_alert('<textarea class="bx-def-font-inputs bx-form-input-textarea bx-form-input-html-quill-code" id="' + oParams.name + '_code">' + oEditor.container.firstChild.innerHTML + '</textarea>',function() {
  20. oEditor.container.firstChild.innerHTML = $('#'+oParams.name+'_code').val();
  21. });
  22. },
  23. 'embed': function(value) {
  24. var range = oEditor.getSelection();
  25. bx_prompt(_t('_sys_txt_quill_tooltip_embed_popup_header'), '', function(oPopup){
  26. sLink = $(oPopup).find("input[type = 'text']").val()
  27. $.getJSON(oParams.root_url + 'embed.php?', {a: 'get_link', l: sLink}, function(aData){
  28. if (range) {
  29. oEditor.clipboard.dangerouslyPasteHTML(range.index, "</p>&#8205; <p>&#8205; </p>", 'api');
  30. oEditor.insertEmbed(range.index+2, 'embed-link', {source: sLink, inlinecode : aData.code}, 'api');
  31. }
  32. else{
  33. oEditor.insertEmbed(0, 'embed-link', {source: sLink, inlinecode : aData.code}, 'api');
  34. }
  35. if ($(oParams.selector).next().next().find('.bx-embed-link a[href="' + aData.link + '"]').length > 0)
  36. bx_embed_link($(oParams.selector).next().next().find('.bx-embed-link a[href="' + aData.link + '"]')[0]);
  37. else
  38. bx_embed_link();
  39. });
  40. });
  41. },
  42. 'link': function(value) {
  43. if (value) {
  44. var range = oEditor.getSelection();
  45. bx_prompt(_t('_sys_txt_quill_tooltip_link_popup_header'), '', function(oPopup){
  46. var sLink = $(oPopup).find("input[type = 'text']").val();
  47. if (range) {
  48. if (range.length > 0){
  49. oEditor.format('link', sLink);
  50. }
  51. else{
  52. oEditor.insertText(range.index, sLink, 'link', sLink);
  53. }
  54. }
  55. else{
  56. oEditor.insertText(0, sLink, 'link', sLink);
  57. }
  58. });
  59. } else {
  60. oEditor.format('link', false);
  61. }
  62. }
  63. }
  64. }
  65. sVal = $(oParams.selector).val();
  66. if(!oParams.empty_tags){
  67. sVal = sVal.replaceAll('<p><br></p>','');
  68. }
  69. $(oParams.selector).after("<div id='" + oParams.name + "' class='bx-def-font-inputs bx-form-input-textarea bx-form-input-html bx-form-input-html-quill " + oParams.css_class + "'>" + sVal + "</div>" );
  70. $(oParams.selector).hide();
  71. $(oParams.selector).attr('object_editor', oParams.name);
  72. if (typeof bQuillRegistred === 'undefined' ) {
  73. var Embed = Quill.import('blots/embed');
  74. const BaseLink = Quill.import("formats/link");
  75. class Link extends BaseLink {
  76. format(name, value) {
  77. if (["href", "target"].indexOf(name) > -1) {
  78. if (value) {
  79. this.domNode.setAttribute(name, value);
  80. } else {
  81. this.domNode.removeAttribute(name);
  82. }
  83. } else {
  84. super.format(name, value);
  85. if (name == 'link'){
  86. if (value){
  87. if (!value.startsWith(oParams.root_url) && (value.startsWith('http://') || value.startsWith('https://'))){
  88. this.domNode.setAttribute("target", "_blank");
  89. }
  90. else{
  91. this.domNode.removeAttribute('target');
  92. }
  93. }
  94. }
  95. }
  96. }
  97. static create(value) {
  98. const node = super.create(value);
  99. node.setAttribute("href", this.sanitize(value));
  100. if (!value.startsWith(oParams.root_url) && (value.startsWith('http://') || value.startsWith('https://'))){
  101. node.setAttribute("target", "_blank");
  102. }
  103. else{
  104. node.removeAttribute('target');
  105. }
  106. return node;
  107. }
  108. }
  109. Quill.register(Link, true);
  110. class MenthionLink extends Embed {
  111. static create(value) {
  112. let node = super.create(value);
  113. if (value.id && value.value){
  114. node.setAttribute('href', value.id);
  115. node.innerHTML = value.denotationChar + value.value;
  116. node.setAttribute('title', value.value);
  117. node.setAttribute('dchar', value.denotationChar);
  118. node.setAttribute('data-profile-id', value.dataProfileId);
  119. }
  120. if (value.url && value.title && value.dataProfileId){
  121. node.setAttribute('href', value.url);
  122. node.innerHTML = value.text;
  123. node.setAttribute('title', value.title);
  124. if (value.dchar)
  125. node.setAttribute('dchar', value.dchar);
  126. else
  127. node.setAttribute('dchar', '@');
  128. node.setAttribute('data-profile-id', value.dataProfileId);
  129. }
  130. return node;
  131. }
  132. format(name, value) {
  133. if (name === 'href' || name === 'title' || name === 'dchar' || name === 'data-profile-id' || name === 'dataProfileId') {
  134. if (value) {
  135. if (name === 'dchar'){
  136. this.domNode.innerHTML = value + this.domNode.getAttribute('title');
  137. }
  138. if (name === 'dataProfileId'){
  139. this.domNode.setAttribute('data-profile-id', value);
  140. }
  141. else{
  142. this.domNode.setAttribute(name, value);
  143. }
  144. } else {
  145. this.domNode.removeAttribute(name, value);
  146. }
  147. }
  148. else {
  149. super.format(name, value);
  150. }
  151. };
  152. static value(node) {
  153. return { url: node.getAttribute('href') ,title: node.getAttribute('title'), dchar: node.getAttribute('dchar'), dataProfileId: node.getAttribute('data-profile-id'), text: node.innerText }
  154. }
  155. static formats(node) {
  156. let format = {};
  157. if (node.hasAttribute('href')) {
  158. format.href = node.getAttribute('href');
  159. }
  160. if (node.hasAttribute('title')) {
  161. format.title = node.getAttribute('title');
  162. }
  163. else{
  164. format.title = node.innerText.replace(node.getAttribute('dchar'), '');
  165. }
  166. if (node.hasAttribute('dchar')) {
  167. format.dchar = node.getAttribute('dchar');
  168. }
  169. if (node.hasAttribute('data-profile-id')) {
  170. format['data-profile-id'] = node.getAttribute('data-profile-id');
  171. }
  172. if (node.hasAttribute('dataProfileId')) {
  173. format.dataProfileId = node.getAttribute('dataProfileId');
  174. }
  175. return format;
  176. }
  177. }
  178. MenthionLink.blotName = 'menthion-link';
  179. MenthionLink.className = 'bx-mention-link';
  180. MenthionLink.tagName = 'a';
  181. Quill.register({
  182. 'formats/menthion-link': MenthionLink
  183. });
  184. class EmbedCode extends Embed {
  185. static create(value) {
  186. let node = super.create(value);
  187. if (value.source && value.inlinecode){
  188. node.setAttribute('source', value.source);
  189. node.innerHTML = value.inlinecode + "&nbsp;";
  190. return node;
  191. }
  192. return node;
  193. };
  194. format(name, value) {
  195. if (name === 'source') {
  196. if (value) {
  197. this.domNode.setAttribute(name, value);
  198. } else {
  199. this.domNode.removeAttribute(name, value);
  200. }
  201. }
  202. else {
  203. super.format(name, value);
  204. }
  205. };
  206. static value(node) {
  207. return { source: node.getAttribute('source'), inlinecode: "emded"}
  208. }
  209. static formats(node) {
  210. let format = {};
  211. if (node.hasAttribute('source')) {
  212. format.source = node.getAttribute('source');
  213. }
  214. return format;
  215. }
  216. }
  217. EmbedCode.className = 'bx-embed-link';
  218. EmbedCode.blotName = 'embed-link';
  219. EmbedCode.tagName = 'div';
  220. Quill.register({
  221. 'formats/embed-link': EmbedCode
  222. });
  223. var AlignStyle = Quill.import('attributors/style/align');
  224. Quill.register(AlignStyle, true);
  225. var DirectionStyle = Quill.import('attributors/style/direction');
  226. Quill.register(DirectionStyle, true);
  227. const ImageFormatAttributesList = [
  228. 'alt',
  229. 'height',
  230. 'width',
  231. 'style'
  232. ];
  233. const BaseImageFormat = Quill.import('formats/image');
  234. class ImageFormat extends BaseImageFormat {
  235. static formats(domNode) {
  236. return ImageFormatAttributesList.reduce(function(formats, attribute) {
  237. if (domNode.hasAttribute(attribute)) {
  238. formats[attribute] = domNode.getAttribute(attribute);
  239. }
  240. return formats;
  241. }, {});
  242. }
  243. format(name, value) {
  244. if (ImageFormatAttributesList.indexOf(name) > -1) {
  245. if (value) {
  246. this.domNode.setAttribute(name, value);
  247. } else {
  248. this.domNode.removeAttribute(name);
  249. }
  250. } else {
  251. super.format(name, value);
  252. }
  253. }
  254. }
  255. Quill.register(ImageFormat, true);
  256. const Parchment = Quill.import("parchment");
  257. const pixelLevels = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
  258. const TAB_MULTIPLIER = 30
  259. class IndentAttributor extends Parchment.Attributor.Style {
  260. add(node, value) {
  261. return super.add(node, `${+value * TAB_MULTIPLIER}px`)
  262. }
  263. value(node) {
  264. return parseFloat(super.value(node)) / TAB_MULTIPLIER || undefined // Don't return NaN
  265. }
  266. }
  267. const IndentStyle = new IndentAttributor("indent", "margin-left", {
  268. scope: Parchment.Scope.BLOCK,
  269. whitelist: pixelLevels.map(value => `${value * TAB_MULTIPLIER}px`),
  270. })
  271. Quill.register({"formats/indent": IndentStyle}, true);
  272. bQuillRegistred = true;
  273. var icons = Quill.import('ui/icons');
  274. icons['embed'] = '<svg class="fr-svg" focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path class="ql-fill" d="M20.73889,15.45929a3.4768,3.4768,0,0,0-5.45965-.28662L9.5661,12.50861a3.49811,3.49811,0,0,0-.00873-1.01331l5.72174-2.66809a3.55783,3.55783,0,1,0-.84527-1.81262L8.70966,9.6839a3.50851,3.50851,0,1,0,.0111,4.63727l5.7132,2.66412a3.49763,3.49763,0,1,0,6.30493-1.526ZM18.00745,5.01056A1.49993,1.49993,0,1,1,16.39551,6.3894,1.49994,1.49994,0,0,1,18.00745,5.01056ZM5.99237,13.49536a1.49989,1.49989,0,1,1,1.61194-1.37878A1.49982,1.49982,0,0,1,5.99237,13.49536Zm11.78211,5.494a1.49993,1.49993,0,1,1,1.61193-1.37885A1.49987,1.49987,0,0,1,17.77448,18.98932Z"></path></svg>';
  275. icons['show-html'] = '<svg class="fr-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path class="ql-fill" d="M162.1 257.8c-7.812-7.812-20.47-7.812-28.28 0l-48 48c-7.812 7.812-7.812 20.5 0 28.31l48 48C137.8 386.1 142.9 388 148 388s10.23-1.938 14.14-5.844c7.812-7.812 7.812-20.5 0-28.31L128.3 320l33.86-33.84C169.1 278.3 169.1 265.7 162.1 257.8zM365.3 93.38l-74.63-74.64C278.6 6.742 262.3 0 245.4 0H64C28.65 0 0 28.65 0 64l.0065 384c0 35.34 28.65 64 64 64H320c35.2 0 64-28.8 64-64V138.6C384 121.7 377.3 105.4 365.3 93.38zM336 448c0 8.836-7.164 16-16 16H64.02c-8.838 0-16-7.164-16-16L48 64.13c0-8.836 7.164-16 16-16h160L224 128c0 17.67 14.33 32 32 32h79.1V448zM221.9 257.8c-7.812 7.812-7.812 20.5 0 28.31L255.7 320l-33.86 33.84c-7.812 7.812-7.812 20.5 0 28.31C225.8 386.1 230.9 388 236 388s10.23-1.938 14.14-5.844l48-48c7.812-7.812 7.812-20.5 0-28.31l-48-48C242.3 250 229.7 250 221.9 257.8z"/></svg>';
  276. }
  277. var oConfig = {
  278. theme: oParams.skin,
  279. modules: {
  280. clipboard: {
  281. matchVisual: false
  282. },
  283. syntax: true,
  284. imageResize: {},
  285. toolbar: oParams.toolbar,
  286. "emoji-toolbar": true,
  287. mention: {
  288. allowedChars: /^[\S]*$/,
  289. mentionDenotationChars: ["@", "#"],
  290. showDenotationChar: true,
  291. blotName: 'menthion-link',
  292. mentionContainerClass: 'bx-popup bx-popup-trans bx-popup-border bx-popup-color-bg',
  293. mentionListClass: 'ql-mention-list bx-menu-ver',
  294. dataAttributes: ['id', 'value', 'denotationChar', 'link', 'target','disabled', 'dataProfileId'],
  295. listItemClass: 'bx-menu-item bx-def-color-bg-hl-hover',
  296. source: function (searchTerm, renderList, mentionChar) {
  297. var aFlds = oParams.query_params['fi'].split(",");
  298. aFlds.forEach(fld => {
  299. oParams.query_params[fld] = $('#' + oParams.query_params['f'] + ' [name="' + fld + '"]').val()
  300. });
  301. $.getJSON(oParams.root_url + 'searchExtended.php?action=get_mention', $.extend({}, {symbol: mentionChar, term: searchTerm}, oParams.query_params), function(data){
  302. renderList(data, searchTerm);
  303. });
  304. },
  305. renderItem: function(item, searchTerm){
  306. item.id = item.url;
  307. item.dataProfileId = item.value;
  308. item.value = item.label;
  309. return item.symbol + item.value;
  310. },
  311. onSelect: function(item, insertItem){
  312. insertItem(item, false)
  313. }
  314. },
  315. }
  316. };
  317. if (oParams.allowed_tags){
  318. oConfig.formats = oParams.allowed_tags;
  319. }
  320. oConfig.modules.imageUploader = {
  321. upload: file => {
  322. return new Promise((resolve, reject) => {
  323. var bProcessed = false;
  324. if (typeof glOnInsertImageInEditor !== 'undefined' && glOnInsertImageInEditor instanceof Array && glOnInsertImageInEditor.length > 0) {
  325. for (var i = 0; i < glOnInsertImageInEditor.length; i++) {
  326. if (typeof glOnInsertImageInEditor[i] === "function") {
  327. var bTmp = glOnInsertImageInEditor[i](file,oParams.selector);
  328. if (bTmp)
  329. bProcessed = true;
  330. }
  331. }
  332. if(bProcessed)
  333. reject("External uploader");
  334. }
  335. if(!bProcessed){
  336. const formData = new FormData();
  337. formData.append("file", file);
  338. fetch(oParams.root_url + "storage.php?o=sys_images_editor&t=sys_images_editor&a=upload", {
  339. method: "POST",
  340. body: formData
  341. }
  342. )
  343. .then(response => response.json())
  344. .then(result => {
  345. if ('undefined' != typeof(result.link))
  346. resolve(result.link);
  347. else
  348. reject("Upload failed");
  349. })
  350. .catch(error => {
  351. reject("Upload failed");
  352. });
  353. }
  354. });
  355. }
  356. }
  357. oEditor = new Quill('#' + oParams.name, oConfig)
  358. $(oParams.selector).next().find('button.ql-bold').attr('title', _t('_sys_txt_quill_tooltip_bold'));
  359. $(oParams.selector).next().find('button.ql-italic').attr('title', _t('_sys_txt_quill_tooltip_italic'));
  360. $(oParams.selector).next().find('button.ql-underline').attr('title', _t('_sys_txt_quill_tooltip_underline'));
  361. $(oParams.selector).next().find('button.ql-clean').attr('title', _t('_sys_txt_quill_tooltip_clean'));
  362. $(oParams.selector).next().find('button.ql-list[value = "ordered"]').attr('title', _t('_sys_txt_quill_tooltip_list_ordered'));
  363. $(oParams.selector).next().find('button.ql-list[value = "bullet"]').attr('title', _t('_sys_txt_quill_tooltip_list_bullet'));
  364. $(oParams.selector).next().find('button.ql-indent[value = "-1"]').attr('title', _t('_sys_txt_quill_tooltip_indent_1'));
  365. $(oParams.selector).next().find('button.ql-indent[value = "+1"]').attr('title', _t('_sys_txt_quill_tooltip_indent_2'));
  366. $(oParams.selector).next().find('button.ql-blockquote').attr('title', _t('_sys_txt_quill_tooltip_blockquote'));
  367. $(oParams.selector).next().find('button.ql-direction').attr('title', _t('_sys_txt_quill_tooltip_direction'));
  368. $(oParams.selector).next().find('button.ql-script[value="sub"]').attr('title', _t('_sys_txt_quill_tooltip_script_sub'));
  369. $(oParams.selector).next().find('button.ql-script[value="super"]').attr('title', _t('_sys_txt_quill_tooltip_script_super'));
  370. $(oParams.selector).next().find('button.ql-link').attr('title', _t('_sys_txt_quill_tooltip_link'));
  371. $(oParams.selector).next().find('button.ql-image').attr('title', _t('_sys_txt_quill_tooltip_image'));
  372. $(oParams.selector).next().find('button.ql-code-block').attr('title', _t('_sys_txt_quill_tooltip_code_block'));
  373. $(oParams.selector).next().find('span.ql-color').attr('title', _t('_sys_txt_quill_tooltip_color'));
  374. $(oParams.selector).next().find('span.ql-background').attr('title', _t('_sys_txt_quill_tooltip_background'));
  375. $(oParams.selector).next().find('span.ql-align').attr('title', _t('_sys_txt_quill_tooltip_align'));
  376. $(oParams.selector).next().find('span.ql-header').attr('title', _t('_sys_txt_quill_tooltip_header'));
  377. $('#' + oParams.name).find('.ql-editor').addClass('bx-def-vanilla-html');
  378. if (bEmptyToolbar)
  379. $(oParams.selector).next().hide();
  380. oEditor.clipboard.addMatcher (Node.TEXT_NODE, function (node, delta) {
  381. const Delta = Quill.import('delta')
  382. bx_editor_on_space_enter(node.data, oParams.selector, false);
  383. return delta;
  384. });
  385. if (oParams.insert_as_plain_text){
  386. oEditor.clipboard.addMatcher (Node.ELEMENT_NODE, function (node, delta) {
  387. let ops = []
  388. delta.ops.forEach(op => {
  389. if (op.insert && typeof op.insert === 'string') {
  390. ops.push({
  391. insert: op.insert
  392. })
  393. }
  394. })
  395. delta.ops = ops
  396. return delta
  397. });
  398. }
  399. else{
  400. oEditor.clipboard.addMatcher (Node.ELEMENT_NODE, function (node, delta) {
  401. delta.forEach(e => {
  402. //if(typeof e.insert == 'string' && e.attributes == null)
  403. // e.insert = e.insert.replace(/\n/g, '') + "\n";
  404. if(e.attributes){
  405. e.attributes.color = '';
  406. e.attributes.background = '';
  407. }
  408. });
  409. return delta;
  410. });
  411. }
  412. oEditor.keyboard.addBinding({
  413. key: ' ',
  414. handler: function(range, context) {
  415. bx_editor_on_space_enter (oEditor.container.firstChild.innerHTML, oParams.selector);
  416. return true;
  417. }
  418. });
  419. oEditor.container.addEventListener('keydown', function(event) {
  420. if (event.key === 'Enter' || event.keyCode === 13) {
  421. bx_editor_on_space_enter (oEditor.container.firstChild.innerHTML, oParams.selector);
  422. }
  423. });
  424. oEditor.on('editor-change', function(delta, oldDelta, source) {
  425. sVal = oEditor.container.firstChild.innerHTML;
  426. if(!oParams.empty_tags){
  427. sVal = sVal.replaceAll('<p><br></p>','');
  428. }
  429. if ((oEditor.getContents()['ops'] || []).length == 1 && oEditor.getText().trim().length === 0) {
  430. sVal = ''
  431. }
  432. $(oParams.selector).val(sVal);
  433. });
  434. return oEditor
  435. }
  436. function bx_editor_activate(oEditor)
  437. {
  438. oEditor.focus();
  439. }
  440. function bx_editor_insert_html (sEditorId, sImgId, sHtml)
  441. {
  442. if ($('#' + sEditorId) && $('#' + sEditorId).attr('object_editor')){
  443. eval ('oEditor = ' + $('#' + sEditorId).attr('object_editor'));
  444. if (oEditor.getSelection())
  445. oEditor.clipboard.dangerouslyPasteHTML(oEditor.getSelection().index, sHtml, 'api');
  446. else
  447. oEditor.clipboard.dangerouslyPasteHTML(0, sHtml, 'api');
  448. }
  449. }
  450. function bx_editor_insert_img (sEditorId, sImgId, sImgUrl, sClasses)
  451. {
  452. if ('undefined' == typeof(sClasses))
  453. sClasses = '';
  454. bx_editor_insert_html(sEditorId, sImgId, '<img id="' + sImgId + '" class="' + sClasses + '" src="' + sImgUrl + '" />')
  455. }
  456. function bx_editor_on_space_enter (sCode, sEditorId, bSpace = true)
  457. {
  458. if (typeof glBxEditorOnSpaceEnterTimer !== 'undefined')
  459. clearTimeout(glBxEditorOnSpaceEnterTimer);
  460. if (bSpace)
  461. glBxEditorOnSpaceEnterTimer = setTimeout(bx_editor_on_space_enter_in, 500, sCode, sEditorId);
  462. else
  463. bx_editor_on_space_enter_in(sCode, sEditorId);
  464. }
  465. function bx_editor_on_space_enter_in(sCode, sEditorId) {
  466. glBxEditorOnSpaceEnterTimer = undefined;
  467. if (typeof glOnSpaceEnterInEditor !== 'undefined' && glOnSpaceEnterInEditor instanceof Array) {
  468. for (var i = 0; i < glOnSpaceEnterInEditor.length; i++) {
  469. if (typeof glOnSpaceEnterInEditor[i] === "function") {
  470. glOnSpaceEnterInEditor[i](sCode, sEditorId);
  471. }
  472. }
  473. }
  474. }
  475. function bx_editor_remove_img (aEditorIds, aMarkers)
  476. {
  477. for (var i = 0; i < aEditorIds.length; i++) {
  478. var eEditor = $('#' + $('#' + aEditorIds[i]).attr('object_editor'));
  479. // delete images in html editor
  480. for (var k = 0; k < aMarkers.length; k++) {
  481. var jFiles = eEditor.find(aMarkers[k]);
  482. jFiles.each(function () {
  483. $(this).remove();
  484. });
  485. }
  486. }
  487. }
  488. /** @} */