• Hello!
    Created textarea field use wp_editor

    $settings=array(
    			'wpautop' => 0,//применять функцию wpautop
    			'media_buttons' => 1,//включить медиакнопку
    			'textarea_name' => 'description', //нужно указывать!
    			'textarea_rows' => 7,
    			'tabindex'      => null,
    			'editor_css'    => '',
    			'editor_class'  => '',
    			'teeny'         => 0,
    			'dfw'           => 0,
    			'tinymce'       => 1,
    			'quicktags'     => 1,
    			'drag_drop_upload' => false
    		);
    		wp_editor($_POST['description'], 'editdescription', $settings );

    and this field not supported embed video link from youtube,
    editor for post supported it.
    Why my redactor not provide it ???

    This is screen where video not embedded, How me on this functionality to my costume editor ???
    https://prntscr.com/bv6faa
    how you can see, video not add ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    When the editor area’s content is saved, pass the content through $GLOBALS['wp_embed']->autoembed()
    Untested, but it is at least a promising start.

    The WP editor does this automatically, along with several other things. When you make your own editor instance, these things are not applied automatically, you need to explicitly apply them.

    Thread Starter kselax

    (@ninja22)

    When the editor area’s content is saved, pass the content through $GLOBALS[‘wp_embed’]->autoembed()
    Untested, but it is at least a promising start.

    no, when saved post content, processing tag [embed] because this function make queries to database and retrieve some data or insert, I’m not good review the code.

    Embed in your own editor video need create your own new shortcode and process it, there exist special function wp_oembed_get for embed video.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘don't embeded video in textarea’ is closed to new replies.