I've got the CF version of CKEditor (3.0) and CKFinder setup and working fine and I've managed to implement a degree of customisation after following the examples in api_dialog.html. However, I've reached the end of my expertise and I'm stuck trying to integrate some mods into the link dialog.
I've managed to create and populate a custom select field below the URL field. This field contains a list of page titles and the corresponding cms generated URLs to make it easier for users to select internal links.
My aim is for the URL field to be populated with the custom select value when the user changes the selection. I added an 'onChange' attribute and a custom function to handle the event but I have a few problems:
1) I'm really not sure the onChange event is the correct method to use
2) The onChange event fires unnecessarily when the link dialog is opened (not a huge problem)
3) I can't figure out how to get the selected value from the custom field in my onChange function (commitIntLink)
4) I can't figure out how to inject my selected value back into the URL field
I haven't included my 'commitIntLink' function because I only took it as far as trying to alert the value (which I couldn't do). Below is the custom field code.
Not surprisingly, any help would be greatly appreciated.
Thanks
Gareth
I've managed to create and populate a custom select field below the URL field. This field contains a list of page titles and the corresponding cms generated URLs to make it easier for users to select internal links.
My aim is for the URL field to be populated with the custom select value when the user changes the selection. I added an 'onChange' attribute and a custom function to handle the event but I have a few problems:
1) I'm really not sure the onChange event is the correct method to use
2) The onChange event fires unnecessarily when the link dialog is opened (not a huge problem)
3) I can't figure out how to get the selected value from the custom field in my onChange function (commitIntLink)
4) I can't figure out how to inject my selected value back into the URL field
I haven't included my 'commitIntLink' function because I only took it as far as trying to alert the value (which I couldn't do). Below is the custom field code.
// Add a select field to the "info" tab. infoTab.add( { type : 'select', label : 'Internal Link', id : 'customField', onChange : commitIntLink, 'default' : '', items : [ [ '', '' ], [ 'PAGE 1', '/content.cfm?id=1' ], [ 'PAGE 2', '/content.cfm?id=2' ], [ 'PAGE 3', '/content.cfm?id=3' ] ] });
Not surprisingly, any help would be greatly appreciated.
Thanks
Gareth
Re: Getting and using the value of a custom field