1
|
|
|
/** |
2
|
|
|
* A list of Mivhak default options |
3
|
|
|
*/ |
4
|
|
|
Mivhak.defaults = { |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Whether to add a live preview (and a "play" button) to run the code |
8
|
|
|
* @type Boolean |
9
|
|
|
*/ |
10
|
|
|
runnable: false, |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Whther to allow the user to edit the code |
14
|
|
|
* @type Boolean |
15
|
|
|
*/ |
16
|
|
|
editable: false, |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Whether to show line numers on the left |
20
|
|
|
* @type Boolean |
21
|
|
|
*/ |
22
|
|
|
lineNumbers: false, |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* One of the supported CSS color values (HEX, RGB, etc...) to set as the |
26
|
|
|
* code viewer's accent color. Controls the scrollbars, tab navigation and |
27
|
|
|
* dropdown item colors. |
28
|
|
|
* @type String |
29
|
|
|
*/ |
30
|
|
|
accentColor: false, |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Whether to collapse the code viewer initially |
34
|
|
|
* @type Boolean |
35
|
|
|
*/ |
36
|
|
|
collapsed: false, |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Text/HTML string to be displayed at the bottom of the code viewer |
40
|
|
|
* @type Boolean|string |
41
|
|
|
*/ |
42
|
|
|
caption: false, |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* The code viewer's theme. One of (dark|light) |
46
|
|
|
* @type String |
47
|
|
|
*/ |
48
|
|
|
theme: 'light', |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* The code viewer's height. Either a number (for a custom height in pixels) |
52
|
|
|
* or one of (auto|min|max|average). |
53
|
|
|
* @type String|Number |
54
|
|
|
*/ |
55
|
|
|
height: 'average', |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* The surrounding padding between the code and the wrapper. |
59
|
|
|
* @type Number |
60
|
|
|
*/ |
61
|
|
|
padding: 15, |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* Whether to show/hide the top bar |
65
|
|
|
* @type Boolean |
66
|
|
|
*/ |
67
|
|
|
topbar: true, |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* An array of strings/objects for the settings dropdown menu |
71
|
|
|
* @type Array |
72
|
|
|
*/ |
73
|
|
|
buttons: ['wrap','copy','collapse','about'] |
74
|
|
|
}; |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* A list of Mivhak resource default settings (Mivhak resources are any <pre> |
78
|
|
|
* elements placed inside a Mivhak wrapper element). |
79
|
|
|
*/ |
80
|
|
|
Mivhak.resourceDefaults = { |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* The resource language (one of the supported Ace Editor languages) |
84
|
|
|
* @type string |
85
|
|
|
*/ |
86
|
|
|
lang: null, |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* How the resource should be treated in the preview window. One of (script|style|markup) |
90
|
|
|
* @type bool|string |
91
|
|
|
*/ |
92
|
|
|
runAs: false, |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* A URL to an external source |
96
|
|
|
* @type bool|string |
97
|
|
|
*/ |
98
|
|
|
source: false, |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* Whether to show this resource as a tab. Useful if you want to include |
102
|
|
|
* external libraries for the live preview and don't need to see their contents. |
103
|
|
|
* @type Boolean |
104
|
|
|
*/ |
105
|
|
|
visible: true, |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* Mark/highlight a range of lines given as a string in the format '1, 3-4' |
109
|
|
|
* @type bool|string |
110
|
|
|
*/ |
111
|
|
|
mark: false, |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* Set the initial line number (1 based). |
115
|
|
|
* @type Number |
116
|
|
|
*/ |
117
|
|
|
startLine: 1 |
118
|
|
|
}; |