You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,19 @@ Or via CDN
63
63
*`language` The code language. The default is `plaintext`. Currently suported languages `html|css|js`.
64
64
*`content-selector` A CSS selector to specify the content element. The default is the element itself.
65
65
66
+
## Configuration
67
+
```js
68
+
/**
69
+
* @typedefConfig
70
+
* @type{object}
71
+
* @property{string[]}[languages=['markup', 'css', 'javascript']] - Language grammars to highlight.
72
+
* @property{{ [key: string]: string[] }}languageTokens - Language specific token types.
73
+
*/
74
+
window.she=window.she|| {};
75
+
/**@type{Config}*/
76
+
window.she.config= {};
77
+
```
78
+
66
79
## Browser Support
67
80
68
81
<picture>
@@ -75,7 +88,7 @@ Or via CDN
75
88
## Credits
76
89
77
90
*[Bramus Van Damme][bramus_github] and his [blog post][bramus_blog_post] where I first read about using the [CSS Custom Highlight API][MDN_CSS_Custom_Highlight_API] for syntax highlighting.
<li><code>language</code> The syntax language. The default is <code>plaintext</code>. Currently suported languages <code>html|css|js</code>.
136
-
<li><code>content-selector</code> A CSS selector to specify the content element. The default is the element itself.
137
-
</ul>
138
131
</article>
139
132
</section>
140
133
141
134
<sectiondata-section="content">
142
-
<article>
143
-
<h1>Credits</h1>
144
-
<ul>
145
-
<li><ahref="https://github.com/bramus" target="_blank" rel="noreferrer">Bramus Van Damme</a> and his <ahref="https://www.bram.us/2024/02/18/custom-highlight-api-for-syntax-highlighting" target="_blank">blog post</a> where I first read about using the <ahref="https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API" target="_blank">CSS Custom Highlight API</a> for syntax highlighting.
<li><ahref="https://github.com/bramus" target="_blank" rel="noreferrer">Bramus Van Damme</a> and his <ahref="https://www.bram.us/2024/02/18/custom-highlight-api-for-syntax-highlighting" target="_blank">blog post</a> where I first read about using the <ahref="https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API" target="_blank">CSS Custom Highlight API</a> for syntax highlighting.
0 commit comments