Support Forum
Support › MB Frontend Submission › How can I configure the WYSYGYG editor options in MB Frontend Submission?
I have a CPT which I want to give the possibility to the users to create new entries.
I use the WYSIWYG field to save the content through these instructions https://docs.metabox.io/save-wysiwyg-content-post-content/
The thing is that I have no way to configure the editor options, I have tried both this code https://docs.metabox.io/fields/wysiwyg/#sample-code and this other https://pastebin.com/F4QWtfWm but it still appears like this:
https://prnt.sc/1qw6i4d
I cannot customize buttons, quicktags ...
Is there no possibility to customize it?
I can't edit the text above (there were mixed references). This is the other code I have tried:
This is the code I am using and it does not work to customize the editor for the fake content field:
public function ks_editor_trabajo_realizado($meta_boxes)
{
$post_id = filter_input(INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT);
$post_content = get_post_field('post_content', $post_id);
$meta_boxes[] = [
'title' => 'Descripción del trabajo',
'post_types' => 'trabajo-realizado',
'fields' => [
[
'type' => 'wysiwyg',
'id' => 'content',
'name' => 'Descripción',
'std' => $post_content,
'save_field' => false,
'options' => [
'textarea_rows' => 3,
'media_buttons' => false,
'teeny' => false,
'quicktags' => false,
'tinymce' => [
'media_buttons' => false,
]
]
],
],
];
return $meta_boxes;
}
Any help please?
Hi,
FYI, the settings under tinymce
are applied to the Visual tab. The settings under quicktags
are applied to the Text or HTML tab.
'fields' => [
[
'type' => 'wysiwyg',
'id' => 'content123',
'name' => 'Descripción',
'save_field' => false,
'options' => [
'textarea_rows' => 3,
'media_buttons' => false,
'teeny' => false,
'quicktags' => [
'buttons' => 'strong,em,u,link,ul,ol,li',
],
'tinymce' => [
'toolbar1' => 'bold,italic',
]
]
],
],
See my screenshots
https://share.getcloudapp.com/Wnu0kybY
https://share.getcloudapp.com/Qwu52L0G
Read more on the documentation
https://codex.wordpress.org/TinyMCE
https://codex.wordpress.org/Quicktags_API