I have been attempting this for ages. I’ve this textarea in my plugin, that I would like to exchange with wp_editor. wp_editor will get the information however would not set it when adjustments are made.
This is my textarea (it save’s the information exactly):
<textarea id="im_description<?php echo $rowimages->id; ?>" placeholder="<?php echo __( 'Description', 'portfolio-gallery' ); ?>"
identify="im_description<?php echo $rowimages->id; ?>"><?php echo
esc_html( stripslashes( $rowimages->description ) ); ?></textarea>
This is my editor code (shows the information, however would not replace it when i modify it within the editor):
<?php wp_editor( $rowimages->description, 'mysecondeditor'); ?>
This may be an incredible tutorial for individuals who’d like to make use of the editor of their plugins.
EDIT: switched to wp_editor, as a result of the_editor was deprecated.
EDIT no. 2: Accomplished this replace operate but it surely would not appear to work. What am I doing improper?
<?php if( isset( $_POST[$editor_id] ) )
update_post_meta( $content material, 'editor_id', wp_kses( $_POST['editor_id'], $allowed ) );?>
My textarea:
<textarea rows="20" autocomplete="off" cols="40" identify="im_description10" id="im_description10">textual content</textarea>
WP_edit textual content
<textarea id="im_description10" placeholder="Description" identify="im_description10" fashion="peak: 122px;" aria-hidden="false">textual content</textarea>
WP_edit wealthy
<physique id="tinymce" class="mce-content-body im_description10 locale-lt-lt mceContentBody webkit wp-editor html4-captions" data-id="im_description10" contenteditable="true"><p>textual content</p></physique>