The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript WordPress plugin for inserting youtube videos

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #35164

    I’m writing a plugin that shows your youtube videos in a media upload thickbox. Selecting several puts them in a list, then pressing a ‘insert into post’ button inserts them into the post.
    It all works fine with one exception. WordPress needs each youtube link on a line all by itself. I can’t get them to go to the post seperated by anything that would create a new line.
    I am using the built in WordPress javascript function send_to_editor();
    I have tryied ‘/n’
    and others I can’t remember. There must be some html character that will force a new line.
    I realize a lot of the problem is tinymce, but even in html mode in the editor, I can’t force a new line between the youtube links.

    I can’t find anything using google as this is a very specific issue.

    Any help would be much appreciated.


    ‘/n/n’ ??


    I tried to paste a string of three of them and the editor on this forum turned one into a video. I tried using


    Wow, I just tried adding a

    to the string and, as long as I keep the editor in visual mode, it starts a new line.
    Problem solved.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.