Реализовано открытие и закрытие вкладок на нажатие трех полосок, добавлена вкладка структуры страницы с возможностью вставки плагинов, подключена библиотека MarkedJS, исправлены баги, управление центральными блоками через CDATA.
This commit is contained in:
@@ -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>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user