@ckeditor/ckeditor5-media-embed 35.0.1 → 35.1.0
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.
- package/build/media-embed.js +2 -2
- package/build/translations/ar.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +2 -1
- package/lang/translations/ar.po +4 -0
- package/lang/translations/az.po +4 -0
- package/lang/translations/bg.po +4 -0
- package/lang/translations/bn.po +4 -0
- package/lang/translations/ca.po +4 -0
- package/lang/translations/cs.po +4 -0
- package/lang/translations/da.po +4 -0
- package/lang/translations/de-ch.po +4 -0
- package/lang/translations/de.po +4 -0
- package/lang/translations/el.po +4 -0
- package/lang/translations/en-au.po +4 -0
- package/lang/translations/en-gb.po +4 -0
- package/lang/translations/en.po +4 -0
- package/lang/translations/es.po +4 -0
- package/lang/translations/et.po +4 -0
- package/lang/translations/fa.po +4 -0
- package/lang/translations/fi.po +4 -0
- package/lang/translations/fr.po +4 -0
- package/lang/translations/gl.po +4 -0
- package/lang/translations/he.po +4 -0
- package/lang/translations/hi.po +4 -0
- package/lang/translations/hr.po +4 -0
- package/lang/translations/hu.po +4 -0
- package/lang/translations/id.po +4 -0
- package/lang/translations/it.po +4 -0
- package/lang/translations/ja.po +4 -0
- package/lang/translations/ko.po +4 -0
- package/lang/translations/ku.po +4 -0
- package/lang/translations/lt.po +4 -0
- package/lang/translations/lv.po +4 -0
- package/lang/translations/ms.po +4 -0
- package/lang/translations/ne.po +4 -0
- package/lang/translations/nl.po +4 -0
- package/lang/translations/no.po +4 -0
- package/lang/translations/pl.po +4 -0
- package/lang/translations/pt-br.po +4 -0
- package/lang/translations/pt.po +4 -0
- package/lang/translations/ro.po +4 -0
- package/lang/translations/ru.po +4 -0
- package/lang/translations/sk.po +4 -0
- package/lang/translations/sq.po +4 -0
- package/lang/translations/sr-latn.po +4 -0
- package/lang/translations/sr.po +4 -0
- package/lang/translations/sv.po +4 -0
- package/lang/translations/th.po +4 -0
- package/lang/translations/tk.po +4 -0
- package/lang/translations/tr.po +4 -0
- package/lang/translations/uk.po +4 -0
- package/lang/translations/ur.po +6 -2
- package/lang/translations/uz.po +4 -0
- package/lang/translations/vi.po +4 -0
- package/lang/translations/zh-cn.po +4 -0
- package/lang/translations/zh.po +4 -0
- package/package.json +18 -18
- package/src/mediaregistry.js +6 -7
- package/theme/mediaembedediting.css +0 -8
package/src/mediaregistry.js
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
* @module media-embed/mediaregistry
|
8
8
|
*/
|
9
9
|
|
10
|
-
import {
|
10
|
+
import { IconView, Template } from 'ckeditor5/src/ui';
|
11
11
|
import { logWarning, toArray } from 'ckeditor5/src/utils';
|
12
12
|
|
13
13
|
import mediaPlaceholderIcon from '../theme/icons/media-placeholder.svg';
|
@@ -185,7 +185,7 @@ class Media {
|
|
185
185
|
* @see module:utils/locale~Locale#t
|
186
186
|
* @method
|
187
187
|
*/
|
188
|
-
this.
|
188
|
+
this._locale = locale;
|
189
189
|
|
190
190
|
/**
|
191
191
|
* The output of the `RegExp.match` which validated the {@link #url} of this media.
|
@@ -271,10 +271,9 @@ class Media {
|
|
271
271
|
* @returns {String}
|
272
272
|
*/
|
273
273
|
_getPlaceholderHtml() {
|
274
|
-
const tooltip = new TooltipView();
|
275
274
|
const icon = new IconView();
|
275
|
+
const t = this._locale.t;
|
276
276
|
|
277
|
-
tooltip.text = this._t( 'Open media in new tab' );
|
278
277
|
icon.content = mediaPlaceholderIcon;
|
279
278
|
icon.viewBox = mediaPlaceholderIconViewBox;
|
280
279
|
|
@@ -297,7 +296,8 @@ class Media {
|
|
297
296
|
class: 'ck-media__placeholder__url',
|
298
297
|
target: '_blank',
|
299
298
|
rel: 'noopener noreferrer',
|
300
|
-
href: this.url
|
299
|
+
href: this.url,
|
300
|
+
'data-cke-tooltip-text': t( 'Open media in new tab' )
|
301
301
|
},
|
302
302
|
children: [
|
303
303
|
{
|
@@ -306,8 +306,7 @@ class Media {
|
|
306
306
|
class: 'ck-media__placeholder__url__text'
|
307
307
|
},
|
308
308
|
children: [ this.url ]
|
309
|
-
}
|
310
|
-
tooltip
|
309
|
+
}
|
311
310
|
]
|
312
311
|
}
|
313
312
|
]
|
@@ -3,8 +3,6 @@
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
|
6
|
-
@import "@ckeditor/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css";
|
7
|
-
|
8
6
|
.ck-media__wrapper {
|
9
7
|
& .ck-media__placeholder {
|
10
8
|
display: flex;
|
@@ -12,17 +10,11 @@
|
|
12
10
|
align-items: center;
|
13
11
|
|
14
12
|
& .ck-media__placeholder__url {
|
15
|
-
@mixin ck-tooltip_enabled;
|
16
|
-
|
17
13
|
/* Otherwise the URL will overflow when the content is very narrow. */
|
18
14
|
max-width: 100%;
|
19
15
|
|
20
16
|
position: relative;
|
21
17
|
|
22
|
-
&:hover {
|
23
|
-
@mixin ck-tooltip_visible;
|
24
|
-
}
|
25
|
-
|
26
18
|
& .ck-media__placeholder__url__text {
|
27
19
|
overflow: hidden;
|
28
20
|
display: block;
|