הראשון עזר לי השני גם עובד אבל לא ממש הבנתי..
הבנתי חצי , את הקטע של האחרי הבדיקה של הדפדפן לא הבנתי.. את זה:
HTML קוד:
txtElement.focus();
docSelection = document.selection;
txtSelection = docSelection.createRange();
if (txtSelection.text != "") {
txtSelection.text = '<font color="'+c+'">'+txtSelection.text+'</font>';
} else {
txtElement.value = '<font color="'+c+'">'+text+'</font>';
}
מישהו יכול להסביר לי את זה ..?
תודה
