getDocument(); $language = $app->getLanguage(); $text_direction = $language->isRTL() ? 'rtl' : 'ltr'; $langMode = 1; $langPrefix = ($langMode == 1) ? substr($language->getTag(), 0, strpos($language->getTag(), '-')) : 'en'; $newLines = 1; if ($newLines) { // br // "force_br_newlines : true, force_p_newlines : false, forced_root_block : '',"; $force_br_newlines = 'true'; $force_p_newlines = 'false'; $forced_root_block = ''; } else { // p // "force_br_newlines : false, force_p_newlines : true, forced_root_block : 'p'"; $force_br_newlines = 'false'; $force_p_newlines = 'true'; $forced_root_block = "p"; } $root = Uri::root(); $src = $root . "media/vendor/tinymce/tinymce.min.js"; // create the JavaScript script $scripts = << END; // repair boolean 'true' and 'false' values in tinymce init() settings // the 'true' and 'false' values in tinymce init() settings are necessary in order to comply with the IDE language parsing // --> there would be huge parsing errors instead $scripts = str_replace("'true'", 'true', $scripts); $scripts = str_replace("'false'", 'false', $scripts); $doc->addCustomTag($scripts); return true; } }