WYSIWYG module integration

webno - August 5, 2008 - 19:06
Project:Asset
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I added the following code to asset.module:

<?php
function asset_wysiwyg_plugin($editor) {
  switch (
$editor) {
    case
'tinymce':
      return array(
       
'drupalasset' => array(
         
'path' => drupal_get_path('module', 'asset') .'/tinymce/drupalasset',
         
'buttons' => array('drupalasset' => 'DrupalAsset'),
        )
      );
  }
}
?>

and made a directory 'images' in 'modules/asset/tinymce/drupalasset' containing a .gif image named 'drupalasset.gif' which i copied from img_assist/drupalimages/images/drupalimage.gif

That's all that is needed to get asset working with wysiwyg.

AttachmentSize
asset.module.wysiwyg.patch577 bytes

#1

webno - August 5, 2008 - 19:42

On further testing I found that:

mp3: mp3player works, but mp3 link does not.

Youtube: only embed works. Link does not. I'm unsure about thumbnail image because this also does not work with wysiwyg disabled (?)

swf: embed works, links don't.

All in all, links don't work.

Any idea where to change what in order to have links inserted into the editor correctly?

Bart.

#2

HansBKK - October 10, 2008 - 02:27

+1

Thanks a lot for helping move this forward! Sorry I'm not able to help. Maybe if you posted the examples of what does get inserted in each case that would be helpful for those that aren't WYSIWYG users?

#3

jdotti - November 30, 2008 - 15:10

Subscribe.

JD

#4

Owen Barton - January 27, 2009 - 00:39

Subscribe

#5

sun - February 6, 2009 - 22:58

subscribing

#6

arthurf - March 24, 2009 - 13:02

subscribing

#7

Owen Barton - March 25, 2009 - 21:46
Status:active» needs work

I only got halfway done with this and had to stop, but here is a (fairly ambitious) work in progress that aims to completely replace assets popup handling and tinymce integration with wysiwyg module. It's been a couple of weeks since I worked on this and I can't remember the exact state I left it in (so wherever I was working may be borked), but I am pretty sure that I got the popup and return working, and just needed to fix the in editor preview to/from functions. The nice thing about this, if we get it working is that it should work seamlessly in TinyMCE 2 and 3 (and even other editors, potentially), should be pretty trivial to apply to Drupal 6 asset, and should help reduce the overall code bulk (once we delete the old popup and TinyMCE stuff).

The plugins.zip needs to be unpacked in the asset directory.

AttachmentSize
wysiwyg.patch 6.88 KB
plugins.zip 5.06 KB

#8

freddyseubert - March 27, 2009 - 12:37

nice one. subscribing

#9

arthurf - April 13, 2009 - 17:52

subscribing

#10

jide - April 13, 2009 - 21:17

I do not know if this can be of any help, but i rewrote the TinyMCE plugin for TinyMCE 3 (i had a situation where there was TinyMCE module for D5 with TinyMCE 3).

AttachmentSize
drupalasset.zip 10.42 KB
 
 

Drupal is a registered trademark of Dries Buytaert.