Opened 12 years ago
Last modified 12 years ago
#9779 closed Bug
CKEditor 4 unable to override GetUrl — at Version 6
Reported by: | Michael | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.0.2 |
Component: | General | Version: | 4.0 |
Keywords: | Cc: |
Description (last modified by )
In previous version you could override geturl by creating a function called CKEDITOR_GETURL. This seems be broken because of this block in ckeditor_base.js:
// Make it possible to override the "url" function with a custom // implementation pointing to a global named CKEDITOR_GETURL. var newGetUrl = window.CKEDITOR_GETURL; if ( newGetUrl ) { var originalGetUrl = CKEDITOR.url; CKEDITOR.url = function( resource ) { return newGetUrl.call( CKEDITOR, resource ) || originalGetUrl.call( CKEDITOR, resource ); }; }
It should be:
// Make it possible to override the "url" function with a custom // implementation pointing to a global named CKEDITOR_GETURL. var newGetUrl = window.CKEDITOR_GETURL; if ( newGetUrl ) { var originalGetUrl = CKEDITOR.getUrl; CKEDITOR.getUrl = function( resource ) { return newGetUrl.call( CKEDITOR, resource ) || originalGetUrl.call( CKEDITOR, resource ); }; }
Change History (6)
comment:1 Changed 12 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 12 years ago by
I am using CKEditor 4.0 and am also running into this problem. Do you know when it might be fixed?
comment:3 Changed 12 years ago by
I am also interested in upgrading to v4, but this feature is required to do so.
comment:5 Changed 12 years ago by
Milestone: | → CKEditor 4.0.2 |
---|
Here you are ;)
I haven't checked it yet, so I'm not sure if it's a regression or just a change that requires different approach when overwriting. I'll check this in a first place.
comment:6 Changed 12 years ago by
Description: | modified (diff) |
---|
Api and docs say about getUrl (E.g. http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Editor_Core_URLs_Manipulation) while code for CKEditor v4 contains
CKEDITOR.url
Either there is some different approach used and not described in docs or an error in code.