Ciao ragazzi,
qui di seguito è mostrata la index page di un'editor di testo java... io ho inserito una funzione per copiare il testo selezionato in textarea....ma non capisco perchè non va?
Se elimino la parte cliccando sul href mi esegue la funzione copia e mi apre la pagina desiderata, se no non va!![]()
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Text Edit</title>
<script language="javascript" type="text/javascript">
function copia_testo(){
document.execCommand('Copy');
}
</script>
<script language="javascript" type="text/javascript" src="tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
elements : "elm1",
theme : "advanced",
plugins : "table,advhr,advimage,advlink,emotions,iespell,ins ertdatetime,preview,zoom,flash,searchreplace,print ,paste,directionality,fullscreen,noneditable,conte xtmenu",
theme_advanced_buttons1_add_before : "newdocument,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,sepa rator,forecolor,backcolor,liststyle",
theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,sear ch,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,sepa rator,ltr,rtl,separator,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "hr[class|width|size|noshade]",
file_browser_callback : "fileBrowserCallBack",
paste_use_dialog : false,
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
theme_advanced_link_targets : "_something=My somthing;_something2=My somthing2;_something3=My somthing3;",
apply_source_formatting : true
});
function fileBrowserCallBack(field_name, url, type, win) {
var connector = "../../filemanager/browser.html?Connector=connectors/php/connector.php";
var enableAutoTypeSelection = true;
var cType;
tinymcpuk_field = field_name;
tinymcpuk = win;
switch (type) {
case "image":
cType = "Image";
break;
case "flash":
cType = "Flash";
break;
case "file":
cType = "File";
break;
}
if (enableAutoTypeSelection && cType) {
connector += "&Type=" + cType;
}
window.open(connector, "tinymcpuk", "modal,width=600,height=400");
}
</script>
</head>
<body>
<form name="text" method="post" action="../salva_new_doc.php" >
<h3>Text Edit</h3>
<textarea id="elm1" name="contenuto" rows="15" cols="80" style="width: 100%">
</textarea>
Aggiungi Azione:
[img]plugins/azioni/immagini/azione.gif[/img]
</form>
</body>
</html>