Реализовано открытие и закрытие вкладок на нажатие трех полосок, добавлена вкладка структуры страницы с возможностью вставки плагинов, подключена библиотека MarkedJS, исправлены баги, управление центральными блоками через CDATA.

This commit is contained in:
2025-11-17 22:57:36 +02:00
parent 5c3e28fd55
commit 68e516b45c
25 changed files with 1315 additions and 178 deletions

View File

@@ -13,27 +13,11 @@ $lang = include $path . 'main_plugin/form_editor/lang.php';
$lng = $_SESSION['lng'] ?? 'en';
if (in_array($_SESSION['username'], $configAdmins, true)) {
$Html = file_get_contents($path . 'main_plugin/form_editor/form_editor.php');
foreach ($lang[$lng] as $key => $value) {
$Html = str_replace('{{' . $key . '}}', $value, $Html);
}
echo $Html;
echo "<script>
document.addEventListener('DOMContentLoaded', () => {
const c = document.querySelector('.center-float');
const d = document.getElementById('formEditor');
if (c && d) {
c.appendChild(document.createElement('br'));
c.appendChild(d);
} else if (d) {
d.remove();
}
});
</script>";
echo '<link rel="stylesheet" type="text/css" href="/main_plugin/form_editor/form_editor.css">';
echo '<script type="text/javascript" src="/main_plugin/form_editor/lang.js.php?lng=' . $lng . '"></script>';
}