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>
|
<provider>
|
||||||
<id>56744E0A-1892-4b56-B7FF-3A2568EE2D27</id>
|
<id>56744E0A-1892-4b56-B7FF-3A2568EE2D27</id>
|
||||||
<serviceName>YouTube</serviceName>
|
<serviceName>YouTube</serviceName>
|
||||||
<editorFormat xpp:if="version lt 15.4.3104.0816">
|
<editorFormat>
|
||||||
<![CDATA[
|
<![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>
|
||||||
<editorFormat xpp:if="version gte 15.4.3104.0816">
|
<embedFormat>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<embed src="http://www.youtube.com/v/{videoId}?hd=1" 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>
|
|
||||||
<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>
|
|
||||||
]]>
|
]]>
|
||||||
</embedFormat>
|
</embedFormat>
|
||||||
<embedPatterns>
|
<embedPatterns>
|
||||||
<pattern name="src">
|
<pattern name="src">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
http://www.youtube.com/v/(?<id>[^&\?]*)
|
http://www.youtube.com/embed/(?<id>[^&\?]*)
|
||||||
]]>
|
]]>
|
||||||
</pattern>
|
</pattern>
|
||||||
</embedPatterns>
|
</embedPatterns>
|
||||||
|
@ -111,7 +101,7 @@
|
||||||
</urlFormat>
|
</urlFormat>
|
||||||
<urlPattern>
|
<urlPattern>
|
||||||
<![CDATA[
|
<![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>
|
</urlPattern>
|
||||||
<size xpp:if="version lt 15.4.3104.0816">
|
<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)
|
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)
|
private void lblService_SizeChanged(object sender, EventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue