If I modify the config, I can hide the "link" icon.
And if a user accesses the Editor via firefox, that's
sufficient: s/he'll have no way to insert links.
But with internet explorer, if the user types something like "http://www.foobar", "http://foo", "ftp://bar", "foo@bar.com" and then hits a space or clicks with the mouse (but not if you immediately press "return"), the Editor transforms that into a link and the user can then
rightclick that link, choose Edit, and voila it's as if the link option had been given to the user anyway.
Any ideas on how to avoid this? I assume this is something done by internet explorer (version 6, SP2 is what I've been testing with), but I don't know the name of the event this triggers / object this creates, which makes hunting for where to insert a "return false" quite the needle in the haystack.
Disactivating the link function is important because this would be for a webmail client that I would not want to make too attractive to spammers, phishers, etc.
Tue, 10/18/2005 - 00:14
#1
RE: How to disable the use of links? (2.0 RC2
Well I guess the idea of turning off some of the features (links) is not a priority for most users and so has understandably been left hardcoded into the editor.
I still haven't found a way to prevent IE from converting those patterns into links, but I did find a way to hide the context menu which would allow a user to right click the link and choose "Edit Link".
By modifying editor/js/fckeditorcode_ie_2.js:
this.Groups['Link']=new FCKContextMenuGroup();
with (this.Groups['Link']){
// ---> disabled Link/Unlink context menu options
//Add(new FCKContextMenuSeparator());
//Add(new FCKContextMenuItem(this,'Link',FCKLang.EditLink,true));
//Add(new FCKContextMenuItem(this,'Unlink',FCKLang.RemoveLink,true));
};
So this way users with IE do still generate links automatically anytime they type "http://...", "foo@bar", etc., but at least they are denied the option to modify their links. This way the destination of the link is always transparent.
(A frequent phishing tactic is to send an email with a llink whose text is some official looking URL, ie. "https://www.paypal.com/" but whose href instead points at some nasty trap of some kind. By forcing a one-to-one correspondence between link text and link destination, the FCK Editor thereby becomes less attractive for these kinds of malicious users.)
RE: How to disable the use of links? (2.0 RC2
bla bla i will post if i find a solution!
RE: How to disable the use of links? (2.0 RC2)