Posts: 14
Threads: 6
Joined: Aug 2012
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!
Posts: 2,928
Threads: 195
Joined: Feb 2011
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
Posts: 1,204
Threads: 30
Joined: Jun 2010
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.
Addons: blue business theme, Online Visitors, Notepad
Posts: 6,266
Threads: 181
Joined: Sep 2011
What version of gs ?
Your going to have to post more information about what your doing.
Posts: 14
Threads: 6
Joined: Aug 2012
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?
Posts: 14
Threads: 6
Joined: Aug 2012
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>
Posts: 6,266
Threads: 181
Joined: Sep 2011
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.
Posts: 14
Threads: 6
Joined: Aug 2012
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?