Optimierungen Frontend Inhaltseditor #92
@@ -35,7 +35,7 @@ function createFormula(text = "") {
|
|||||||
const addVariableButton = document.createElement('button');
|
const addVariableButton = document.createElement('button');
|
||||||
addVariableButton.type = "button";
|
addVariableButton.type = "button";
|
||||||
addVariableButton.innerText = "+";
|
addVariableButton.innerText = "+";
|
||||||
addVariableButton.classList.add("w-1/12", "float-right", "px-4", "py-3", "border", "rounded-lg", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "text-lg", "enabled:hover:border-gray-400");
|
addVariableButton.classList.add("w-2/12", "md:w-1/12", "float-right", "px-4", "py-3", "border", "rounded-lg", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "text-lg", "enabled:hover:border-gray-400");
|
||||||
addVariableButton.onclick = () => {
|
addVariableButton.onclick = () => {
|
||||||
createVariable(formulaElement.id);
|
createVariable(formulaElement.id);
|
||||||
};
|
};
|
||||||
@@ -57,7 +57,7 @@ function createVariable(formulaUID, variableText = "", valueText = "") {
|
|||||||
const variableElement = document.createElement('input');
|
const variableElement = document.createElement('input');
|
||||||
variableElement.type = 'text';
|
variableElement.type = 'text';
|
||||||
variableElement.classList.add('input-variable');
|
variableElement.classList.add('input-variable');
|
||||||
variableElement.classList.add("w-6/12", "px-4", "py-3", "border", "rounded-lg", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "text-lg", "enabled:hover:border-gray-400")
|
variableElement.classList.add("w-5/12", "md:w-6/12", "px-4", "py-3", "border", "rounded-lg", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "text-lg", "enabled:hover:border-gray-400")
|
||||||
variableElement.value = variableText;
|
variableElement.value = variableText;
|
||||||
variableElement.placeholder = "Variable";
|
variableElement.placeholder = "Variable";
|
||||||
variableElement.onchange = updateFormulaText;
|
variableElement.onchange = updateFormulaText;
|
||||||
@@ -66,7 +66,7 @@ function createVariable(formulaUID, variableText = "", valueText = "") {
|
|||||||
const valueElement = document.createElement('input');
|
const valueElement = document.createElement('input');
|
||||||
valueElement.type = 'text';
|
valueElement.type = 'text';
|
||||||
valueElement.classList.add('input-value');
|
valueElement.classList.add('input-value');
|
||||||
valueElement.classList.add("w-5/12", "px-4", "py-3", "border", "rounded-lg", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "text-lg", "enabled:hover:border-gray-400")
|
valueElement.classList.add("w-5/12", "md:w-5/12", "px-4", "py-3", "border", "rounded-lg", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "text-lg", "enabled:hover:border-gray-400")
|
||||||
valueElement.value = valueText;
|
valueElement.value = valueText;
|
||||||
valueElement.placeholder = "Richtiger Wert";
|
valueElement.placeholder = "Richtiger Wert";
|
||||||
valueElement.onchange = updateFormulaText;
|
valueElement.onchange = updateFormulaText;
|
||||||
@@ -75,7 +75,7 @@ function createVariable(formulaUID, variableText = "", valueText = "") {
|
|||||||
const removeButton = document.createElement('button');
|
const removeButton = document.createElement('button');
|
||||||
removeButton.type = "button";
|
removeButton.type = "button";
|
||||||
removeButton.innerText = "-"
|
removeButton.innerText = "-"
|
||||||
removeButton.classList.add("w-1/12", "px-4", "py-3", "border", "rounded-lg", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "text-lg", "enabled:hover:border-gray-400");
|
removeButton.classList.add("w-2/12", "md:w-1/12", "px-4", "py-3", "border", "rounded-lg", "focus:outline-none", "focus:ring-2", "focus:ring-blue-500", "text-lg", "enabled:hover:border-gray-400");
|
||||||
removeButton.onclick = () => {
|
removeButton.onclick = () => {
|
||||||
variableValueElement.remove();
|
variableValueElement.remove();
|
||||||
updateFormulaText();
|
updateFormulaText();
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="quillEditor" style="height: 600px;" class="bg-white border rounded-lg"><?php
|
<div id="quillEditor" class="h-[600px] xl:h-auto bg-white border rounded-lg"><?php
|
||||||
$article = $defaultValues['article'];
|
$article = $defaultValues['article'];
|
||||||
|
|
||||||
echo $article;
|
echo $article;
|
||||||
|
|||||||
Reference in New Issue
Block a user