# while generating the part if($usersettings[markuptype] eq 'html' && !$usersettings[disable_forced_preview] && $usersettings[graphical_content_editor]) { # external JS file also includes some form of "document.addEventListener("DOMContentLoaded", function(event) {" # to initialize the editor after the browser has finished loading everything. # This way it should not conflict with content security policy $html .= ''; }