Fix calendar sidebar issue - changed holder from 'contentholder' to 'sidebarholder'
[elgg.git] / _tinymce / docs / option_insertlink_callback.html
blob2d67c4923765d7ade5d633fbaba6f6da19e3abf7
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>Option: insertlink_callback</h1>
11 </div>
13 <div class="content">
14 <p>
15 This option enables you to override the build 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.
16 </p>
18 <div class="separator"></div>
20 <h3>Example of usage of the insertlink_callback option:</h3>
21 <div class="example">
22 <pre>
23 function <strong>myCustomInsertLink</strong>(href, target, title, onclick, action) {
24 var result = new Array();
26 // Do some custom logic
27 result['href'] = "some_page.htm";
28 result['target'] = "_self";
29 result['title'] = "Some link title";
30 result['onclick'] = "";
32 return data;
35 tinyMCE.init({
36 ...
37 <strong>insertlink_callback : "myCustomInsertLink"</strong>
38 });
39 </pre>
40 </div>
41 </div>
43 <div class="footer">
44 <div class="helpindexlink"><a href="index.html">Index</a></div>
45 <div class="copyright">Copyright &copy; 2005 Moxiecode Systems AB</div>
46 <br style="clear: both" />
47 </div>
49 </body>
50 </html>