Merge pull request #871 from ranjanjharavi/fix-849-Insert-From-Web-YoutubeURL
Insert from web - allowing YouTube URLs
This commit is contained in:
commit
7f18b65c7a
|
@ -77,30 +77,20 @@
|
|||
<provider>
|
||||
<id>56744E0A-1892-4b56-B7FF-3A2568EE2D27</id>
|
||||
<serviceName>YouTube</serviceName>
|
||||
<editorFormat xpp:if="version lt 15.4.3104.0816">
|
||||
<editorFormat>
|
||||
<![CDATA[
|
||||
<embed src="http://www.youtube.com/v/{videoId}" type="application/x-shockwave-flash" wmode="transparent" width="{width}" height="{height}"></embed>
|
||||
<iframe src="http://www.youtube.com/embed/{videoId}" width="{width}" height="{height}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
]]>
|
||||
</editorFormat>
|
||||
<editorFormat xpp:if="version gte 15.4.3104.0816">
|
||||
<embedFormat>
|
||||
<![CDATA[
|
||||
<embed src="http://www.youtube.com/v/{videoId}?hd=1" type="application/x-shockwave-flash" wmode="transparent" width="{width}" height="{height}"></embed>
|
||||
]]>
|
||||
</editorFormat>
|
||||
<embedFormat xpp:if="version lt 15.4.3104.0816">
|
||||
<![CDATA[
|
||||
<object width="{width}" height="{height}"><param name="movie" value="http://www.youtube.com/v/{videoId}&hl=en"></param><embed src="http://www.youtube.com/v/{videoId}&hl=en" type="application/x-shockwave-flash" width="{width}" height="{height}"></embed></object>
|
||||
]]>
|
||||
</embedFormat>
|
||||
<embedFormat xpp:if="version gte 15.4.3104.0816">
|
||||
<![CDATA[
|
||||
<object width="{width}" height="{height}"><param name="movie" value="http://www.youtube.com/v/{videoId}?hl=en&hd=1"></param><embed src="http://www.youtube.com/v/{videoId}?hl=en&hd=1" type="application/x-shockwave-flash" width="{width}" height="{height}"></embed></object>
|
||||
<iframe src="http://www.youtube.com/embed/{videoId}" width="{width}" height="{height}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
]]>
|
||||
</embedFormat>
|
||||
<embedPatterns>
|
||||
<pattern name="src">
|
||||
<![CDATA[
|
||||
http://www.youtube.com/v/(?<id>[^&\?]*)
|
||||
http://www.youtube.com/embed/(?<id>[^&\?]*)
|
||||
]]>
|
||||
</pattern>
|
||||
</embedPatterns>
|
||||
|
@ -111,7 +101,7 @@
|
|||
</urlFormat>
|
||||
<urlPattern>
|
||||
<![CDATA[
|
||||
(http://www.youtube.com/user/[^#]*[^\n]*/(?<id>[^&]*)|^http://(.+\.)?youtube.com/watch(\?|\#!)v=(?<id>[^&]*))
|
||||
((http|https)://www.youtube.com/user/[^#]*[^\n]*/(?<id>[^&]*)|^(http|https)://(.+\.)?youtube.com/watch(\?|\#!)v=(?<id>[^&]*)|^(http|https)://youtu.be/(?<id>[^&]*))
|
||||
]]>
|
||||
</urlPattern>
|
||||
<size xpp:if="version lt 15.4.3104.0816">
|
||||
|
|
|
@ -376,7 +376,7 @@ namespace OpenLiveWriter.PostEditor.Video
|
|||
|
||||
private static string CreateHtml(string html, string color)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"><body style='margin: 0; padding: 0;background-color: #{1}'>{0}</body></html>", html, color);
|
||||
return String.Format(CultureInfo.InvariantCulture, "<!DOCTYPE html><html><head><meta content='IE=Edge' http-equiv='X-UA-Compatible'/></head><body style='margin: 0; padding: 0;background-color: #{1}'>{0}</body></html>", html, color);
|
||||
}
|
||||
|
||||
private void lblService_SizeChanged(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in New Issue