forked from thlorenz/brace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example showing that only one editor mode works at a time
- Loading branch information
Showing
7 changed files
with
56 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// initialize ace editor customized for coffee | ||
var ace = require('brace/coffee'); | ||
|
||
// initialize coffee mode and monokai theme after editor itself | ||
require('brace/mode/coffee'); | ||
require('brace/theme/monokai'); | ||
|
||
var editor = ace.edit('coffee-editor'); | ||
editor.setTheme('ace/theme/monokai'); | ||
editor.getSession().setMode('ace/mode/coffee'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// initialize ace editor customized for css | ||
var ace = require('brace/css'); | ||
|
||
// initialize css mode and monokai theme after editor itself | ||
require('brace/mode/css'); | ||
require('brace/theme/monokai'); | ||
|
||
var editor = ace.edit('css-editor'); | ||
editor.setTheme('ace/theme/monokai'); | ||
editor.getSession().setMode('ace/mode/css'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// initialize ace editor customized for javascript | ||
var ace = require('brace/javascript'); | ||
|
||
// initialize javascript mode and monokai theme after editor itself | ||
require('brace/mode/javascript'); | ||
require('brace/theme/monokai'); | ||
|
||
var editor = ace.edit('javascript-editor'); | ||
editor.setTheme('ace/theme/monokai'); | ||
editor.getSession().setMode('ace/mode/javascript'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
'use strict'; | ||
|
||
// initialize ace editor customized for javascript | ||
var ace = require('brace/javascript'); | ||
|
||
// initialize javascript mode and monokai theme after editor itself | ||
require('brace/mode/javascript'); | ||
require('brace/theme/monokai'); | ||
|
||
var editor = ace.edit("editor"); | ||
editor.setTheme("ace/theme/monokai"); | ||
editor.getSession().setMode("ace/mode/javascript"); |