Skip to content
Permalink
Browse files

Merge pull request #83 from cosmocode/nonImageLink

Media wizard handles all media, not only images
  • Loading branch information...
splitbrain committed Aug 19, 2019
2 parents 02f019a + 75cda39 commit dc7de1808ddc7bdae330dce6784ce1b22226c25e
Showing with 8 additions and 2 deletions.
  1. +1 −1 lang/de/lang.php
  2. +1 −1 lang/en/lang.php
  3. +6 −0 script/nodeviews/MediaForm.js
@@ -56,7 +56,7 @@
$lang['js']['label:footnote'] = 'Fußnote hinzufügen';
$lang['js']['label:headings'] = 'Überschriften';
$lang['js']['label:heading'] = 'Überschrift %s';
$lang['js']['label:image'] = 'Bild einfügen';
$lang['js']['label:image'] = 'Bild oder Datei einfügen';
$lang['js']['label:liftLI'] = 'Listenelement einrücken';
$lang['js']['label:link'] = 'Link einfügen';
$lang['js']['label:orderedList'] = 'geordnete Liste';
@@ -56,7 +56,7 @@
$lang['js']['label:footnote'] = 'Add a footnote';
$lang['js']['label:headings'] = 'Headings';
$lang['js']['label:heading'] = 'Heading %s';
$lang['js']['label:image'] = 'Insert Image';
$lang['js']['label:image'] = 'Insert image or file';
$lang['js']['label:liftLI'] = 'Lift list item';
$lang['js']['label:link'] = 'Insert Link';
$lang['js']['label:orderedList'] = 'Wrap in ordered list';
@@ -40,6 +40,12 @@ class MediaForm extends CustomForm {
*/
mediaSelect(edid, mediaid, opts, align) {
this.setSource(mediaid);

// there are no options when media is not an image, nothing to set
if (!opts) {
return;
}

const [, linking, width] = /\?([a-z]+)?&?(\d+)?/.exec(opts);
this.setWidth(width);
this.setHeight();

0 comments on commit dc7de18

Please sign in to comment.
You can’t perform that action at this time.