More fixes for issue 57.

- move the selection highlight code to the Text mode.
- store $selectionOccurrences in the editor session.
- add option to toggle selection highlighting. In demo page as well.
This commit is contained in:
Mihai Sucan 2011-02-14 20:43:54 +02:00
commit be0d9a2be7
4 changed files with 89 additions and 53 deletions

View file

@ -257,6 +257,10 @@ exports.launch = function(env) {
env.editor.renderer.setShowPrintMargin(checked);
});
bindCheckbox("highlight_selected_word", function(checked) {
env.editor.setHighlightSelectedWord(checked);
});
function bindCheckbox(id, callback) {
var el = document.getElementById(id);
var onCheck = function() {