From f3496d894b51e5172d500d75263c041e5e40f8c7 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 26 Sep 2019 11:36:43 +0100 Subject: [PATCH] Adds contenteditable=false attribute as for whatever reason the CSS class of .mceNonEditable is not working when a macro is saved & loaded in a content node --- .../src/common/services/tinymce.service.js | 5 +++++ 1 file changed, 5 insertions(+) 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 a91e3d6ecc..2a4f12c4d4 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 @@ -803,6 +803,11 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s //show the throbber $macroDiv.addClass("loading"); + // Add the contenteditable="false" attribute + // As just the CSS class of .mceNonEditable is not working by itself?! + // TODO: At later date - use TinyMCE editor DOM manipulation as opposed to jQuery + $macroDiv.attr("contenteditable", "false"); + var contentId = $routeParams.id; //need to wrap in safe apply since this might be occuring outside of angular