Easiest way is to implement IValidate interface and not allow editors to save those kind of links. Customizing dojo interface takes a bit more work.
Depends on how much time you like to spend. Hours or a few days...
You can read more on custom validation here
when we try to set the url property, we have options like page, media, email and external. I just want to restrict it to appear page and external only.
Could we not use AllowTypes attribute. I could see examples using AllowTypes for ContentArea, could we not use the same for url?
Haven't tried it but don't think that would work. You can check this blog for how to play with EditorDescriptors if want to customize the dojo interface
But as I said...implementing IValidate will be far easier :)
It won't hide the buttons but will make it impossible for editors to save content that contains offending links...
I want url property to allow internal pages or external links only. I do not want media files(images) and email option to be available.
public virtual Url geturl {get; set;}