Hello all: We have a "Publish" button on a JSP page that also holds the CKEditor dialog window. When this publish button is clicked the code will write the content of the CKEditor window to the database with a "published" flag set to true.
As you know when a user clicks on the CKEditor "Source" button the HTML code is presented in the content window to allow the user to view / modify the HTML code therein. When the user clicks the "Source" button again, CKEditor analyses and corrects the HTML code, and then the content window shows the rendered HTML. Not a problem except.....
If a user were to click our "Publish" button instead of cicking a second time on the CKEditor "Source" button, then the CKEditor analyser / correction function does not occurr leaving the potential for invalid HTML to be written to the database.
What I would like to do is to intercept the CKEditor "Source" button when clicked only to run some simple javascript code that will disable my "Publish" button, then let the CKEditor continue with displaying the HTML code in the content window.. Then I would enable the same "Publsh" button when the user click the CKEditor "Source button again. Get it?
How can I intercept the CKEDitor "Source" button code only to disable a button on my JSP page and then let the CKEDitor "Source" button code continue? Do I need to write a plugin to make this happen?
Thank you for your time and assistance
gary