I am looking into trying to integrate a Drupal teaser break button for this editor.

WYMeditor doesn't seem to allow comments, so I'm having trouble inserting the

marker.

I have tried to get input from the WYMeditor people themselves, and I realise that is the first place to go.

I wondered if anyone here might have any cunning workarounds I have not thought of? For example, is it possible to use something other than

to insert the teaser break?

Comments

Richard Blackborder’s picture

WYMeditor doesn't seem to allow comments, so I'm having trouble inserting <!--break--> the marker.

For example, is it possible to use something other than <!--break--> to insert the teaser break?

twod’s picture

As far as I know, using <!--break--> is the only way to insert the Teaser break.

However, you should note that Wysiwyg module includes an editor-independent plugin for this. These "Drupal" plugins are not yet supported by the WYMeditor implementation though. (Only TinyMCE fully supports them yet).

I've been working on some code for jWysiwyg which would make non-dialog plugins, like Teaser Break, work with it. You can have a look at it here: #483452: jWYSIWYG: Support for Drupal plugins and stylesheets You probably need to do something similar for WMYeditor.

The advantage of adding support for that type of plugins is that we've alreay encountered a couple of problems and solved them, like when inserting comments. IE has been really stubborn on that one... More on that here: #474908: Teaser Break: IE8: JavaScript error and #404532: TinyMCE/FCKeditor: Teaser break vanishes in IE6/7.

On a last note, we're currently discussing version 3.x which will introduce some changes to what these plugins can do, and how they do it, meaning there will be a proper cross-editor API for use by plugins and perhaps other modules. This is part of why we've not yet implementet full support in all editors.

DrGlock’s picture

subscribing and showing my interest. really like WYMeditor, great at stopping people from breaking designs. this would let me use it on drupal 6 sites.

twod’s picture

The problem with "hooking into" this editor to call the plugin methods is that it doesn't expose any callbacks or events for things like " setting content in the editor", "focus/selection changed" or "getting content from the editor". Without an official framework for these things, we're left overriding the editor's internal functions to add in our own hooks, if that's even possible.
With that comes a great risk of breaking compatibility with future versions.

According to the official site, a later release will have an event system, but I have not seen any progress on that.
Given that the last release is 0.5-rc3 and the notes mention version 1.0 or 2.0 I don't think that''ll happen soon.