@gravity-ui/markdown-editor 14.2.2 → 14.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,6 +53,13 @@ const VideoSpecs = (builder, opts) => {
|
|
|
53
53
|
const service = node.attrs[const_1.VideoAttr.Service];
|
|
54
54
|
const videoId = node.attrs[const_1.VideoAttr.VideoID];
|
|
55
55
|
if (availableServices.has(service) || !videoId) {
|
|
56
|
+
// TODO: remove in next major
|
|
57
|
+
// see https://github.com/gravity-ui/markdown-editor/pull/478
|
|
58
|
+
let src = '';
|
|
59
|
+
if (typeof options.url === 'function')
|
|
60
|
+
src = options.url(service, videoId, options);
|
|
61
|
+
else if (typeof options.videoUrl === 'function')
|
|
62
|
+
src = options.videoUrl(service, videoId, options);
|
|
56
63
|
return [
|
|
57
64
|
'div',
|
|
58
65
|
{
|
|
@@ -65,7 +72,7 @@ const VideoSpecs = (builder, opts) => {
|
|
|
65
72
|
type: 'text/html',
|
|
66
73
|
width: String(options[service].width),
|
|
67
74
|
height: String(options[service].height),
|
|
68
|
-
src:
|
|
75
|
+
src: src,
|
|
69
76
|
frameborder: '0',
|
|
70
77
|
webkitallowfullscreen: '',
|
|
71
78
|
mozallowfullscreen: '',
|
package/build/cjs/version.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
/** During build process, the current version will be injected here */
|
|
5
|
-
exports.VERSION = typeof '14.2.
|
|
5
|
+
exports.VERSION = typeof '14.2.3' !== 'undefined' ? '14.2.3' : 'unknown';
|
|
@@ -47,6 +47,13 @@ export const VideoSpecs = (builder, opts) => {
|
|
|
47
47
|
const service = node.attrs[VideoAttr.Service];
|
|
48
48
|
const videoId = node.attrs[VideoAttr.VideoID];
|
|
49
49
|
if (availableServices.has(service) || !videoId) {
|
|
50
|
+
// TODO: remove in next major
|
|
51
|
+
// see https://github.com/gravity-ui/markdown-editor/pull/478
|
|
52
|
+
let src = '';
|
|
53
|
+
if (typeof options.url === 'function')
|
|
54
|
+
src = options.url(service, videoId, options);
|
|
55
|
+
else if (typeof options.videoUrl === 'function')
|
|
56
|
+
src = options.videoUrl(service, videoId, options);
|
|
50
57
|
return [
|
|
51
58
|
'div',
|
|
52
59
|
{
|
|
@@ -59,7 +66,7 @@ export const VideoSpecs = (builder, opts) => {
|
|
|
59
66
|
type: 'text/html',
|
|
60
67
|
width: String(options[service].width),
|
|
61
68
|
height: String(options[service].height),
|
|
62
|
-
src:
|
|
69
|
+
src: src,
|
|
63
70
|
frameborder: '0',
|
|
64
71
|
webkitallowfullscreen: '',
|
|
65
72
|
mozallowfullscreen: '',
|
package/build/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** During build process, the current version will be injected here */
|
|
2
|
-
export const VERSION = typeof '14.2.
|
|
2
|
+
export const VERSION = typeof '14.2.3' !== 'undefined' ? '14.2.3' : 'unknown';
|