From d28c77a49b1c430f6843985ca61f5e36ddeaf34c Mon Sep 17 00:00:00 2001 From: indigoxela Date: Tue, 25 Jun 2024 07:48:34 +0200 Subject: [PATCH] Issue #112: Make sure the class is only added once (#118) --- js/tinymce-integration.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/tinymce-integration.js b/js/tinymce-integration.js index a1d1c9b..baff49e 100644 --- a/js/tinymce-integration.js +++ b/js/tinymce-integration.js @@ -27,7 +27,10 @@ options.convert_urls = false; // Add tiny's skin name to body classes for easier styling. - $('body').addClass('tinymce-skin-' + options.skin); + let skinClass = 'tinymce-skin-' + options.skin; + if (!$('body').hasClass(skinClass)) { + $('body').addClass(skinClass); + } // Additional variables from hook. for (let item in format.editorSettings.backdrop) {