Misja Hoebe <misja@curverider.co.uk> Added comment to allow transfer by some FTP...
[elgg.git] / _tinymce / docs / option_insertlink_callback.html
blobaa53e80fb8575066cae6f934fd2407255cf6b58e
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>Option: insertlink_callback</title>
5 <link href="css/screen.css" rel="stylesheet" type="text/css" />
6 </head>
7 <body>
9 <div class="header">
10 <h1><span class="marked">(deprecated)</span> Option: insertlink_callback</h1>
11 </div>
13 <div class="content">
14 <p>
15 This callback was removed in 2.0.3, use <a href="option_execcommand_callback.html">execcommand_callback</a> instead this also enables you to override other things than the image and link dialogs.
16 </p>
17 <p>
18 This option enables you to override the built in functionality for inserting links. This option should contain a function name to be executed when a new link is inserted into TinyMCE. The format of this callback function is: insertLink(href, target, title, onclick, action). Where most of these options are self explained the action can be &quot;update&quot; or &quot;insert&quot; depending on what operation type. This function should return an array with the same values as the incomming parameters, the example below describes how this is done. This option is set to a internal TinyMCE function by default.
19 </p>
21 <div class="separator"></div>
23 <h3>Example of usage of the insertlink_callback option:</h3>
24 <div class="example">
25 <pre>
26 function <strong>myCustomInsertLink</strong>(href, target, title, onclick, action) {
27 var result = new Array();
29 // Do some custom logic
30 result['href'] = "some_page.htm";
31 result['target'] = "_self";
32 result['title'] = "Some link title";
33 result['onclick'] = "";
35 return data;
38 tinyMCE.init({
39 ...
40 <strong>insertlink_callback : "myCustomInsertLink"</strong>
41 });
42 </pre>
43 </div>
44 </div>
46 <div class="footer">
47 <div class="helpindexlink"><a href="index.html">Index</a></div>
48 <div class="copyright">Copyright &copy; 2003-2006 <a href="http://www.moxiecode.com">Moxiecode Systems AB</a></div>
49 <br style="clear: both" />
50 </div>
52 </body>
53 </html>