-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenlighterjs.html
53 lines (49 loc) · 1.55 KB
/
enlighterjs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>EnlighterJS Test</title>
<!-- EnlighterJS Resources !-->
<link rel="stylesheet" href="enlighterjs.min.css" />
</head>
<body>
<main>
<!-- Code to hghlight !-->
<pre data-enlighter-language="js">
import React, { useState } from 'react';
import { View } from 'react-native';
import { Notifications } from 'expo';
import * as Permissions from 'expo-permissions';
import { Button, Input } from 'react-native-elements';
const askForPushPermission = setToken => async () => {
};
export default function PushPermissionRequester() {
const [token, setToken] = useState('(token not requested yet)');
return (
<View>
<Input value={token} />
<Button
title="Ask Me for Push Permissions"
onPress={askForPushPermission(setToken)}
/>
</View>
);
}
</pre>
</main>
<script type="text/javascript" src="enlighterjs.min.js"></script>
<script type="text/javascript">
// INIT CODE - simple page-wide initialization based on css selectors
// - highlight all pre + code tags (CSS3 selectors)
// - use javascript as default language
// - use theme "enlighter" as default theme
// - replace tabs with 2 spaces
EnlighterJS.init('pre', 'code', {
language : 'javascript',
theme: 'monokai',
indent : 2
});
</script>
</body>
</html>