Reputation: 113
I'm trying to create a few ckeditor plugins that manipulate the a full html document's formatting (e.g. you push one of the editor's buttons and the selection becomes a callout, or moves to a new column). The CKEditor API isn't cutting it for me, so I'd like to use jquery on the editor's contents within the plugins. Any suggestions?
This is within Drupal using the wysiwyg plugin.
Upvotes: 1
Views: 1826
Reputation: 13442
I use JQuery in my plugins all the time and it works just like within a normal javascript file. I suggest that you load your editor in jquery's ready event, that at least makes sure that jquery is loaded.
Something like this should make sure that your plugins can use jquery because it's loaded beforehand.
<script type="text/javascript">
$(document).ready(function () {
CKEDITOR.replace( 'MyLittlePonyFanficEditorTextarea' );
});
</script>
Upvotes: 2