You are not logged in.
What function would I use to execute "javascript:preview(1)" from a button?
Thanks
Offline
From what kind of button? In the toolbar, or just a normal form button?
For the toolbar...
xinha_config.btnList["my-preview"] =
[ function(editor) { preview(1); }, // action
"Preview?", // tooltip
"my_preview.gif", // image
false // disabled in text mode
];
xinha_config.toolbar.push(["my-preview"]);
For a normal form button...
<button onclick="preview(1)" value="Da Button" />
James Sleeman
Offline
Thanks James!
I was asking from the toolbar. Is it posslbe to replace "1" with "editor" to pass the editor name?
like:
[ function(editor) { preview(editor); }, // action
?
Will
Offline
sure, you can pass the editor-object to the preview-function...
but this is not the editor-name!
you can get the name of the textArea through:
editor._textArea.name
(i'm pretty sure this is not the correct and best way to get the name, but i didn't find a better one)
Niko
Offline
thank you that worked!
Offline