... | in text_editor.naml |
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
|
<macro name="editor_link_button">
<n.put_in_head Binary Namespace: HtmlNamespace
Parameters:
in_head
♦ ♦
<script type="text/javascript">
<![CDATA[
Nabble.link = function() {
var textarea = Nabble.get(textareaID);
var url = prompt("Enter URL:","http://");
if (url != null) {
if (url.indexOf('http') != 0 && url.indexOf('ftp:') != 0)
url = 'http://' + url;
var text = this.getSelection(textarea);
if (text!="" || (text = prompt("Enter link text:",url)) != null) {
this.setSelection( textarea, "<a href=\"" + url + "\">" + text + "</a>" );
}
}
textarea.focus();
};
]]>
</script>
</n.put_in_head.>
<td class="nowrap">
<button type="button" onclick="Nabble.link()" class="toolbar" title="[t]Add a link to another page[/t]">
<img src="/images/link.png" width="13" height="12" alt="Link" style="vertical-align:middle"/> <t>Link</t>
</button>
<n.tooltip Macro Parameters:
use_title, delay, contents, position
♦ ♦
</td>
</macro>
|
Free forum by Nabble | Edit this page |