How can I configure the WYSYGYG editor options in MB Frontend Submission?
Support › MB Frontend Submission › How can I configure the WYSYGYG editor options in MB Frontend Submission?
- This topic has 4 replies, 3 voices, and was last updated 1 year, 8 months ago by
Andrew Wheeler.
-
AuthorPosts
-
September 1, 2021 at 12:29 AM #30523
Fede
ParticipantI 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?
September 1, 2021 at 12:39 AM #30525Fede
ParticipantI can't edit the text above (there were mixed references). This is the other code I have tried:
September 1, 2021 at 3:42 PM #30534Fede
ParticipantThis 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?
September 1, 2021 at 11:19 PM #30546Long Nguyen
ModeratorHi,
FYI, the settings under
tinymce
are applied to the Visual tab. The settings underquicktags
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/Qwu52L0GRead more on the documentation
https://codex.wordpress.org/TinyMCE
https://codex.wordpress.org/Quicktags_APIAugust 11, 2023 at 9:24 PM #42898Andrew Wheeler
Participanthi. old thread, but looking for an answer to an issue. I'm using the metabox UI and trying to get the following in quicktags.buttons - strong,em,u,link. i get bold, italics, and link correctly, but not <u> underline.
is it me?
-
AuthorPosts
- You must be logged in to reply to this topic.