Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Embedding YouTube videos

edited February 2013 in MarsEdit

I am trying to add a YouTube video to a blog post in MarsEdit. The way I understand it, I need to place the link to the video on its own line in WordPress, and when I do, WordPress will do some magic and replace my link with an embedded video.

I can't seem to do this using MarsEdit. When I place the link on its own line in text, it gets converted to a link - which I think is just because there are html paragraph tags surrounding the link.

There is some discussion of this here:

I am giving guitar lessons, and embedding videos on the fly during the lesson - I need this to be super quick. Is there any way I can get it to work correctly without having to go back and "unlink" the link in WordPress?




  • Yup - I've confirmed that it's the paragraph tags on either side of the url that get added when editing in rich text mode. When I edit the HTML using MarsEdit, and I remove those p's, the video appears as it should on the website.

    Does anyone know of a way to change this behavior? I tried messing around with the Format macro, but it still seems to add paragraph tags.

    I'm surprised that more people haven't commented on this - makes me think I'm doing something wrong...
  • Hi Johnny - if you are pasting in Rich Text mode then "paragraphs" will always be wrapped in those P tags. You get a new paragraph in Rich Text mode whenever you press the return key.

    Unfortunately I can't think of a way around this short of switching to HTML text mode before you publish. I should look into whether it would be possible to simulate the same kind of "magic" that WordPress does and automatically convert the URL to the embed code. That would certainly be a nice behavior for MarsEdit publishing to whatever systems, not only WordPress.

    Another alternative would be to get in the habit of pasting the embed code yourself instead of just the URL. You can get the embed code from YouTube's video page under the Share section. If you do take this route be sure to select Edit -> Paste HTML Source so it goes in as HTML text and not as styled text.

    Come to think of it, one think you could try if you haven't already is to Edit -> Paste HTML Source the URL instead of just pasting it. Maybe this will protect the formatting enough that WordPress's magic will take place as expected.
  • Addendum: I tried myself and just Paste HTML Source with the URL does not achieve the desired effect. It does seem WordPress's magic only applies if there are no P tags around the text. This seems a shame and is possibly another area where I could request a change of behavior.
  • Thanks Daniel - I think pasting the embed code will be fine - I'll try that.

    Appreciate the quick response.
Sign In or Register to comment.