added site files
This commit is contained in:
parent
a6f70a6c78
commit
329148c253
253 changed files with 30486 additions and 0 deletions
32
EnlighterJS/Source/Util/Init.js
Normal file
32
EnlighterJS/Source/Util/Init.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
---
|
||||
description: Simple global-initialization of inline+block codeblocks
|
||||
|
||||
license: MIT-style X11 License
|
||||
|
||||
authors:
|
||||
- Andi Dittrich
|
||||
|
||||
requires:
|
||||
- Core/1.4.5
|
||||
|
||||
provides: [EnlighterJS.Util.Init]
|
||||
...
|
||||
*/
|
||||
EJS.Util.Init = (function(blockSelector, inlineSelector, options){
|
||||
// defaults
|
||||
options = options || {};
|
||||
|
||||
// highlight all matching block tags
|
||||
if (blockSelector){
|
||||
options.renderer = 'Block';
|
||||
EJS.Util.Helper(EJS.Dom.getElements(blockSelector), options);
|
||||
}
|
||||
|
||||
// highlight all matching inline tags
|
||||
if (inlineSelector){
|
||||
options.renderer = 'Inline';
|
||||
options.grouping = false;
|
||||
EJS.Util.Helper(EJS.Dom.getElements(inlineSelector), options);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue