GetSimple Support Forum

Full Version: CKEditor in plugin page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've made a plugin which adds a section under the Pages tab and need an instance of CKEditor in it. The closest I've got is copying and pasting the JS from /admin/edit.php and while it does initiate CKEditor into my textarea it messes with the style of the admin section (as in, makes the CMS borderline-unusable).

Does anyone know a less error-prone way of instantiating CKEditor from within a custom plugin page? I'd hoped there would be a simple method exposed by GS for doing this but so far have not found it. Any help appreciated!
well, as I never wrote a plugin, I just suggest to try this:

- there are some plugins out already which integrate CKEditor
- check out how they did it and adept that
And how do you assign ckeditor into textarea ?
Any unique: ID's, styles, CKE configs ?

ps. Take a closer look at customfields plugins, and their methods of calling CKE.
What version of gs ?
Your going to have to post more information about what your doing.
I'm using v3.2.0 (which customfields extension doesn't seem to work with). I've also tried registering and queuing the scripts (with ckeditor itself queued as well as the script to instantiate it) as per http://get-simple.info/wiki/plugins:crea...our_script but a) it instantiates ckeditor without a toolbar (despite calling from the toolbar options constant), and b) it messes-up the admin interface.

As I said, I'd hoped that something included with the CMS would be exposed for easy use within plugins so any ideas welcome. Perhaps this should be something made available by a vendor plugin?
UPDATE: Customfields does work with 3.2.0, my file permissions were wrong (apologies to developer).

Even including the ckeditor script is causing issues:

Code:
<script type="text/javascript" src="template/js/ckeditor/ckeditor.js"></script>
unfortunately there is no native way to use the core ckeditor. you will have to figure it out yourself. It was not made to be modular, this is expected to be addressed in the future.
That's a pity. I think I'll just have to start with a blank template to see where I was going wrong and if I find my pitfall I'll update this thread.

Do you think it would be possible to create a plugin which exposed a simple way to instantiate ckeditor within other plugins?