Version Description
- Fixed an error preventing code containing HTML tags from being added using the Tag Editor in Visual mode
- Fixed CSS for Mixed Highlighting (+)
- Added a new theme thanks to http://blog.phiphou.com
Download this release
Release Info
Developer | akarmenia |
Plugin | Crayon Syntax Highlighter |
Version | 1.9.2 |
Comparing to | |
See all releases |
Code changes from version 1.9.0 to 1.9.2
- crayon_formatter.class.php +10 -9
- crayon_wp.class.php +1 -1
- css/images/toolbar/{copy_dark.png → copy.png} +0 -0
- css/images/toolbar/{nums_dark.png → nums.png} +0 -0
- css/images/toolbar/nums_light.png +0 -0
- css/images/toolbar/plain.png +0 -0
- css/images/toolbar/plain_dark.png +0 -0
- css/images/toolbar/plain_light.png +0 -0
- css/images/toolbar/plus.png +0 -0
- css/images/toolbar/plus_dark.png +0 -0
- css/images/toolbar/plus_light.png +0 -0
- css/images/toolbar/{copy_light.png → popup.png} +0 -0
- css/images/toolbar/popup_dark.png +0 -0
- css/images/toolbar/popup_light.png +0 -0
- css/style.css +34 -45
- js/crayon.js +24 -16
- langs/aliases.txt +1 -0
- langs/asm/asm.txt +16 -0
- readme.txt +15 -0
- themes/classic/classic.css +5 -1
- themes/epicgeeks/epicgeeks.css +5 -1
- themes/neon/neon.css +7 -3
- themes/phiphou/phiphou.css +203 -0
- themes/twilight/twilight.css +7 -3
- util/sample/asm.txt +5 -0
- util/tag-editor/crayon_te.js +22 -14
- util/tag-editor/crayon_te_content.php +3 -3
- util/tag-editor/crayon_tinymce.js +1 -1
- util/theme-editor/editor.php +2 -2
crayon_formatter.class.php
CHANGED
@@ -55,17 +55,18 @@ class CrayonFormatter {
|
|
55 |
/* First index in $matches is full match, subsequent indices are groups.
|
56 |
* Minimum number of elements in array is 2, so minimum captured group is 0. */
|
57 |
$captured_group_number = count($matches) - 2;
|
|
|
58 |
if (array_key_exists($captured_group_number, self::$elements)) {
|
59 |
$captured_element = self::$elements[$captured_group_number];
|
60 |
// Avoid capturing and formatting internal Crayon elements
|
61 |
if ($captured_element->name() == CrayonParser::CRAYON_ELEMENT) {
|
62 |
-
return $
|
63 |
} else {
|
64 |
// Separate lines and add css class, keep extended class last to allow overriding
|
65 |
$fallback_css = CrayonLangs::known_elements($captured_element->fallback());
|
66 |
$element_css = $captured_element->css();
|
67 |
$css = !empty($fallback_css) ? $fallback_css . ' ' . $element_css : $element_css ;
|
68 |
-
return self::split_lines($
|
69 |
}
|
70 |
} else {
|
71 |
// All else fails, return the match
|
@@ -277,13 +278,9 @@ class CrayonFormatter {
|
|
277 |
is not enabled or fails, the toolbar won't work so there is no point to display it. */
|
278 |
$print_plus = $hl->setting_val(CrayonSettings::MIXED) && $hl->setting_val(CrayonSettings::SHOW_MIXED) ? '<span class="crayon-mixed-highlight" title="'.crayon__('Contains Mixed Languages').'"></span>' : '';
|
279 |
$buttons = $print_plus.$print_nums_button.$print_copy_button.$print_popup_button.$print_plain_button.$print_lang;
|
280 |
-
$button_preload = '';
|
281 |
-
foreach (array('nums', 'copy', 'popup', 'plain') as $name) {
|
282 |
-
$button_preload .= '<a class="crayon-'.$name.'-button crayon-button crayon-pressed crayon-invisible"></a>';
|
283 |
-
}
|
284 |
$toolbar = '
|
285 |
<div class="crayon-toolbar" data-settings="'.$toolbar_settings.'" style="'.$toolbar_style.'">'.$print_title.'
|
286 |
-
<div class="crayon-tools">'.$buttons
|
287 |
<div class="crayon-info" style="'.$info_style.'"></div>';
|
288 |
|
289 |
} else {
|
@@ -499,9 +496,9 @@ class CrayonFormatter {
|
|
499 |
/* Convert <, > and & characters to entities, as these can appear as HTML tags and entities. */
|
500 |
$code = CrayonUtil::htmlspecialchars($code);
|
501 |
// Replace 2 spaces with html escaped characters
|
502 |
-
$code = preg_replace('
|
503 |
// Replace tabs with 4 spaces
|
504 |
-
$code = preg_replace('
|
505 |
return $code;
|
506 |
}
|
507 |
|
@@ -519,7 +516,11 @@ class CrayonFormatter {
|
|
519 |
}
|
520 |
|
521 |
public static function split_lines($code, $class) {
|
|
|
522 |
$code = self::clean_code($code);
|
|
|
|
|
|
|
523 |
$code = preg_replace('|^|m', '<span class="'.$class.'">', $code);
|
524 |
$code = preg_replace('|$|m', '</span>', $code);
|
525 |
return $code;
|
55 |
/* First index in $matches is full match, subsequent indices are groups.
|
56 |
* Minimum number of elements in array is 2, so minimum captured group is 0. */
|
57 |
$captured_group_number = count($matches) - 2;
|
58 |
+
$code = $matches[0];
|
59 |
if (array_key_exists($captured_group_number, self::$elements)) {
|
60 |
$captured_element = self::$elements[$captured_group_number];
|
61 |
// Avoid capturing and formatting internal Crayon elements
|
62 |
if ($captured_element->name() == CrayonParser::CRAYON_ELEMENT) {
|
63 |
+
return $code; // Return as is
|
64 |
} else {
|
65 |
// Separate lines and add css class, keep extended class last to allow overriding
|
66 |
$fallback_css = CrayonLangs::known_elements($captured_element->fallback());
|
67 |
$element_css = $captured_element->css();
|
68 |
$css = !empty($fallback_css) ? $fallback_css . ' ' . $element_css : $element_css ;
|
69 |
+
return self::split_lines($code, $css);
|
70 |
}
|
71 |
} else {
|
72 |
// All else fails, return the match
|
278 |
is not enabled or fails, the toolbar won't work so there is no point to display it. */
|
279 |
$print_plus = $hl->setting_val(CrayonSettings::MIXED) && $hl->setting_val(CrayonSettings::SHOW_MIXED) ? '<span class="crayon-mixed-highlight" title="'.crayon__('Contains Mixed Languages').'"></span>' : '';
|
280 |
$buttons = $print_plus.$print_nums_button.$print_copy_button.$print_popup_button.$print_plain_button.$print_lang;
|
|
|
|
|
|
|
|
|
281 |
$toolbar = '
|
282 |
<div class="crayon-toolbar" data-settings="'.$toolbar_settings.'" style="'.$toolbar_style.'">'.$print_title.'
|
283 |
+
<div class="crayon-tools">'.$buttons.'</div></div>
|
284 |
<div class="crayon-info" style="'.$info_style.'"></div>';
|
285 |
|
286 |
} else {
|
496 |
/* Convert <, > and & characters to entities, as these can appear as HTML tags and entities. */
|
497 |
$code = CrayonUtil::htmlspecialchars($code);
|
498 |
// Replace 2 spaces with html escaped characters
|
499 |
+
$code = preg_replace('#[ ]{2}#msi', ' ', $code);
|
500 |
// Replace tabs with 4 spaces
|
501 |
+
$code = preg_replace('#\t#', str_repeat(' ', CrayonGlobalSettings::val(CrayonSettings::TAB_SIZE)), $code);
|
502 |
return $code;
|
503 |
}
|
504 |
|
516 |
}
|
517 |
|
518 |
public static function split_lines($code, $class) {
|
519 |
+
// var_dump($code);
|
520 |
$code = self::clean_code($code);
|
521 |
+
// var_dump($code);
|
522 |
+
// var_dump($class);
|
523 |
+
echo "\n";
|
524 |
$code = preg_replace('|^|m', '<span class="'.$class.'">', $code);
|
525 |
$code = preg_replace('|$|m', '</span>', $code);
|
526 |
return $code;
|
crayon_wp.class.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Crayon Syntax Highlighter
|
4 |
Plugin URI: http://ak.net84.net/projects/crayon-syntax-highlighter
|
5 |
Description: Supports multiple languages, themes, highlighting from a URL, local file or post text.
|
6 |
-
Version: 1.9.
|
7 |
Author: Aram Kocharyan
|
8 |
Author URI: http://ak.net84.net/
|
9 |
Text Domain: crayon-syntax-highlighter
|
3 |
Plugin Name: Crayon Syntax Highlighter
|
4 |
Plugin URI: http://ak.net84.net/projects/crayon-syntax-highlighter
|
5 |
Description: Supports multiple languages, themes, highlighting from a URL, local file or post text.
|
6 |
+
Version: 1.9.2
|
7 |
Author: Aram Kocharyan
|
8 |
Author URI: http://ak.net84.net/
|
9 |
Text Domain: crayon-syntax-highlighter
|
css/images/toolbar/{copy_dark.png → copy.png}
RENAMED
Binary file
|
css/images/toolbar/{nums_dark.png → nums.png}
RENAMED
Binary file
|
css/images/toolbar/nums_light.png
DELETED
Binary file
|
css/images/toolbar/plain.png
ADDED
Binary file
|
css/images/toolbar/plain_dark.png
DELETED
Binary file
|
css/images/toolbar/plain_light.png
DELETED
Binary file
|
css/images/toolbar/plus.png
CHANGED
Binary file
|
css/images/toolbar/plus_dark.png
DELETED
Binary file
|
css/images/toolbar/plus_light.png
DELETED
Binary file
|
css/images/toolbar/{copy_light.png → popup.png}
RENAMED
Binary file
|
css/images/toolbar/popup_dark.png
DELETED
Binary file
|
css/images/toolbar/popup_light.png
DELETED
Binary file
|
css/style.css
CHANGED
@@ -157,7 +157,6 @@ coloring etc.
|
|
157 |
min-width: 20px;
|
158 |
|
159 |
background-repeat: no-repeat;
|
160 |
-
background-position: center;
|
161 |
/*height: 16px;*/
|
162 |
line-height: 15px;
|
163 |
padding: 0px 2px !important;
|
@@ -168,58 +167,42 @@ coloring etc.
|
|
168 |
text-decoration: none;
|
169 |
}
|
170 |
|
171 |
-
|
172 |
-
.crayon-toolbar a.crayon-button
|
173 |
-
.crayon-toolbar a.crayon-button.crayon-
|
174 |
-
|
175 |
-
background-image: url('images/toolbar/plain_dark.png');
|
176 |
}
|
177 |
-
.crayon-toolbar a.crayon-button.crayon-
|
178 |
-
.crayon-toolbar a.crayon-button
|
179 |
-
.crayon-toolbar a.crayon-button.crayon-
|
180 |
-
background-
|
181 |
}
|
182 |
|
183 |
-
/*
|
184 |
-
.crayon-toolbar a.crayon-button.crayon-
|
185 |
-
|
186 |
-
.crayon-toolbar a.crayon-button.crayon-copy-button.crayon-pressed:hover {
|
187 |
-
background-image: url('images/toolbar/copy_dark.png');
|
188 |
}
|
189 |
-
|
190 |
-
|
191 |
-
.crayon-toolbar a.crayon-button.crayon-copy-button
|
192 |
-
background-image: url('images/toolbar/
|
193 |
}
|
194 |
|
195 |
/* Popup Button */
|
196 |
-
.crayon-toolbar a.crayon-button.crayon-popup-button
|
197 |
-
|
198 |
-
.crayon-toolbar a.crayon-button.crayon-popup-button.crayon-pressed:hover {
|
199 |
-
background-image: url('images/toolbar/popup_dark.png');
|
200 |
-
}
|
201 |
-
.crayon-toolbar a.crayon-button.crayon-popup-button.crayon-pressed,
|
202 |
-
.crayon-toolbar a.crayon-button.crayon-popup-button:active,
|
203 |
-
.crayon-toolbar a.crayon-button.crayon-popup-button.crayon-pressed:active {
|
204 |
-
background-image: url('images/toolbar/popup_light.png');
|
205 |
}
|
206 |
|
207 |
/* Nums Button */
|
208 |
-
.crayon-toolbar a.crayon-button.crayon-nums-button
|
209 |
-
|
210 |
-
.crayon-toolbar a.crayon-button.crayon-nums-button.crayon-pressed:hover {
|
211 |
-
background-image: url('images/toolbar/nums_dark.png');
|
212 |
-
}
|
213 |
-
.crayon-toolbar a.crayon-button.crayon-nums-button.crayon-pressed,
|
214 |
-
.crayon-toolbar a.crayon-button.crayon-nums-button:active,
|
215 |
-
.crayon-toolbar a.crayon-button.crayon-nums-button.crayon-pressed:active {
|
216 |
-
background-image: url('images/toolbar/nums_light.png');
|
217 |
}
|
218 |
|
219 |
/* Plus Sign */
|
220 |
.crayon-syntax .crayon-toolbar .crayon-mixed-highlight {
|
221 |
background-image: url('images/toolbar/plus.png');
|
222 |
-
background-position: center
|
|
|
223 |
background-repeat: no-repeat;
|
224 |
float: left;
|
225 |
min-width: 15px;
|
@@ -241,13 +224,15 @@ coloring etc.
|
|
241 |
/* End Toolbar ===================== */
|
242 |
|
243 |
/* Scrollbar ======================= */
|
244 |
-
.crayon-main::-webkit-scrollbar
|
|
|
245 |
height: 6px;
|
246 |
overflow: visible;
|
247 |
width: 6px;
|
248 |
background: #EEE;
|
249 |
}
|
250 |
-
.crayon-main::-webkit-scrollbar-thumb
|
|
|
251 |
background-color: #CCC;
|
252 |
background-clip: padding-box;
|
253 |
border: 1px solid #AAA;
|
@@ -256,24 +241,28 @@ coloring etc.
|
|
256 |
padding:0;
|
257 |
border-width: 1px;
|
258 |
}
|
259 |
-
.crayon-main::-webkit-scrollbar-button
|
|
|
260 |
height: 0;
|
261 |
width: 0;
|
262 |
padding: 0px;
|
263 |
}
|
264 |
-
.crayon-main::-webkit-scrollbar-track
|
|
|
265 |
background-clip: padding-box;
|
266 |
border: solid transparent;
|
267 |
border-width: 0 0 0 4px;
|
268 |
border: 1px solid #BBB;
|
269 |
border-right: none;
|
270 |
border-bottom: none;
|
271 |
-
|
272 |
}
|
273 |
-
.crayon-main::-webkit-scrollbar-corner
|
|
|
274 |
background: #EEE;
|
275 |
}
|
276 |
-
.crayon-main::-webkit-scrollbar-thumb:hover
|
|
|
277 |
background: #AAA;
|
278 |
border: 1px solid #777;
|
279 |
box-shadow: inset 0 0 2px #777;
|
157 |
min-width: 20px;
|
158 |
|
159 |
background-repeat: no-repeat;
|
|
|
160 |
/*height: 16px;*/
|
161 |
line-height: 15px;
|
162 |
padding: 0px 2px !important;
|
167 |
text-decoration: none;
|
168 |
}
|
169 |
|
170 |
+
.crayon-toolbar a.crayon-button,
|
171 |
+
.crayon-toolbar a.crayon-button:hover,
|
172 |
+
.crayon-toolbar a.crayon-button.crayon-pressed:hover {
|
173 |
+
background-position: 0px center;
|
|
|
174 |
}
|
175 |
+
.crayon-toolbar a.crayon-button.crayon-pressed,
|
176 |
+
.crayon-toolbar a.crayon-button:active,
|
177 |
+
.crayon-toolbar a.crayon-button.crayon-pressed:active {
|
178 |
+
background-position: -24px center;
|
179 |
}
|
180 |
|
181 |
+
/* Plain Button */
|
182 |
+
.crayon-toolbar a.crayon-button.crayon-plain-button {
|
183 |
+
background-image: url('images/toolbar/plain.png');
|
|
|
|
|
184 |
}
|
185 |
+
|
186 |
+
/* Copy Button */
|
187 |
+
.crayon-toolbar a.crayon-button.crayon-copy-button {
|
188 |
+
background-image: url('images/toolbar/copy.png');
|
189 |
}
|
190 |
|
191 |
/* Popup Button */
|
192 |
+
.crayon-toolbar a.crayon-button.crayon-popup-button {
|
193 |
+
background-image: url('images/toolbar/popup.png');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
}
|
195 |
|
196 |
/* Nums Button */
|
197 |
+
.crayon-toolbar a.crayon-button.crayon-nums-button {
|
198 |
+
background-image: url('images/toolbar/nums.png');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
|
201 |
/* Plus Sign */
|
202 |
.crayon-syntax .crayon-toolbar .crayon-mixed-highlight {
|
203 |
background-image: url('images/toolbar/plus.png');
|
204 |
+
/* background-position: center;*/
|
205 |
+
background-position: 0px center;
|
206 |
background-repeat: no-repeat;
|
207 |
float: left;
|
208 |
min-width: 15px;
|
224 |
/* End Toolbar ===================== */
|
225 |
|
226 |
/* Scrollbar ======================= */
|
227 |
+
.crayon-main::-webkit-scrollbar,
|
228 |
+
.crayon-plain::-webkit-scrollbar {
|
229 |
height: 6px;
|
230 |
overflow: visible;
|
231 |
width: 6px;
|
232 |
background: #EEE;
|
233 |
}
|
234 |
+
.crayon-main::-webkit-scrollbar-thumb,
|
235 |
+
.crayon-plain::-webkit-scrollbar-thumb {
|
236 |
background-color: #CCC;
|
237 |
background-clip: padding-box;
|
238 |
border: 1px solid #AAA;
|
241 |
padding:0;
|
242 |
border-width: 1px;
|
243 |
}
|
244 |
+
.crayon-main::-webkit-scrollbar-button,
|
245 |
+
.crayon-plain::-webkit-scrollbar-button {
|
246 |
height: 0;
|
247 |
width: 0;
|
248 |
padding: 0px;
|
249 |
}
|
250 |
+
.crayon-main::-webkit-scrollbar-track,
|
251 |
+
.crayon-plain::-webkit-scrollbar-track {
|
252 |
background-clip: padding-box;
|
253 |
border: solid transparent;
|
254 |
border-width: 0 0 0 4px;
|
255 |
border: 1px solid #BBB;
|
256 |
border-right: none;
|
257 |
border-bottom: none;
|
258 |
+
abox-shadow: inset 0 0 4px #BBB;
|
259 |
}
|
260 |
+
.crayon-main::-webkit-scrollbar-corner,
|
261 |
+
.crayon-plain::-webkit-scrollbar-corner {
|
262 |
background: #EEE;
|
263 |
}
|
264 |
+
.crayon-main::-webkit-scrollbar-thumb:hover,
|
265 |
+
.crayon-plain::-webkit-scrollbar-thumb:hover {
|
266 |
background: #AAA;
|
267 |
border: 1px solid #777;
|
268 |
box-shadow: inset 0 0 2px #777;
|
js/crayon.js
CHANGED
@@ -44,7 +44,6 @@ RegExp.escape = function(text) {
|
|
44 |
|
45 |
var hasCSSStyleDeclaration = typeof(CSSStyleDeclaration) != 'undefined';
|
46 |
jQuery.fn.style = function(styleName, value, priority) {
|
47 |
-
console_log('style called');
|
48 |
// DOM node
|
49 |
var node = this.get(0);
|
50 |
// Ensure we have a DOM node
|
@@ -182,7 +181,7 @@ var CrayonSyntax = new function() {
|
|
182 |
crayon[uid].scroll_block_fix = true;
|
183 |
}
|
184 |
|
185 |
-
reconsile_dimensions(uid);
|
186 |
|
187 |
// If nums hidden by default
|
188 |
if (nums.filter('[data-settings~="hide"]').length != 0) {
|
@@ -201,15 +200,20 @@ var CrayonSyntax = new function() {
|
|
201 |
}
|
202 |
i++;
|
203 |
};
|
204 |
-
main.ready(function() {
|
|
|
205 |
load_timer = setInterval(load_func, 300);
|
206 |
fix_scroll_blank(uid);
|
207 |
-
});
|
208 |
|
209 |
// Used for toggling
|
210 |
main.css('position', 'relative');
|
211 |
main.css('z-index', 1);
|
212 |
|
|
|
|
|
|
|
|
|
213 |
// Disable certain features for touchscreen devices
|
214 |
touchscreen = (jQuery(this).filter('[data-settings~="touchscreen"]').length != 0);
|
215 |
|
@@ -279,6 +283,7 @@ var CrayonSyntax = new function() {
|
|
279 |
nums_button.hide();
|
280 |
}
|
281 |
if (plain.filter('[data-settings~="show-plain-default"]').length != 0) {
|
|
|
282 |
CrayonSyntax.toggle_plain(uid, true);
|
283 |
}
|
284 |
}
|
@@ -287,6 +292,9 @@ var CrayonSyntax = new function() {
|
|
287 |
// Disable on touchscreen devices and when set to mouseover
|
288 |
main.css('overflow', 'hidden');
|
289 |
plain.css('overflow', 'hidden');
|
|
|
|
|
|
|
290 |
jQuery(this).mouseenter(function() { toggle_scroll(uid, true); })
|
291 |
.mouseleave(function() { toggle_scroll(uid, false); });
|
292 |
}
|
@@ -487,12 +495,9 @@ var CrayonSyntax = new function() {
|
|
487 |
* no need to revert it after toggling plain. */
|
488 |
crayon[uid].scroll_changed = false;
|
489 |
|
490 |
-
var vis_over = visible.css('overflow');
|
491 |
-
var hid_over = hidden.css('overflow');
|
492 |
-
|
493 |
// Hide scrollbars during toggle to avoid Chrome weird draw error
|
494 |
-
visible.css('overflow', 'hidden');
|
495 |
-
hidden.css('overflow', 'hidden');
|
496 |
|
497 |
fix_scroll_blank(uid);
|
498 |
|
@@ -501,17 +506,17 @@ var CrayonSyntax = new function() {
|
|
501 |
visible.fadeTo(animt(500, uid), 0,
|
502 |
function() {
|
503 |
visible.css('z-index', 0);
|
504 |
-
if (!crayon[uid].scroll_changed) {
|
505 |
-
visible.css('overflow', vis_over);
|
506 |
-
}
|
507 |
});
|
508 |
hidden.stop(true);
|
509 |
hidden.fadeTo(animt(500, uid), 1,
|
510 |
function() {
|
511 |
hidden.css('z-index', 1);
|
512 |
-
if (!crayon[uid].scroll_changed) {
|
513 |
-
hidden.css('overflow', hid_over);
|
514 |
-
}
|
515 |
|
516 |
// Give focus to plain code
|
517 |
if (hidden == plain) {
|
@@ -528,7 +533,6 @@ var CrayonSyntax = new function() {
|
|
528 |
hidden.scrollTop(crayon[uid].top);
|
529 |
hidden.scrollLeft(crayon[uid].left + 1);
|
530 |
hidden.scrollLeft(crayon[uid].left);
|
531 |
-
|
532 |
});
|
533 |
|
534 |
// Restore scroll positions to hidden
|
@@ -663,6 +667,7 @@ var CrayonSyntax = new function() {
|
|
663 |
}
|
664 |
|
665 |
crayon_slide(uid, toolbar, show, anim_time, hide_delay);
|
|
|
666 |
};
|
667 |
|
668 |
var toggle_scroll = function(uid, show) {
|
@@ -717,6 +722,7 @@ var CrayonSyntax = new function() {
|
|
717 |
// Register that overflow has changed
|
718 |
crayon[uid].scroll_changed = true;
|
719 |
fix_scroll_blank(uid);
|
|
|
720 |
};
|
721 |
|
722 |
/* Fix weird draw error, causes blank area to appear where scrollbar once was. */
|
@@ -733,6 +739,8 @@ var CrayonSyntax = new function() {
|
|
733 |
// Reconsile dimensions
|
734 |
crayon[uid].plain.height(crayon[uid].main.height());
|
735 |
//crayon[uid].plain.width(crayon[uid].main.width());
|
|
|
|
|
736 |
};
|
737 |
|
738 |
var animt = function(x, uid) {
|
44 |
|
45 |
var hasCSSStyleDeclaration = typeof(CSSStyleDeclaration) != 'undefined';
|
46 |
jQuery.fn.style = function(styleName, value, priority) {
|
|
|
47 |
// DOM node
|
48 |
var node = this.get(0);
|
49 |
// Ensure we have a DOM node
|
181 |
crayon[uid].scroll_block_fix = true;
|
182 |
}
|
183 |
|
184 |
+
// reconsile_dimensions(uid);
|
185 |
|
186 |
// If nums hidden by default
|
187 |
if (nums.filter('[data-settings~="hide"]').length != 0) {
|
200 |
}
|
201 |
i++;
|
202 |
};
|
203 |
+
// main.ready(function() {
|
204 |
+
// alert();
|
205 |
load_timer = setInterval(load_func, 300);
|
206 |
fix_scroll_blank(uid);
|
207 |
+
// });
|
208 |
|
209 |
// Used for toggling
|
210 |
main.css('position', 'relative');
|
211 |
main.css('z-index', 1);
|
212 |
|
213 |
+
// Update clickable buttons
|
214 |
+
update_nums_button(uid);
|
215 |
+
update_plain_button(uid);
|
216 |
+
|
217 |
// Disable certain features for touchscreen devices
|
218 |
touchscreen = (jQuery(this).filter('[data-settings~="touchscreen"]').length != 0);
|
219 |
|
283 |
nums_button.hide();
|
284 |
}
|
285 |
if (plain.filter('[data-settings~="show-plain-default"]').length != 0) {
|
286 |
+
// XXX
|
287 |
CrayonSyntax.toggle_plain(uid, true);
|
288 |
}
|
289 |
}
|
292 |
// Disable on touchscreen devices and when set to mouseover
|
293 |
main.css('overflow', 'hidden');
|
294 |
plain.css('overflow', 'hidden');
|
295 |
+
|
296 |
+
console_log(plain.css('overflow'));
|
297 |
+
|
298 |
jQuery(this).mouseenter(function() { toggle_scroll(uid, true); })
|
299 |
.mouseleave(function() { toggle_scroll(uid, false); });
|
300 |
}
|
495 |
* no need to revert it after toggling plain. */
|
496 |
crayon[uid].scroll_changed = false;
|
497 |
|
|
|
|
|
|
|
498 |
// Hide scrollbars during toggle to avoid Chrome weird draw error
|
499 |
+
// visible.css('overflow', 'hidden');
|
500 |
+
// hidden.css('overflow', 'hidden');
|
501 |
|
502 |
fix_scroll_blank(uid);
|
503 |
|
506 |
visible.fadeTo(animt(500, uid), 0,
|
507 |
function() {
|
508 |
visible.css('z-index', 0);
|
509 |
+
// if (!crayon[uid].scroll_changed) {
|
510 |
+
// visible.css('overflow', vis_over);
|
511 |
+
// }
|
512 |
});
|
513 |
hidden.stop(true);
|
514 |
hidden.fadeTo(animt(500, uid), 1,
|
515 |
function() {
|
516 |
hidden.css('z-index', 1);
|
517 |
+
// if (!crayon[uid].scroll_changed) {
|
518 |
+
// hidden.css('overflow', hid_over);
|
519 |
+
// }
|
520 |
|
521 |
// Give focus to plain code
|
522 |
if (hidden == plain) {
|
533 |
hidden.scrollTop(crayon[uid].top);
|
534 |
hidden.scrollLeft(crayon[uid].left + 1);
|
535 |
hidden.scrollLeft(crayon[uid].left);
|
|
|
536 |
});
|
537 |
|
538 |
// Restore scroll positions to hidden
|
667 |
}
|
668 |
|
669 |
crayon_slide(uid, toolbar, show, anim_time, hide_delay);
|
670 |
+
// reconsile_dimensions(uid);
|
671 |
};
|
672 |
|
673 |
var toggle_scroll = function(uid, show) {
|
722 |
// Register that overflow has changed
|
723 |
crayon[uid].scroll_changed = true;
|
724 |
fix_scroll_blank(uid);
|
725 |
+
reconsile_dimensions(uid);
|
726 |
};
|
727 |
|
728 |
/* Fix weird draw error, causes blank area to appear where scrollbar once was. */
|
739 |
// Reconsile dimensions
|
740 |
crayon[uid].plain.height(crayon[uid].main.height());
|
741 |
//crayon[uid].plain.width(crayon[uid].main.width());
|
742 |
+
|
743 |
+
console_log('main: ' + crayon[uid].main.height() + ' plain: ' + crayon[uid].plain.height());
|
744 |
};
|
745 |
|
746 |
var animt = function(x, uid) {
|
langs/aliases.txt
CHANGED
@@ -14,3 +14,4 @@ ilogic logic inventor inv ilog
|
|
14 |
pgsql sql mysql
|
15 |
as flash swf fla
|
16 |
ps powershell
|
|
14 |
pgsql sql mysql
|
15 |
as flash swf fla
|
16 |
ps powershell
|
17 |
+
asm x86
|
langs/asm/asm.txt
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
### X86 ASSEMBLY LANGUAGE ###
|
2 |
+
|
3 |
+
# ELEMENT_NAME [optional-css-class] REGULAR_EXPRESSION
|
4 |
+
|
5 |
+
NAME Assembly (x86)
|
6 |
+
VERSION 1.9.1
|
7 |
+
|
8 |
+
COMMENT (;.*?$)
|
9 |
+
STRING (?default)
|
10 |
+
|
11 |
+
OPERATION:RESERVED ^\s*\w+
|
12 |
+
|
13 |
+
REGISTER:VARIABLE %?[a-z]+
|
14 |
+
CONSTANT \$?(?default)
|
15 |
+
OPERATOR (?default)
|
16 |
+
SYMBOL (?default)
|
readme.txt
CHANGED
@@ -58,6 +58,7 @@ See http://ak.net84.net/projects/crayon-language-file-specification/ to learn ho
|
|
58 |
* ABAP
|
59 |
* ActionScript
|
60 |
* Apache
|
|
|
61 |
* AutoIt
|
62 |
* C
|
63 |
* C#
|
@@ -107,6 +108,7 @@ These are helpful for discovering new features.
|
|
107 |
|
108 |
A handful of articles from others written about Crayon, thanks guys!
|
109 |
|
|
|
110 |
* <a href="http://blog.boxedpages.net/2012/03/15/abap-syntaxhighlighting-in-wordpress/" target="_blank">ABAP Syntax Highlighting in WordPress (German)</a>
|
111 |
* <a href="http://infodrug.ru/wordpress/kak-krasivo-vstavit-programmnyj-kod-v-wordpress-podsvetka-sintaksisa.html" target="_blank">Crayon Syntax Highlighter (Russian)</a>
|
112 |
* <a href="http://n-wp.ru/11513" target="_blank">Crayon Syntax Highlighter (also Russian)</a>
|
@@ -168,6 +170,18 @@ Contact me at http://twitter.com/crayonsyntax or crayon.syntax@gmail.com.
|
|
168 |
4. Tag Editor.
|
169 |
|
170 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
= 1.9.0 =
|
173 |
* This update is the biggest update yet - highly recommended for all users.
|
@@ -550,6 +564,7 @@ Make sure to upgrade to the latest release when possible to ensure you avoid bug
|
|
550 |
|
551 |
Thanks to all those who donate to my project, your support keeps the Crayons going!
|
552 |
|
|
|
553 |
* Aliseya Wright, (http://blog.xoxothemes.com/), USA
|
554 |
* Jeremy Worboys (http://complexcompulsions.com/), Australia
|
555 |
* Steve McGough, Spider Creations, LLC. (http://spidercreations.net/), USA
|
58 |
* ABAP
|
59 |
* ActionScript
|
60 |
* Apache
|
61 |
+
* Assembly (x86)
|
62 |
* AutoIt
|
63 |
* C
|
64 |
* C#
|
108 |
|
109 |
A handful of articles from others written about Crayon, thanks guys!
|
110 |
|
111 |
+
* <a href="http://www.doitwithwp.com/displaying-code-in-wordpress-with-crayon-syntax-highlighter/" target="_blank">Displaying Code in WordPress with Crayon </a>
|
112 |
* <a href="http://blog.boxedpages.net/2012/03/15/abap-syntaxhighlighting-in-wordpress/" target="_blank">ABAP Syntax Highlighting in WordPress (German)</a>
|
113 |
* <a href="http://infodrug.ru/wordpress/kak-krasivo-vstavit-programmnyj-kod-v-wordpress-podsvetka-sintaksisa.html" target="_blank">Crayon Syntax Highlighter (Russian)</a>
|
114 |
* <a href="http://n-wp.ru/11513" target="_blank">Crayon Syntax Highlighter (also Russian)</a>
|
170 |
4. Tag Editor.
|
171 |
|
172 |
== Changelog ==
|
173 |
+
|
174 |
+
= 1.9.2 =
|
175 |
+
* Fixed an error preventing code containing HTML tags from being added using the Tag Editor in Visual mode
|
176 |
+
* Fixed CSS for Mixed Highlighting (+)
|
177 |
+
* Added a new theme thanks to http://blog.phiphou.com
|
178 |
+
|
179 |
+
= 1.9.1 =
|
180 |
+
* Added Assembly (x86)
|
181 |
+
* Standardised the toolbar buttons, now they use CSS spriting and have the same colour
|
182 |
+
* Changed Theme CSS background to avoid conflicts with themes that affect TD tags
|
183 |
+
* Fixed bug caused by discrepancies in how checkbox values were handled in Tag Editor
|
184 |
+
* Fixed a bug causing $root variable to change on some setups, preventing tag editor from loading
|
185 |
|
186 |
= 1.9.0 =
|
187 |
* This update is the biggest update yet - highly recommended for all users.
|
564 |
|
565 |
Thanks to all those who donate to my project, your support keeps the Crayons going!
|
566 |
|
567 |
+
* eSnipe, Inc. (http://esnipe.com/), USA (again!)
|
568 |
* Aliseya Wright, (http://blog.xoxothemes.com/), USA
|
569 |
* Jeremy Worboys (http://complexcompulsions.com/), Australia
|
570 |
* Steve McGough, Spider Creations, LLC. (http://spidercreations.net/), USA
|
themes/classic/classic.css
CHANGED
@@ -10,7 +10,11 @@ Author URI: http://ak.net84.net/
|
|
10 |
.crayon-theme-classic {
|
11 |
border: 1px #999 solid !important;
|
12 |
text-shadow: none !important;
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
|
16 |
/* Inline Style */
|
10 |
.crayon-theme-classic {
|
11 |
border: 1px #999 solid !important;
|
12 |
text-shadow: none !important;
|
13 |
+
}
|
14 |
+
|
15 |
+
.crayon-theme-classic,
|
16 |
+
.crayon-theme-classic .crayon-code {
|
17 |
+
background: #fdfdfd !important;
|
18 |
}
|
19 |
|
20 |
/* Inline Style */
|
themes/epicgeeks/epicgeeks.css
CHANGED
@@ -9,7 +9,11 @@ Author URI: http://epicgeeks.net/
|
|
9 |
.crayon-theme-epicgeeks {
|
10 |
border: 1px #e1e1e1 solid !important;
|
11 |
text-shadow: none !important;
|
12 |
-
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
/* Inline Style */
|
9 |
.crayon-theme-epicgeeks {
|
10 |
border: 1px #e1e1e1 solid !important;
|
11 |
text-shadow: none !important;
|
12 |
+
}
|
13 |
+
|
14 |
+
.crayon-theme-epicgeeks,
|
15 |
+
.crayon-theme-epicgeeks .crayon-code {
|
16 |
+
background: #ffffe1 !important;
|
17 |
}
|
18 |
|
19 |
/* Inline Style */
|
themes/neon/neon.css
CHANGED
@@ -10,10 +10,14 @@ Author URI: http://ak.net84.net/
|
|
10 |
.crayon-theme-neon {
|
11 |
border: 1px #333 solid !important;
|
12 |
text-shadow: none !important;
|
13 |
-
background: #2d2d2d !important;
|
14 |
color: #fff;
|
15 |
}
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
/* Inline Style */
|
18 |
.crayon-theme-neon-inline {
|
19 |
border: 1px solid #333 !important;
|
@@ -112,8 +116,8 @@ Author URI: http://ak.net84.net/
|
|
112 |
.crayon-theme-neon .crayon-language {
|
113 |
color: #666 !important;
|
114 |
}
|
115 |
-
.crayon-theme-neon .crayon-toolbar .crayon-mixed-highlight {
|
116 |
-
background-
|
117 |
}
|
118 |
|
119 |
/* Buttons */
|
10 |
.crayon-theme-neon {
|
11 |
border: 1px #333 solid !important;
|
12 |
text-shadow: none !important;
|
|
|
13 |
color: #fff;
|
14 |
}
|
15 |
|
16 |
+
.crayon-theme-neon,
|
17 |
+
.crayon-theme-neon .crayon-code {
|
18 |
+
background: #2d2d2d !important;
|
19 |
+
}
|
20 |
+
|
21 |
/* Inline Style */
|
22 |
.crayon-theme-neon-inline {
|
23 |
border: 1px solid #333 !important;
|
116 |
.crayon-theme-neon .crayon-language {
|
117 |
color: #666 !important;
|
118 |
}
|
119 |
+
.crayon-theme-neon .crayon-toolbar .crayon-mixed-highlight {
|
120 |
+
background-position: -24px center;
|
121 |
}
|
122 |
|
123 |
/* Buttons */
|
themes/phiphou/phiphou.css
ADDED
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Theme name: SonOfObsidian
|
4 |
+
Description: Inspired from http://studiostyl.es/schemes/son-of-obsidian
|
5 |
+
Original author : http://studiostyl.es/users/135
|
6 |
+
Author: Phiphou
|
7 |
+
Author URL : http://blog.phiphou.com
|
8 |
+
Author twitter: @__phiphou__
|
9 |
+
|
10 |
+
*/
|
11 |
+
|
12 |
+
/* code style ====================== */
|
13 |
+
.crayon-theme-phiphou {
|
14 |
+
border: 1px #999 solid !important;
|
15 |
+
text-shadow: none !important;
|
16 |
+
}
|
17 |
+
|
18 |
+
.crayon-theme-phiphou .crayon-code {
|
19 |
+
background: #22282a !important;
|
20 |
+
color: #f1f2f3 !important;
|
21 |
+
}
|
22 |
+
|
23 |
+
/* inline style */
|
24 |
+
.crayon-theme-phiphou-inline {
|
25 |
+
border: 1px solid #ddd !important;
|
26 |
+
background: #fafafa !important;
|
27 |
+
}
|
28 |
+
|
29 |
+
/* line numbers */
|
30 |
+
.crayon-theme-phiphou .crayon-nums {
|
31 |
+
background: #22282a !important;
|
32 |
+
color: #808080 !important;
|
33 |
+
border-right: 1px solid #475459 !important;
|
34 |
+
}
|
35 |
+
|
36 |
+
/* selection */
|
37 |
+
.crayon-theme-phiphou .crayon-code::selection,
|
38 |
+
.crayon-theme-phiphou .crayon-code *::selection {
|
39 |
+
background: #7c9299 !important;
|
40 |
+
color: #FFFFFF !important;
|
41 |
+
}
|
42 |
+
|
43 |
+
.crayon-theme-phiphou::selection,
|
44 |
+
.crayon-theme-phiphou .crayon-toolbar::selection,
|
45 |
+
.crayon-theme-phiphou .crayon-toolbar *::selection,
|
46 |
+
.crayon-theme-phiphou .crayon-info::selection,
|
47 |
+
.crayon-theme-phiphou .crayon-info *::selection,
|
48 |
+
.crayon-theme-phiphou .crayon-nums::selection,
|
49 |
+
.crayon-theme-phiphou .crayon-nums *::selection {
|
50 |
+
background: transparent !important;
|
51 |
+
}
|
52 |
+
|
53 |
+
/* striped lines */
|
54 |
+
.crayon-theme-phiphou .crayon-striped-line {
|
55 |
+
background: #22282a !important;
|
56 |
+
border: 1px #ccc !important;
|
57 |
+
}
|
58 |
+
.crayon-theme-phiphou .crayon-striped-num {
|
59 |
+
background: #293134 !important;
|
60 |
+
border: 1px #22282a !important;
|
61 |
+
color: #808080 !important;
|
62 |
+
}
|
63 |
+
|
64 |
+
/* marked lines */
|
65 |
+
.crayon-theme-phiphou .crayon-marked-line {
|
66 |
+
background: #40292c !important;
|
67 |
+
border: 1px #996b72 !important;
|
68 |
+
}
|
69 |
+
|
70 |
+
.crayon-theme-phiphou .crayon-marked-num {
|
71 |
+
color: #808080 !important;
|
72 |
+
background: #40292c !important;
|
73 |
+
border: 1px #996b72 !important;
|
74 |
+
}
|
75 |
+
|
76 |
+
.crayon-theme-phiphou .crayon-marked-line.crayon-striped-line {
|
77 |
+
background: #40292c !important;
|
78 |
+
}
|
79 |
+
|
80 |
+
.crayon-theme-phiphou .crayon-marked-num.crayon-striped-num {
|
81 |
+
background: #663d43 !important;
|
82 |
+
border: 1px #996b72 !important;
|
83 |
+
color: #808080 !important;
|
84 |
+
}
|
85 |
+
|
86 |
+
.crayon-theme-phiphou .crayon-marked-line.crayon-top,
|
87 |
+
.crayon-theme-phiphou .crayon-marked-num.crayon-top {
|
88 |
+
border-top-style: solid !important;
|
89 |
+
}
|
90 |
+
|
91 |
+
.crayon-theme-phiphou .crayon-marked-line.crayon-bottom,
|
92 |
+
.crayon-theme-phiphou .crayon-marked-num.crayon-bottom {
|
93 |
+
border-bottom-style: solid !important;
|
94 |
+
}
|
95 |
+
|
96 |
+
/* info */
|
97 |
+
.crayon-theme-phiphou .crayon-info {
|
98 |
+
background: #faf9d7 !important;
|
99 |
+
border-bottom: 1px #b1af5e solid !important;
|
100 |
+
color: #7e7d34;
|
101 |
+
}
|
102 |
+
|
103 |
+
/* toolbar */
|
104 |
+
.crayon-theme-phiphou .crayon-toolbar {
|
105 |
+
background: #ddd !important;
|
106 |
+
border-bottom: 1px #bbb solid !important;
|
107 |
+
}
|
108 |
+
|
109 |
+
.crayon-theme-phiphou .crayon-toolbar > div {
|
110 |
+
float: left !important;
|
111 |
+
}
|
112 |
+
|
113 |
+
.crayon-theme-phiphou .crayon-toolbar .crayon-tools {
|
114 |
+
float: right !important;
|
115 |
+
}
|
116 |
+
|
117 |
+
.crayon-theme-phiphou .crayon-title {
|
118 |
+
color: #333 !important;
|
119 |
+
}
|
120 |
+
|
121 |
+
.crayon-theme-phiphou .crayon-language {
|
122 |
+
color: #999 !important;
|
123 |
+
}
|
124 |
+
|
125 |
+
/* buttons */
|
126 |
+
.crayon-theme-phiphou a.crayon-button {
|
127 |
+
background-color: transparent;
|
128 |
+
}
|
129 |
+
|
130 |
+
.crayon-theme-phiphou a.crayon-button:hover,
|
131 |
+
.crayon-theme-phiphou a.crayon-button.crayon-pressed:hover {
|
132 |
+
background-color: #eee;
|
133 |
+
color: #666;
|
134 |
+
}
|
135 |
+
/* :active must come after :hover */
|
136 |
+
.crayon-theme-phiphou a.crayon-button.crayon-pressed,
|
137 |
+
.crayon-theme-phiphou a.crayon-button.crayon-pressed:active,
|
138 |
+
.crayon-theme-phiphou a.crayon-button:active {
|
139 |
+
background-color: #bcbcbc;
|
140 |
+
color: #fff;
|
141 |
+
}
|
142 |
+
|
143 |
+
/* end code style ================== */
|
144 |
+
|
145 |
+
/* syntax highlighting ============= */
|
146 |
+
.crayon-theme-phiphou .crayon-pre .c {
|
147 |
+
color: #66747b !important;
|
148 |
+
}
|
149 |
+
.crayon-theme-phiphou .crayon-pre .p {
|
150 |
+
color: #00FF00 !important;
|
151 |
+
}
|
152 |
+
.crayon-theme-phiphou .crayon-pre .s {
|
153 |
+
color: #ec7600 !important;
|
154 |
+
}
|
155 |
+
.crayon-theme-phiphou .crayon-pre .k {
|
156 |
+
color: #a082bd !important;
|
157 |
+
}
|
158 |
+
.crayon-theme-phiphou .crayon-pre .st {
|
159 |
+
color: #a082bd !important;
|
160 |
+
}
|
161 |
+
.crayon-theme-phiphou .crayon-pre .r {
|
162 |
+
color: #a082bd !important;
|
163 |
+
}
|
164 |
+
.crayon-theme-phiphou .crayon-pre .t {
|
165 |
+
color: #a082bd !important;
|
166 |
+
}
|
167 |
+
.crayon-theme-phiphou .crayon-pre .m {
|
168 |
+
color: #a082bd !important;
|
169 |
+
}
|
170 |
+
.crayon-theme-phiphou .crayon-pre .ta {
|
171 |
+
color: #99daf9 !important;
|
172 |
+
}
|
173 |
+
.crayon-theme-phiphou .crayon-pre .i {
|
174 |
+
color: #678cb1 !important;
|
175 |
+
}
|
176 |
+
.crayon-theme-phiphou .crayon-pre .v {
|
177 |
+
color: #678cb1 !important;
|
178 |
+
}
|
179 |
+
.crayon-theme-phiphou .crayon-pre .e {
|
180 |
+
color: #95c763 !important;
|
181 |
+
}
|
182 |
+
.crayon-theme-phiphou .crayon-pre .cn {
|
183 |
+
color: #99daf9 !important;
|
184 |
+
}
|
185 |
+
.crayon-theme-phiphou .crayon-pre .o {
|
186 |
+
color: #ffcd22 !important;
|
187 |
+
}
|
188 |
+
.crayon-theme-phiphou .crayon-pre .h {
|
189 |
+
color: #ffcd22 !important;
|
190 |
+
}
|
191 |
+
.crayon-theme-phiphou .crayon-pre .sy {
|
192 |
+
color: #f1f2f3 !important;
|
193 |
+
}
|
194 |
+
.crayon-theme-phiphou .crayon-pre .n {
|
195 |
+
color: #f1f2f3 !important;
|
196 |
+
font-style: italic;
|
197 |
+
}
|
198 |
+
.crayon-theme-phiphou .crayon-pre .f {
|
199 |
+
}
|
200 |
+
|
201 |
+
/* end syntax highlighting ========= */
|
202 |
+
|
203 |
+
/* end classic scheme ============================================ */
|
themes/twilight/twilight.css
CHANGED
@@ -10,10 +10,14 @@ Author URI: http://ak.net84.net/
|
|
10 |
.crayon-theme-twilight {
|
11 |
border: 1px #333 solid !important;
|
12 |
text-shadow: none !important;
|
13 |
-
background: #2d2d2d !important;
|
14 |
color: #fff;
|
15 |
}
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
/* Inline Style */
|
18 |
.crayon-theme-twilight-inline {
|
19 |
border: 1px solid #333 !important;
|
@@ -108,8 +112,8 @@ Author URI: http://ak.net84.net/
|
|
108 |
.crayon-theme-twilight .crayon-language {
|
109 |
color: #666 !important;
|
110 |
}
|
111 |
-
.crayon-theme-twilight .crayon-toolbar .crayon-mixed-highlight {
|
112 |
-
background-
|
113 |
}
|
114 |
|
115 |
/* Buttons */
|
10 |
.crayon-theme-twilight {
|
11 |
border: 1px #333 solid !important;
|
12 |
text-shadow: none !important;
|
|
|
13 |
color: #fff;
|
14 |
}
|
15 |
|
16 |
+
.crayon-theme-twilight,
|
17 |
+
.crayon-theme-twilight .crayon-code {
|
18 |
+
background: #2d2d2d !important;
|
19 |
+
}
|
20 |
+
|
21 |
/* Inline Style */
|
22 |
.crayon-theme-twilight-inline {
|
23 |
border: 1px solid #333 !important;
|
112 |
.crayon-theme-twilight .crayon-language {
|
113 |
color: #666 !important;
|
114 |
}
|
115 |
+
.crayon-theme-twilight .crayon-toolbar .crayon-mixed-highlight {
|
116 |
+
background-position: -24px center;
|
117 |
}
|
118 |
|
119 |
/* Buttons */
|
util/sample/asm.txt
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
mov eax, [ebx] ; Move the 4 bytes in memory at the address contained in EBX into EAX
|
2 |
+
mov [var], ebx ; Move the contents of EBX into the 4 bytes at memory address var. (Note, var is a 32-bit constant).
|
3 |
+
mov eax, [esi-4] ; Move 4 bytes at memory address ESI + (-4) into EAX
|
4 |
+
mov [esi+eax], cl ; Move the contents of CL into the byte at address ESI+EAX
|
5 |
+
mov edx, [esi+4*ebx] ; Move the 4 bytes of data at address ESI+4*EBX into EDX
|
util/tag-editor/crayon_te.js
CHANGED
@@ -121,21 +121,22 @@ var CrayonTagEditor = new function() {
|
|
121 |
console_log(setting.attr('id') + ' value: ' + value);
|
122 |
var highlight = null;
|
123 |
if (setting.is('input[type=checkbox]')) {
|
124 |
-
highlight = setting.next('span');
|
125 |
}
|
126 |
|
127 |
-
|
128 |
-
|
|
|
129 |
setting.removeClass(gs.changed);
|
130 |
if (highlight) {
|
131 |
highlight.removeClass(gs.changed);
|
132 |
}
|
133 |
-
|
134 |
// Changed
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
}
|
140 |
// Save standardized value for later
|
141 |
me.settingValue(setting, value);
|
@@ -236,12 +237,16 @@ var CrayonTagEditor = new function() {
|
|
236 |
var setting = jQuery('#' + gs.prefix + att + '.' + gs.setting);
|
237 |
var value = atts[att];
|
238 |
me.settingValue(setting, value);
|
239 |
-
// Update highlights
|
240 |
-
|
|
|
241 |
if (!setting.hasClass(gs.special)) {
|
242 |
setting.addClass(gs.changed);
|
|
|
|
|
|
|
|
|
243 |
}
|
244 |
-
// console_log('#' + gs.prefix + att + '.' + gs.setting);
|
245 |
console_log('loaded: ' + att + ':' + atts[att]);
|
246 |
}
|
247 |
|
@@ -271,7 +276,6 @@ var CrayonTagEditor = new function() {
|
|
271 |
// Inline
|
272 |
var inline = jQuery('#' + s.inline_css);
|
273 |
inline.change(function() {
|
274 |
-
console_log('test');
|
275 |
is_inline = jQuery(this).is(':checked');
|
276 |
var inline_hide = jQuery('.' + s.inline_hide_css);
|
277 |
var inline_single = jQuery('.' + s.inline_hide_only_css);
|
@@ -525,7 +529,7 @@ var CrayonTagEditor = new function() {
|
|
525 |
value = '';
|
526 |
if (setting.is('input[type=checkbox]')) {
|
527 |
// Boolean is stored as string
|
528 |
-
value = setting.is(':checked') ? '
|
529 |
} else {
|
530 |
value = setting.val();
|
531 |
}
|
@@ -534,7 +538,11 @@ var CrayonTagEditor = new function() {
|
|
534 |
// setter
|
535 |
if (setting.is('input[type=checkbox]')) {
|
536 |
if (typeof value == 'string') {
|
537 |
-
value
|
|
|
|
|
|
|
|
|
538 |
}
|
539 |
setting.prop('checked', value);
|
540 |
} else {
|
121 |
console_log(setting.attr('id') + ' value: ' + value);
|
122 |
var highlight = null;
|
123 |
if (setting.is('input[type=checkbox]')) {
|
124 |
+
highlight = setting.next('span');
|
125 |
}
|
126 |
|
127 |
+
console_log(' >>> ' + setting.attr('id') + ' is ' + orig_value + ' = ' + value);
|
128 |
+
if (orig_value == value) {
|
129 |
+
// No change
|
130 |
setting.removeClass(gs.changed);
|
131 |
if (highlight) {
|
132 |
highlight.removeClass(gs.changed);
|
133 |
}
|
134 |
+
} else {
|
135 |
// Changed
|
136 |
+
setting.addClass(gs.changed);
|
137 |
+
if (highlight) {
|
138 |
+
highlight.addClass(gs.changed);
|
139 |
+
}
|
140 |
}
|
141 |
// Save standardized value for later
|
142 |
me.settingValue(setting, value);
|
237 |
var setting = jQuery('#' + gs.prefix + att + '.' + gs.setting);
|
238 |
var value = atts[att];
|
239 |
me.settingValue(setting, value);
|
240 |
+
// Update highlights
|
241 |
+
setting.change();
|
242 |
+
// If global setting changes and we access settings, it should declare loaded settings as changed even if they equal the global value, just so they aren't lost on save
|
243 |
if (!setting.hasClass(gs.special)) {
|
244 |
setting.addClass(gs.changed);
|
245 |
+
if (setting.is('input[type=checkbox]')) {
|
246 |
+
highlight = setting.next('span');
|
247 |
+
highlight.addClass(gs.changed);
|
248 |
+
}
|
249 |
}
|
|
|
250 |
console_log('loaded: ' + att + ':' + atts[att]);
|
251 |
}
|
252 |
|
276 |
// Inline
|
277 |
var inline = jQuery('#' + s.inline_css);
|
278 |
inline.change(function() {
|
|
|
279 |
is_inline = jQuery(this).is(':checked');
|
280 |
var inline_hide = jQuery('.' + s.inline_hide_css);
|
281 |
var inline_single = jQuery('.' + s.inline_hide_only_css);
|
529 |
value = '';
|
530 |
if (setting.is('input[type=checkbox]')) {
|
531 |
// Boolean is stored as string
|
532 |
+
value = setting.is(':checked') ? 'true' : 'false';
|
533 |
} else {
|
534 |
value = setting.val();
|
535 |
}
|
538 |
// setter
|
539 |
if (setting.is('input[type=checkbox]')) {
|
540 |
if (typeof value == 'string') {
|
541 |
+
if (value == 'true' || value == '1') {
|
542 |
+
value = true;
|
543 |
+
} else if (value == 'false' || value == '0') {
|
544 |
+
value = false;
|
545 |
+
}
|
546 |
}
|
547 |
setting.prop('checked', value);
|
548 |
} else {
|
util/tag-editor/crayon_te_content.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
|
3 |
<?php
|
4 |
|
5 |
-
$
|
6 |
-
require_once ($
|
|
|
7 |
require_once (CrayonWP::wp_load_path());
|
8 |
-
require_once ($root.'/crayon_settings_wp.class.php');
|
9 |
require_once ('crayon_tag_editor_wp.class.php');
|
10 |
require_once (CRAYON_PARSER_PHP);
|
11 |
|
2 |
|
3 |
<?php
|
4 |
|
5 |
+
$crayon_root_te = dirname(dirname(dirname(__FILE__)));
|
6 |
+
require_once ($crayon_root_te . '/crayon_wp.class.php');
|
7 |
+
require_once ($crayon_root_te.'/crayon_settings_wp.class.php');
|
8 |
require_once (CrayonWP::wp_load_path());
|
|
|
9 |
require_once ('crayon_tag_editor_wp.class.php');
|
10 |
require_once (CRAYON_PARSER_PHP);
|
11 |
|
util/tag-editor/crayon_tinymce.js
CHANGED
@@ -81,7 +81,7 @@ var CrayonTinyMCE = new function() {
|
|
81 |
jQuery(currPre).replaceWith(newPre);
|
82 |
// XXX DOM element not jQuery
|
83 |
currPre = newPre[0];
|
84 |
-
}, 'tinymce', ed, currPre, 'decode',
|
85 |
|
86 |
if (!currPre) {
|
87 |
// If no pre is selected, then button highlight depends on if it's used
|
81 |
jQuery(currPre).replaceWith(newPre);
|
82 |
// XXX DOM element not jQuery
|
83 |
currPre = newPre[0];
|
84 |
+
}, 'tinymce', ed, currPre, 'decode', 'encode');
|
85 |
|
86 |
if (!currPre) {
|
87 |
// If no pre is selected, then button highlight depends on if it's used
|
util/theme-editor/editor.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
$
|
4 |
-
require_once $
|
5 |
|
6 |
//class CrayonThemeEditor {
|
7 |
//
|
1 |
<?php
|
2 |
|
3 |
+
$crayon_root_theme = dirname(dirname(dirname(__FILE__))) . '/';
|
4 |
+
require_once $crayon_root_theme . 'global.php';
|
5 |
|
6 |
//class CrayonThemeEditor {
|
7 |
//
|