How to modify the settings for the Post Content edit field
GravityView uses the wp_editor()
function provided by WordPress to enable rich text editing when editing the Post Content field. See what settings are available
If you want to modify the functionality of the editor, you can use the gravityview/edit_entry/post_content/wp_editor_settings
filter, which accepts the same parameters as the wp_editor()
function.
Enable the "Add Media" button
By default, GravityView has the "Add Media" button disabled. To enable it, use the code below:
function modify_gv_wp_editor_settings_add_media( $settings ) { $settings['media_buttons'] = true; return $settings; } add_filter('gravityview/edit_entry/post_content/wp_editor_settings', 'modify_gv_wp_editor_settings_add_media');
Disable the Rich Text Editor
If you prefer only to allow editing the text content as HTML, you can also disable the output like so:
function modify_gv_wp_editor_settings_disable_tinymce( $settings ) { $settings['tinymce'] = false; return $settings; } add_filter('gravityview/edit_entry/post_content/wp_editor_settings', 'modify_gv_wp_editor_settings_disable_tinymce');
There are many settings that you can use to customize the output of the editor. See what settings are available.
Read here how to add these code samples to your website: Where to put code samples.