Projet

Général

Profil

Révision 81b16cc2

Ajouté par Assos Assos il y a plus de 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media/modules/media_wysiwyg/js/wysiwyg-media.js
13 13
 */
14 14
Drupal.wysiwyg.plugins.media = {
15 15

  
16
  /**
17
   * The selected text string.
18
   */
19
  selectedText: null,
20

  
16 21
  /**
17 22
   * Determine whether a DOM element belongs to this plugin.
18 23
   *
......
51 56
        insert.onSelect([media_file]);
52 57
      }
53 58
      else {
59
        // Store currently selected text.
60
        this.selectedText = data.content;
61

  
54 62
        // Insert new media.
55 63
        insert.prompt(settings.global);
56 64
      }
......
118 126
          fid: this.mediaFile.fid,
119 127
          view_mode: formatted_media.type,
120 128
          attributes: this.mediaFile.attributes,
121
          fields: formatted_media.options
129
          fields: formatted_media.options,
130
          link_text: Drupal.wysiwyg.plugins.media.selectedText
122 131
        });
123 132
    // Get the markup and register it for the macro / placeholder handling.
124 133
    var markup = Drupal.media.filter.getWysiwygHTML(element);

Formats disponibles : Unified diff