I've modified the source code in richtext.js which comes as a part of the RT Editor bundle. So if you've included richtext_compressed.js in your web pages then you have to remove that inclusion and have to include richtext.js
Please replace your richtext.js with the attached richtext.js (I've modified this file).
Modification Made
-------------------
This was very simple
1. I've made the modification in the following function which is present in richtext.js
Code:
function selectFont(rte, selectname) {
//function to handle font changes
var idx = document.getElementById(selectname).selectedIndex;
// First one is always a label
if (idx != 0) {
var selected = document.getElementById(selectname).options[idx].value;
var cmd = selectname.replace('_' + rte, '');
rteCommand(rte, cmd, selected);
//document.getElementById(selectname).selectedIndex = 0;
document.getElementById(selectname).selectedIndex = idx;
}
}
Precisely I've changed the following line in the above function
Code:
document.getElementById(selectname).selectedIndex = 0;
to the following line
Code:
document.getElementById(selectname).selectedIndex = idx;
and achieved the result you want.
Bookmarks