Most JS based editors in Drupal need to handle an issue with the Drupal teaser breaks, and they do this by inserting "<!--break-->" into the HTML to mark where Drupal's teaser break falls.
I have tried to implement a button for this in WYMeditor, using the following code attempts:
- Code: Select all
jQuery(wym._box).find('li.wym_tools_TeaserBreak a').click(function() { wym.paste('<!--break-->'); return(false); });
- Code: Select all
jQuery(wym._box).find('li.wym_tools_TeaserBreak a').click(function() { wym.insert('<!--break-->'); return(false); });
They both fail. The function just seems to start a new empty paragraph each time I click the button.
Is there any way of inserting this comment using WYMeditor?