-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added linenumber controls; added icons to settings panel
- Loading branch information
1 parent
5d941a1
commit 71cc8b4
Showing
8 changed files
with
147 additions
and
49 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
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
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 |
---|---|---|
@@ -1,5 +1,38 @@ | ||
// wrapper.. | ||
|
||
/*eslint no-undef: 0 */ | ||
export default EnlighterJS_EditorConfig; | ||
const _editorConfig = EnlighterJS_EditorConfig; | ||
|
||
// get list of available themes | ||
export function getThemes(){ | ||
|
||
// add default theme (selected globally) | ||
const themes = { | ||
'': 'Global settings (' + _editorConfig.config.theme + ')' | ||
}; | ||
|
||
// swap key/values | ||
Object.keys(_editorConfig.themes).forEach(label => { | ||
themes[_editorConfig.themes[label]] = label; | ||
}); | ||
|
||
return themes; | ||
} | ||
|
||
// get list of available languages | ||
export function getLanguages(){ | ||
const languages = {}; | ||
|
||
// swap key/values | ||
Object.keys(_editorConfig.languages).forEach(label => { | ||
languages[_editorConfig.languages[label]] = label; | ||
}); | ||
|
||
return languages; | ||
} | ||
|
||
// global plugin config | ||
export function getGlobalConfig(){ | ||
return _editorConfig.config; | ||
} | ||
|
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