From a3de75f4c076256fb353b42214d7b58e9d18a54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 19 Sep 2019 11:34:45 +0200 Subject: [PATCH] added comments + better naming --- .../src/common/services/tinymce.service.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 28df45f10f..865dccc7fa 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -349,24 +349,24 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s }; // We keep spans here, cause removing spans here also removes b-tags inside of them, instead we strip them out later. - var validElements = "-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody,img[src|alt|width|height],ul,ol,li,hr,pre,dl,dt,figure,figcaption,wbr" + var validPasteElements = "-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody,img[src|alt|width|height],ul,ol,li,hr,pre,dl,dt,figure,figcaption,wbr" - // add valid elements from styleFormats. + // add elements from user configurated styleFormats to our list of validPasteElements. var style, i = 0; for(; i < styles.styleFormats.length; i++) { style = styles.styleFormats[i]; if(style.block) { - validElements += "," + style.block; + validPasteElements += "," + style.block; } } var pasteConfig = { paste_remove_styles: true, - paste_text_linebreaktype: true, + paste_text_linebreaktype: true, //Converts plaintext linebreaks to br or p elements. paste_strip_class_attributes: "all", - paste_word_valid_elements: validElements, + paste_word_valid_elements: validPasteElements, paste_preprocess: cleanupPasteData