Closed (fixed)
Project:
Wysiwyg
Version:
7.x-2.1
Component:
Plugins
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2011 at 09:51 UTC
Updated:
14 May 2012 at 04:40 UTC
Hi,
I'm working on a filter-like module that will allow users to plant show/hide tags in their text, to create a fold-out effect when parsed for display (using jQuery).
I want this module to interact with WYSIWYG, but not sure if it's possible and how to pull it off.
Any ideas, advice, or price quotes? :-)
Comments
Comment #1
twodWell, I can't really say much without knowing how your module achieves the fold-out effect. ;)
Is it ultimately inserting fieldsets and using them the way Drupal core does it. Is using something like
[foldout_begin].....[foldout_end]or<!--foldout_begin-->.....<!--foldout_end-->markers when editing?Our cross-editor API is currently too limited to handle wrapping content in such tags, it's more aimed at inserting singular markers like
<!--break-->or[[uploaded_image:57]], unless you don't mind handling all selection-related things manually. I'm not saying it's impossible, just that you need to be well prepared for the task. ;)Writing native editor plugins (one for each editor you wish to support) is of course possible, but you'll need to learn all their APIs and maintain several plugins instead of one.
The examples in wysiwyg.api.php show how to tell Wysiwyg about both native plugins and cross-editor plugins. You can look at plugins/break.inc and plugins/break/break.js for an example of how cross-editor plugins work. Writing native plugins is no different compared to when an editor is used without Wysiwyg module, except for the
hook_wysiwyg_plugin()implementation needed to tell Wysiwyg about it.Comment #2
twodWithout more information I can't provide much more help, so I'll close this issue.
Please reopen it if you need more info.