mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 12:40:08 +02:00
Started to rewrite CKEDITOR placeholder plugin for CKEDITOR5.
This commit is contained in:
parent
a33e93826a
commit
eba89cee62
8 changed files with 374 additions and 1 deletions
|
@ -16,6 +16,9 @@ class RichTextEditorType extends AbstractType
|
|||
|
||||
$resolver->setDefault('mode', 'markdown-full');
|
||||
$resolver->setAllowedValues('mode', ['html-label', 'markdown-single_line', 'markdown-full']);
|
||||
|
||||
$resolver->setDefault('required', false);
|
||||
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
@ -34,11 +37,15 @@ class RichTextEditorType extends AbstractType
|
|||
{
|
||||
$tmp = [];
|
||||
|
||||
//Set novalidate attribute or we will get problems that form can not be submitted as textarea is not focusable
|
||||
$tmp['novalidate'] = 'novalidate';
|
||||
|
||||
$tmp['data-mode'] = $options['mode'];
|
||||
|
||||
//Add our data-controller element to the textarea
|
||||
$tmp['data-controller'] = 'elements--ckeditor';
|
||||
|
||||
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue