In settings for media gallery in configuration tab it's possible to specified FULL Html format for text. The problem and I don't know if it's a bug or by design, when you create or edit a gallery it's not possible to have by exemple Wysiwig with TinyMCE. You have to input the full code manually. It would be nice to be able to use the input format setting for the main core who is normally available when creating a blog or article node. Even if you go to structure for the content type gallery we are not able to modified the gallery description field, it says it's lock !

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

David_Rothstein’s picture

Title: Support for other format of the description » Add text format support to the media gallery description field
Category: bug » feature

Seems like it would be reasonable to set up this field so that it uses text formats, yes. I can't think of any downsides.

Even if you go to structure for the content type gallery we are not able to modified the gallery description field, it says it's lock !

Some of the fields have to be locked because it would break the module if someone removed them or changed them in certain ways. It would be really nice if we could "partially" lock them (rather than lock them completely) but I don't think there is a simple way to do that (it would be great if someone could prove me wrong though).

David_Rothstein’s picture

By the way, as described at http://www.drupalgardens.com/content/feature-request-galleries-wysiwyg-e..., one way to work around this limitation for now would just be to add your own custom field to gallery nodes (separate from the description field), and use that one instead.

sw3b’s picture

Yes this is what I did because the actuall body cannot make it. I also agree with you on unlock some fields so that way we can configure them.

james.elliott’s picture

Patch attached for this.

David_Rothstein’s picture

The update function looks potentially dangerous... what text format will the content get after update? It seems like it could break existing formatting.

We could partially mitigate that problem by forcing existing content to be assigned the site's fallback format (a.k.a. usually plain text) after the update... But I'm not sure if that's easy to do.

Daeluin’s picture

subscribing

chaloum’s picture

The patch didnt seem to change the text formatting still plain text

David_Rothstein’s picture

Status: Active » Reviewed & tested by the community

Ah, right, when you view the description after the update it actually will fall back to plain text (since the format is stored as NULL in the database).

The bug I'm thinking of is actually when you go to edit the description for the first time after the update; there, the wrong format will be selected by default (plain text won't be selected, but rather the user's personal default). But that's not quite as serious and really more of a general bug for Drupal core to deal with, in cases where text formats are switched on for a field that's already in use. So this patch seems like it will be good as is.

sun’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/media_gallery.install
@@ -339,6 +339,9 @@ function _media_gallery_controlled_instances($group = NULL) {
+        ),
+      'settings' => array(

@@ -768,6 +771,9 @@ function _media_required_instances() {
+        ),
+      'settings' => array(

Wrong indentation.

+++ b/media_gallery.install
@@ -1227,3 +1233,24 @@ function media_gallery_update_7007() {
+  ¶

Trailing white-space.

+++ b/media_gallery.install
@@ -1227,3 +1233,24 @@ function media_gallery_update_7007() {
+  // Ensure that the media__gallery_description field is filtered text

Duplicate __ ?

Powered by Dreditor.

keha3912’s picture

  • exemple Wysiwig with TinyMCE
  • or ckeditor...

    effulgentsia’s picture

    Version: 7.x-1.0-beta4 » 7.x-1.x-dev
    Status: Needs work » Fixed

    Status: Fixed » Closed (fixed)

    Automatically closed -- issue fixed for 2 weeks with no activity.