Kademi / keditor

KEditor is a jQuery plugin which provides a content editor with drag n drop, configurable contents
http://kademi.github.io/keditor/
MIT License
319 stars 154 forks source link

[Question] getContent Usage #66

Closed oleteacher closed 7 years ago

oleteacher commented 7 years ago

We have been trying to implement keditor with some of the tools we use in classroom. Some success, much failure:)

Currently one of our projects is using a ckeditor instance like.

var instructions = CKEDITOR.instances.instructions.getData();

Have tried to implement keditor using this:

var instructions = keditor('getContent');

Not working for us and wondering if var instructions = keditor('getContent'); would even be valid for keditor?

Wish I could post the entire script but school IT department very picky about placing code on open forums. Mainly looking for input if on right track.

Thank you for your time and any input.

Susan

$('#instructions').keditor('getContent');

ducdhm commented 7 years ago

Hi Susan, You should use KEditor like:

// For initializing
$('#instructions').keditor(options);

// For getting content
$('#instructions').keditor('getContent');

We don't public keditor to window as well as getting content via keditor('getContent'). For documentation, please kindly read https://github.com/Kademi/keditor/blob/master/README.md

oleteacher commented 7 years ago

Thanks, but would not work with our script. Will search elsewhere to get help for our classroom project.