3
Well, I have found a javascript that can be used to do something like I want but I don't know to integrate it into XOOPS comments form.
Here is the code:
le="color: #000000"><?php <script> var isNav4Min = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4) var isIE4Min = (navigator.appName.indexOf("Microsoft") != -1 && parseInt(navigator.appVersion) >= 4) function quoteSelection() { var userSelection = false; var textarea = document.postform.message; if (isNav4Min && window.getSelection() != '') { userSelection = window.getSelection(); } else if (isIE4Min && document.selection) { userSelection = document.selection.createRange().text; } if (userSelection) { insert_text( '[quote]n' + userSelection + 'n[/quote]n', true, false); textarea.focus(); userSelection = ''; return; } else { alert('Select a text in page and try again'); } } </script>
To use it is just to create a link like this:
le="color: #000000"><?php <a href="#" onclick="quoteSelection(); return false;">Quote Selected</a>
How could I use it with XOOPS comments?
Thanks in advance.