Hi dear community users,
Do you know how can I activate a tab by default in CKEditor 3.x?
For example: setting the Link tab of the Image dialog to shown by default instead of Image Info tab?
I can't seem to find any example in the api sample or proper method in the API.
Thanks,
Pedro
Do you know how can I activate a tab by default in CKEditor 3.x?
For example: setting the Link tab of the Image dialog to shown by default instead of Image Info tab?
I can't seem to find any example in the api sample or proper method in the API.
Thanks,
Pedro
Re: How to activate a tab by default in CKEditor 3.x
and move the content of Link tab to the beginning of contents definition i.e. before 'info' tab:
you have do it carefully... for example, this piece of text:
has to be moved to the place immediately after contents : [ and before { id : 'info'
(Note: see the comma at the end of the code above)
This solution only brings the Link tab to the beginning and it automatically gets selected and activated.
Re: How to activate a tab by default in CKEditor 3.x
It would be great if CKEditor fired some interesting events to help with such customisations.
First I've been looking for events happening when the Image Dialog pops up.
There is an "overflow" event coming from a div (id="ImagePreviewBox") inside the dialog.
After the dialog loads, it is stored in editorinstance._.storedDialogs.
From there you can use the API to change the tab:
editorinstance._.storedDialogs.image.selectPage("Upload");
I didn't have much time to hack something nice, but here's the idea:
A better way would be to :
preload the image dialog inside the storedDialogs
and add a listener:
Re: How to activate a tab by default in CKEditor 3.x
For future reference, this HOWTO article describes how to set CKEditor to show a specific dialog window tab to open by default: http://docs.cksource.com/CKEditor_3.x/H ... Dialog_Tab
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!