I'm using the latest dev scald and the latest CKEditor through WYSIWYG.

When I drag and drop an image into the CKEditor I get two images. Looking at the HTML there is a slightly different wrapper around each image.

Is this a bug or a set up issue I've yet to learn about. I've used Scald for the first time today so there's much to learn yet.

Here's the code it produces from a DnD operation:

<div class="dnd-atom-wrapper type-image context-sdl_editor_representation" contenteditable="false">
   <div class="dnd-drop-wrapper">
      <!-- scald=1:sdl_editor_representation -->
      <div class="image"><img alt="3_MPIB_overview.JPG" src="http://www.domain.com/files/thumbnails/image/3_MPIB_overview.JPG" title="3_MPIB_overview.JPG" typeof="foaf:Image" height="416" width="560"></div>
      <!-- END scald=1 -->
   </div>
   <div class="dnd-legend-wrapper" contenteditable="true">
      <div class="meta">
         <!--copyright=1-->3_MPIB_overview.JPG, by Test Author<!--END copyright=1-->
         <div class="dnd-atom-wrapper type-image context-sdl_editor_representation" contenteditable="false">
            <div class="dnd-drop-wrapper">
               <!-- scald=1:sdl_editor_representation -->
               <div class="image"><img alt="3_MPIB_overview.JPG" src="http://www.domain.com/files/thumbnails/image/3_MPIB_overview.JPG" title="3_MPIB_overview.JPG" typeof="foaf:Image" height="416" width="560"></div>
               <!-- END scald=1 -->
            </div>
            <div class="dnd-legend-wrapper" contenteditable="true">
               <div class="meta">
                  <!--copyright=1-->3_MPIB_overview.JPG, by Test Author<!--END copyright=1-->
               </div>
            </div>
         </div>
         <p>&nbsp;</p>
      </div>
   </div>
</div>

Comments

gifad’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB

Hi,

You are using CKEditor library via the WYSIWYG module, which is more or less deprecated in scald...

You should either use the CKEditor module, or apply the attached patch;

warning : not tested at all, as I have no config at hand with WYSIWYG module
warning : I think you should

  1. uncheck the 'Scald DnD integration' box
  2. apply this patch
  3. check the 'Scald DnD integration - CKEditor 4 widgets' box

in that order

reg’s picture

Hm,

The reason I used the WYSIWYG version was that the Scald documentation mentions buttons being added to the CKEditor by Scald. In the WYSIWYG I see the buttons on the set up of buttons page. On the native version I don't see anywhere a hint of Scald buttons added to the CKEditor.

On the other hand those buttons on the WYSIWYG version only show in the setup and not on the CKEditor UI so perhaps they are hidden buttons that perform functionality but don't have a visible button component - would that be a fair assessment?

My preference would be to use the Drupal native version any way so if the WYSIWYG version is depreciated and the above is not an issue, just a misunderstanding on my part, then all the better.

It might be worth noting to be fair on the WYSIWYG version that the native Drupal is using a 3.x version of CKEditor whereas the WYSIWYG version recommended to download the latest so you get version 4.5.1 . What bug fixes and enhancements this version has over the Drupal native I don't know but it might be worth supporting the WYSIWYG version just for those people who need some newer feature or want the latest security fixes... just a thought.

nagy.balint’s picture

Not sure what you mean by native Drupal, as Drupal does not include any wysiwyg natively.

However the recommended is to use the ckeditor module with the latest ckeditor library.

Then setting it up like in the documentation should work fine.
https://www.drupal.org/node/1775718

Maybe we can change in the document that the wysiwyg (the module) support is deprecated, @jcisio : should we do that?

nagy.balint’s picture

But if you can verify that the patch by @gifad works, then we could get this patch in nevertheless.

I also dont have any installs right now with wysiwyg (the module).

jcisio’s picture

Most people recently use CKEditor module for CKEditor and we don't always (read: not, most of the time) test with wysiwyg module. But I believe the plugin is standalone so we suggest that people using wysiwyg module report bugs and submit patches. Patch #1 looks trivial and we forgot to change it with the dndck4 plugin commit.

reg’s picture

I'll try to test it over the weekend. I moved everything over to the ckeditor module myself do I'll have to revert some changes before testing.

nagy.balint’s picture

Title: DnD into CKEditor is causing a duplicate image » wysiwyg module dndck4 is not defined

The issue related to the legacy dnd plugin will be fixed in this issue #2552809: [legacy ckeditor plugin] ckeditor 4.5.x compatibility

So the issue remains for the dndck4 definition missing from the wysiwyg module integration.

@Reg did you have a chance to test it yet?

reg’s picture

Sorry, it's still on my radar but the job I am doing just went into "we need it yesterday" so I have to get some deliverables out before I can circle back. I hoping to be at that point sometime this week however so not too long.

nagy.balint’s picture

@Reg any news here? :)

  • nagy.balint committed dcbccd7 on 7.x-1.x authored by gifad
    Issue #2543218 by gifad, Reg: wysiwyg module dndck4 is not defined
    
nagy.balint’s picture

Status: Needs review » Fixed

Tested it locally by enabling wysiwyg module, disabling ckeditor module, and setting it up like that.

Seems to work fine without errors.

So committed.

vrwired’s picture

On a vanilla install:
-I used dev (and recommended version also) wysiwyg and dev scald.
-enabled Scald DnD Library (scald_dnd_library) and Scald Image (scald_image)
-went to ckeditor profile to enable button - not seeing dnd integrate checkbox here
-went to test dnd anyway but to no avail

Maybe I've missed something on config?

gifad’s picture

@vrwired : you should enable the mee module too...
See documentation : Scald Installation / configuration

Status: Fixed » Closed (fixed)

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