erweiterter Beitragseditor
content ist nun im json-Format Bilder können hochgeladen werden Textblöcke können im Editor angehangen werden
This commit is contained in:
@@ -33,19 +33,18 @@ function articleTitleValidator($title)
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft, ob der Contenttext 10-7000 Zeichen enthält.
|
||||
* @param $content
|
||||
* Prüft, ob der übergebene Content ein formal valider JSON-String ist.
|
||||
* @param mixed $content Der zu prüfende Inhalt
|
||||
* @return bool
|
||||
*/
|
||||
function articleContentValidator($content)
|
||||
{
|
||||
$content = trim($content);
|
||||
$zeichenAnzahl = mb_strlen($content);
|
||||
if ($zeichenAnzahl <= 7000 && $zeichenAnzahl >= 10) {
|
||||
return true;
|
||||
}else{
|
||||
if (!is_string($content)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Prüft direkt, ob der String valides JSON enthält
|
||||
return json_validate($content);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user