Markiert
Übersicht

![]() |
LifetecBetreff: Markiert |
![]() Antworten mit Zitat ![]() |
---|---|---|
Wie kann ich festellen das in einer Textarea der Text Markiert wurde ???? | ||
![]() |
Christoph |
![]() Antworten mit Zitat ![]() |
---|---|---|
Schau mal in den Quelltext von BBP wenn du grade ne Antwort schreiben willst:
Zitat: function bbfontstyle(bbopen, bbclose) {
var txtarea = document.post.message; if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (!theSelection) { txtarea.value += bbopen + bbclose; txtarea.focus(); return; } document.selection.createRange().text = bbopen + theSelection + bbclose; txtarea.focus(); return; } else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) { mozWrap(txtarea, bbopen, bbclose); return; } else { txtarea.value += bbopen + bbclose; txtarea.focus(); } storeCaret(txtarea); } Such mal unter SelectionEnd und SelectionStart und createrange() ich weiß nicht genau was die Befehle machen aber hier im BBP klappt's ja, also wirds auch bei dir klappen wenn du dirs anschaust. ![]() |
||
![]() |
Hubsi |
![]() Antworten mit Zitat ![]() |
---|---|---|
Mit ql:TextAreaSelLen ist das möglich. Und Javascript hat so rein gar nichts mit BB am Hut, Cristoph ![]() |
||
Den ganzen Doag im Bett umanandflagga und iaz daherkema und meine Hendl`n fressn... |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group