Is this what you are looking for Auriaks?
Code:<script type="text/javascript"> function insertAtCursor(myField, myValue) { //IE support if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; } //MOZILLA/NETSCAPE support else if (myField.selectionStart || myField.selectionStart == �e0�Œ) { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); } else { myField.value += myValue; }</script> <script type="text/javascript"> function saveCurRng() { curRng = document.selection.createRange().duplicate(); } function surround(btag, etag){ if (curRng) { document.editform.article.focus(); curRng.text= btag + curRng.text + etag; return false; } } </script> </head> <body> <form name="editform"> <textarea rows=5 cols=40 name="article" onKeyup="saveCurRng()" onMouseup="saveCurRng()"></textarea> </form> <a href="#" onclick="return surround('<b>', '</b>');">bold</a><br> <a href="#" onclick="return surround('<i>', '</i>');">italic</a>Do you mean it depends on what type of server PHP is running on? For example I use PHP that runs on a remote server that is Linux based. My home computer is Windows XP. The PHP code that I use to convert enter key into <BR> isActually the type of line break produced by the enter key depends upon the OS:Code:$text=str_replace('\r\n','<br>',$text);



Reply With Quote

No possibility for using in firefox? Because i have webpage designed for opera and firefox.

Bookmarks