Fix calendar sidebar issue - changed holder from 'contentholder' to 'sidebarholder'
[elgg.git] / _tinymce / docs / option_urlconverter_callback.html
bloba328df2d19becf99d797127b2f904e799b36cd0e
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: urlconverter_callback</title>
5 <link href="css/screen.css" rel="stylesheet" type="text/css" />
6 </head>
7 <body>
9 <div class="header">
10 <h1>Option: urlconverter_callback</h1>
11 </div>
13 <div class="content">
14 <p>
15 This option enable you to add your own URL converter logic. This option should contain a JavaScript function name. The format of this converter function is: URLConverter(url, node, on_save). There URL is the URL string to convert, node is the element that contains the URL that is to be converted this parameter may be set to null if there is no element for the URL and on_save is set to true when contents is to be extracted from the editor for example when the user submits the HTML form. This function should return the converted URL as a string. This option is set to a internal TinyMCE function &quot;TinyMCE.prototype.convertURL&quot; by default. You may call this function from your extention inorder to use the build in convertor options.
16 </p>
18 <div class="separator"></div>
20 <h3>Example of usage of the urlconverter_callback option:</h3>
21 <div class="example">
22 <pre>
23 function <strong>myCustomURLConverter</strong>(url, node, on_save) {
24 // Do some custom URL convertion
25 url = url.substring(3);
27 // Return new URL
28 return url;
31 tinyMCE.init({
32 ...
33 <strong>urlconverter_callback : "myCustomURLConverter"</strong>
34 });
35 </pre>
36 </div>
37 </div>
39 <div class="footer">
40 <div class="helpindexlink"><a href="index.html">Index</a></div>
41 <div class="copyright">Copyright &copy; 2005 Moxiecode Systems AB</div>
42 <br style="clear: both" />
43 </div>
45 </body>
46 </html>