Chromevox theme now an extension, added demo file, added findSearchBox event.
This commit is contained in:
parent
304b27954b
commit
38b42d20d3
4 changed files with 809 additions and 786 deletions
44
demo/chromevox.html
Normal file
44
demo/chromevox.html
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ACE Autocompletion demo</title>
|
||||
<style type="text/css" media="screen">
|
||||
body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#editor {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<pre id="editor"></pre>
|
||||
|
||||
<!-- load ace -->
|
||||
<script src="../build/src/ace.js"></script>
|
||||
<!-- load ace language tools -->
|
||||
<script src="../build/src/ext-chromevox.js"></script>
|
||||
<script>
|
||||
// trigger extension
|
||||
ace.require("ace/ext/chromevox");
|
||||
var editor = ace.edit("editor");
|
||||
editor.session.setMode("ace/mode/html");
|
||||
editor.setTheme("ace/theme/tomorrow");
|
||||
// enable autocompletion and snippets
|
||||
editor.setOptions({
|
||||
enableBasicAutocompletion: true,
|
||||
enableSnippets: true
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="./show_own_source.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -214,7 +214,9 @@ var SearchBox = function(editor, range, showReplaceForm) {
|
|||
caseSensitive: this.caseSensitiveOption.checked,
|
||||
wholeWord: this.wholeWordOption.checked
|
||||
});
|
||||
dom.setCssClass(this.searchBox, "ace_nomatch", !range && this.searchInput.value);
|
||||
var noMatch = !range && this.searchInput.value;
|
||||
dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
|
||||
this.editor._emit("findSearchBox", { match: !noMatch });
|
||||
this.highlight();
|
||||
};
|
||||
this.findNext = function() {
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ module.exports.themes = [
|
|||
"kr_theme",
|
||||
"merbivore",
|
||||
"merbivore_soft",
|
||||
"monokai",
|
||||
"mono_industrial",
|
||||
"monokai",
|
||||
"pastel_on_dark",
|
||||
"solarized_dark",
|
||||
"solarized_light",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue