Hi dear community,
Following the example at _samples\api_dialog.html I was able to remove some ui elements from the 'Image Info' tab in the 'Image Properties' dialog.
However, I can't seem to find the correct IDs for the remaining elements: LockRatio, ResetButton and Preview (see attached snapshot). Can you help me determine these elements?
Thanks,
Pedro
Following the example at _samples\api_dialog.html I was able to remove some ui elements from the 'Image Info' tab in the 'Image Properties' dialog.
However, I can't seem to find the correct IDs for the remaining elements: LockRatio, ResetButton and Preview (see attached snapshot). Can you help me determine these elements?
Thanks,
Pedro
Re: How to remove tab items in CKEditor 3.x ?
1. Lock ratio & Reset Size:
search for the text "m.lang.image.lockRatio"...
you can either remove the html prpoerty of this content or the whole content (which starts from type:'html')
2. Preview:
search for the text "ImagePreviewBox" and then remove the whole content which starts from type:'vbox'
Re: How to remove tab items in CKEditor 3.x ?
Thanks for the reply. I'll try that.
However, I was looking for a way to do it without messing with the original code (in a similar fashion to the _samples\api_dialog.html). I'm using the following script for the dialog definition event:
Is there a way to do it in this fashion?
Thanks,
Pedro
Re: How to remove tab items in CKEditor 3.x ?
As you know LockSize and ResetSize are under one section which is of type html. But this section does not have an id attribute. Add an id attridute at the beginning like this:
and then you can use infoTab.remove('SizeSection')
and do the similar thing for Image Preview section.
Hope this helps
Re: How to remove tab items in CKEditor 3.x ?
Hi again a_shyam41,
I've tried to remove the code you were referring to, but I still have the exact same symptom
Re: How to remove tab items in CKEditor 3.x ?
Re: How to remove tab items in CKEditor 3.x ?
Thanks very much,
Pedro
Re: How to remove tab items in CKEditor 3.x ?
Bummer I thought it did but now I have some sort of javascript error while opening the dialog...
Attachments:
Re: How to remove tab items in CKEditor 3.x ?
Better solution would be to comment them, instead of removing it completely.
Re: How to remove tab items in CKEditor 3.x ?
Re: How to remove tab items in CKEditor 3.x ?
Re: How to remove tab items in CKEditor 3.x ?
I came across this thread while attempting to do much the same thing in my own configuration. In doing so, I ran across a few problems, particularly with regards to modifying the source code as mentioned by a_shyam41, and receiving the error which lecter255 reported. However, I was able to come up with an alternative solution that will hopefully help others. Let me know if this code works for you, as well.
I have used the main code from psgg's post, with a few minor tweaks, as follows:
Rather than removing the 'advanced' tab outright, it has just been hidden, which prevents the error as reported by lecter255.
I also removed a few items from the "Link" tab, I am including those here should other users be looking for the same elements (specifically the "Browse Server" button and the "Target" selection)
I removed the references to the invalid elements that were not being removed, as per psgg's commented code.
In addition to this code, I added the following in my CSS file:
This removes the preview box and the remaining two buttons without having to modify the source code. The page still displays a text of "Preview" that I will also try to remove, just need to find the appropriate div element to hide.
Thank you to all of you for posting this helpful information that has gotten me this far, it has been greatly beneficial.
Add:
Add:
infoTab.remove( 'ratioLock');
Or:
infoTab.remove( 'basic' ); //Removes all basic IMG propeties
See the HOWTO articles,
See the HOWTO articles, "Dialog Windows" section: http://docs.cksource.com/CKEditor_3.x/Howto, for some tips.
How to remove tab items in CKEditor 3.x ?
Very informative post!i appreciate your post.Thank you so much for sharingh nice information.
I use "