mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-12 19:14:57 +01:00
17710c20ab
see tinymce.moxiecode.com/ for more info
58 lines
2.0 KiB
HTML
58 lines
2.0 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Option: insertimage_callback</title>
|
|
<link href="css/screen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div class="header">
|
|
<h1>Option: insertimage_callback</h1>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<p>
|
|
This option enables you to override the build in functionality for inserting images. This option should contain a function name to be executed when a new image is inserted into TinyMCE. The format of this callback function is: insertImage(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action). Where most of these options are self explained the action can be "update" or "insert" 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.
|
|
</p>
|
|
|
|
<div class="separator"></div>
|
|
|
|
<h3>Example of usage of the insertimage_callback option:</h3>
|
|
<div class="example">
|
|
<pre>
|
|
function <strong>myCustomInsertImage</strong>(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action) {
|
|
var result = new Array();
|
|
|
|
// Do some custom logic
|
|
result['src'] = "logo.jpg";
|
|
result['alt'] = "test description";
|
|
result['border'] = "2";
|
|
result['hspace'] = "5";
|
|
result['vspace'] = "5";
|
|
result['width'] = width;
|
|
result['height'] = height;
|
|
result['align'] = "right";
|
|
result['title'] = "Some title";
|
|
result['onmouseover'] = "";
|
|
result['onmouseout'] = "";
|
|
|
|
return data;
|
|
}
|
|
|
|
tinyMCE.init({
|
|
...
|
|
<strong>insertimage_callback : "myCustomInsertImage"</strong>
|
|
});
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<div class="helpindexlink"><a href="index.html">Index</a></div>
|
|
<div class="copyright">Copyright © 2005 Moxiecode Systems AB</div>
|
|
<br style="clear: both" />
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|