Skip to content

Fieldmanager_RichTextArea content isn't always saved when adding terms #695

@dlh01

Description

@dlh01

This field will save as expected on the edit-term screen, but not the add-term screen:

add_action( 'fm_term_category', function ( $term ) {
	$fm = new \Fieldmanager_RichTextArea( 'Foo', [
		'name' => 'foo',
	] );
	$fm->add_term_meta_box( 'Bar', $term );
} );

Some additional logic is needed to make sure the TinyMCE instance gets saved before the Ajax request to create the term is sent. (One way to see this in action is to switch the field to the Text tab before creating the term, which saves the current editor content.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions