The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
add the ability to get and set html via the jQuery object
| Project: | FCKEditor Plugin |
| Version: | 1.2.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
I found that by adding the following code to extend the jQuery object that you could better integrate the plugin with jQuery itself. This way you can create and alter the FCK Text editor via jQuery.
Example Usage
//create the fck editor
jQuery('#textareaSelector').fck();
//get the value for the instance just created
jQuery('#textareaSelector'). getFckHtml();
// extend $
//##############################
$.extend($.fn, {
getFckHtml: function(){
var editor = FCKeditorAPI.GetInstance($(this).attr('name'));
return editor.GetXHTML(true);
}
});
$.extend($.fn, {
setFckHtml: function(html){
var editor = FCKeditorAPI.GetInstance($(this).attr('name'));
editor.SetHTML(html);
}
});
- Login to post comments
