Closed achertovsky closed 7 years ago
Trying to call tinyMCE like in code below. Not working. If i will change first line to $form->field($item, 'filledTemplate')->widget(TinyMce::className(), [ it will work
$form->field($item, 'filledTemplate')->widget(TinyMce::className(), [
$form->field($item, '['.$key.']filledTemplate')->widget(TinyMce::className(), [ 'options' => [ 'rows' => 26 ], 'clientOptions' => [ 'plugins' => [ "advlist autolink lists link charmap preview anchor textcolor image", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste" ], 'toolbar' => "undo redo | styleselect | fontsizeselect bold italic | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", 'fontsize_formats'=> '8pt 10pt 12pt 14pt 18pt 24pt 36pt', 'remove_linebreaks' => false, 'convert_newlines_to_brs' => true, 'remove_redundant_brs' => false, 'allow_html_in_named_anchor' => true, 'allow_conditional_comments' => true, 'allow_script_urls' => true, 'inline_styles'=>true, 'relative_urls' => false, 'remove_script_host' => false, 'verify_html' => false, 'extended_valid_elements' => "script[language|type],p[style]", 'valid_children' => "+body[style|link]", 'valid_elements' => '*[*]', ] ])->label(false);
I think you need to do it like this
$form->field($item, 'filledTemplate[' . $key.'])...
Trying to call tinyMCE like in code below. Not working. If i will change first line to
$form->field($item, 'filledTemplate')->widget(TinyMce::className(), [
it will work