Reputation: 133
I am using 2 amigos ckeditor widget
<?= $form->field($model, 'text')->widget(CKEditor::className(), [
'options' => ['rows' => 6],
'preset' => 'basic'
]) ?>
How do I add the configuration settings, I want the editor to accept HTML tags hTML and body which the editor usually stripes off. Where do i specify this setings in the widget.
Upvotes: 2
Views: 1251
Reputation: 133
So i added the configuration 'allowedContent' => true
and it worked.
Upvotes: 0
Reputation: 33538
There is special property called clientOptions
for setting plugin options.
For filtering tags use allowedContent
option, you can read official docs here.
Here is an example of code:
<?= $form->field($model, 'text')->widget(CKEditor::className(), [
'options' => ['rows' => 6],
'preset' => 'basic',
'clientOptions' => [
'allowedContent' => ...,
],
]) ?>
Upvotes: 4