jQuery adapter - use valHooks
The jQuery adapter can make use of the valHooks feature instead of overriding val().
if ( CKEDITOR.config.jqueryOverrideVal ) {
jQuery.valHooks[ 'textarea' ] = {
get: function( elem ) {
var $this = jQuery( elem ),
editor = $this.data( 'ckeditorInstance' );
if ( editor ) return editor.getData();
},
set: function( elem, value ) {
var $this = jQuery( elem ),
editor = $this.data( 'ckeditorInstance' );
if ( editor ) editor.setData( value );
}
};
}
Change History (6)
Keywords: |
jQuery added
|
Status: |
new →
confirmed
|
Version: |
→ 4.0
|
Owner: |
set to Piotr Jasiun
|
Status: |
confirmed →
review
|
Milestone: |
→ CKEditor 4.2
|
Status: |
review →
assigned
|
Resolution: |
→ invalid
|
Status: |
assigned →
closed
|
We rewriting jQuery adapter at the moment and we will be using valHooks (we are already using them).
This ticket can be included into #10281 (umbrella ticket for adapter).