Commits

Guilherme Gondim committed bcecc1c

update to Redactor 7.5.3 and some other minor improvements

Comments (0)

Files changed (101)

 from django.contrib import admin
 from django.db.models import TextField
-from redactor.widgets import JQueryEditor
+
+from redactor.widgets import RedactorEditor
 
 
 class RedactorModelAdmin(admin.ModelAdmin):
     formfield_overrides = {
-        TextField: {'widget': JQueryEditor},
+        TextField: {'widget': RedactorEditor},
     }
 
     class Media:
-        js = ('https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js', )
-
+        js = ('redactor/jquery-1.7.min.js',)
+        css = {'all': ('redactor/css/django_admin.css',)}
 from django import forms
 
+
 class ImageForm(forms.Form):
     file = forms.ImageField()
 

redactor/static/editor/css/blank.css

-
-/* =Reset
------------------------------------------------------------------------------*/
-html, body, div, span, a, img,
-h1, h2, h3, h4, h5, h6, hgroup, p,
-dl, dialog, dt, dd, ol, ul, li, 
-abbr, acronym, address, b, big, blockquote, 
-cite, code, del, dfn, em, i, ins, kbd, pre, q, 
-samp, tt, var, small, strong, sub, sup, 
-object, iframe, form, fieldset, label, legend, 
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, footer, header, nav, section,
-figure, menu, time, mark, audio, video { font-family: inherit; font-size: 100%; font-weight: inherit; font-style: inherit; vertical-align: baseline; white-space: normal; text-align: left; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; }
-textarea { font-family: inherit; font-size: 100%; font-weight: normal; font-style: normal; white-space: normal; text-align: left; margin: 0; padding: 0; }
-
-article, aside, footer, header, nav, section,
-dialog, figure, hgroup, menu { display: block; }
-
-h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }
-del, ins { text-decoration: none; }
-ol, ul { list-style: none; }
-nav ul { list-style-type: none; }
-table { border-collapse: separate; border-spacing: 0; background-color: transparent; width: auto; height: auto; }
-
-input { margin: 0; }
-textarea { overflow: auto;}
-
-
-
-body {
-	font-family: "Trebuchet MS", Verdana, Arial, Tahoma, sans-serif;      
-	font-size: 90%;
-	margin: 0;
-	padding: 10px 0;	
-}
-
-strong, b { font-weight: bold; }
-em,dfn, i     { font-style: italic; }
-sup, sub {  vertical-align: baseline; position: relative; }
-sup { top: -0.4em; }
-sub { bottom: -0.3em; }
-
-blockquote {
-	padding-left: 10px;
-	padding-right: 5px;
-	border-left: 3px solid #ddd;
-	margin-bottom: 1.5em;
-}
-div {
-	line-height: 1.3em;
-	padding: 0 10px;
-}
-p {
-	margin-bottom: 1.3em;
-	line-height: 1.5em;
-	padding: 0 10px;	
-}
-ul, ol {
-	line-height: 1.5em;
-	margin: 0 0 1.3em 0;
-}
-li {
-	padding: 0 10px;
-}
-table {
-	border-collapse: collapse;
-	font-size: 1em;	
-	margin: 0 10px;	
-	margin-bottom: 1.3em;
-}
-table td {
-	border: 1px solid #ddd;
-	padding: 5px;
-}
-table thead td {
-	border-bottom: 2px solid #000 !important;
-	font-weight: bold;
-}
-code, pre { font: 1.2em/1 "Courier New", Courier, monospace; background: #f5f5f5;  padding: 1em; margin: 0 10px; margin-bottom: 1.3em; }
-pre { border: 1px dashed #ccc; line-height: 1.7em; font-size: .9em; background: #f5f5f5; overflow: auto;  }
-
-
-.img_left {
-	float: left;
-	margin-right: 10px; 
-	margin-bottom: 10px;
-}
-.img_right {
-	float: right;
-	margin-left: 10px; 
-	margin-bottom: 10px;
-}
-
-.editor_video_box {
-	width: 300px;
-	height: 200px;
-	background: url(../i/video_box.png) center no-repeat #000 !important;	
-	margin: 1.3em;
-}
-.editor_video_box object, .editor_video_box embed, .editor_video_box iframe {
-	display: none;
-}
-
-.editor_file_link {
-	padding-left: 20px;
-}
-.editor_file_ico_avi 	{ background: url(../i/fileicons/avi.png) no-repeat; }
-.editor_file_ico_csv 	{ background: url(../i/fileicons/csv.png) no-repeat; }
-.editor_file_ico_doc 	{ background: url(../i/fileicons/doc.png) no-repeat; }
-.editor_file_ico_gif 	{ background: url(../i/fileicons/gif.png) no-repeat; }
-.editor_file_ico_html 	{ background: url(../i/fileicons/html.png) no-repeat; }
-.editor_file_ico_jpg 	{ background: url(../i/fileicons/jpg.png) no-repeat; }
-.editor_file_ico_mov	{ background: url(../i/fileicons/mov.png) no-repeat; }
-.editor_file_ico_other 	{ background: url(../i/fileicons/other.png) no-repeat; }
-.editor_file_ico_pdf 	{ background: url(../i/fileicons/pdf.png) no-repeat; }
-.editor_file_ico_png 	{ background: url(../i/fileicons/png.png) no-repeat; }
-.editor_file_ico_ppt 	{ background: url(../i/fileicons/ppt.png) no-repeat; }
-.editor_file_ico_rar 	{ background: url(../i/fileicons/rar.png) no-repeat; }
-.editor_file_ico_rtf 	{ background: url(../i/fileicons/rtf.png) no-repeat; }
-.editor_file_ico_txt 	{ background: url(../i/fileicons/txt.png) no-repeat; }
-.editor_file_ico_xls 	{ background: url(../i/fileicons/xls.png) no-repeat; }
-.editor_file_ico_zip 	{ background: url(../i/fileicons/zip.png) no-repeat; }
-
-
-h1, h2, h3, h4,h5 {
-	font-weight: normal;
-	margin: 0;
-	padding: 0 10px;
-}
-
-h1 {
-	font-size: 30px;
-	margin-bottom: 12px;
-}
-h2 {
-	font-size: 24px;
-	margin-bottom: 10px;
-}
-h3 {
-	font-size: 18px;
-	margin-bottom: 8px;
-}
-h4 {
-	font-size: 12px;
-	font-weight: bolder;
-}

redactor/static/editor/css/editor.css

-
-body .imp_editor_box {
-	border: 1px solid #e5e5e5;
-	background-color: #fff;
-	line-height: 1;
-	position: relative;
-	z-index: 1;
-	clear: both;
-}
-body .imp_editor_frame {
-	width: 100%;
-}
-body .imp_editor_box textarea {
-	overflow: auto !important;
-	border: none !important;
-	// border-color: #fff;
-	// width: 99.8% !important;
-	font-size: 13px !important;
-	white-space: pre !important;	
-}
-body .imp_editor_toolbar, body .imp_editor_toolbar li, body .imp_editor_drop_down, body .imp_editor_drop_down li {
-	margin: 0 !important;
-	padding: 0 !important;
-	list-style: none !important;
-	line-height: 1;
-}
-body .imp_editor_toolbar {
-	position: relative !important;
-	float: left !important;
-	width: 100% !important;
-	height: 32px !important;	
-}
-body .imp_editor_toolbar li {
-	float: left !important;
-	width: 32px;
-	height: 32px !important;
-	position: relative !important;
-}
-body .imp_editor_toolbar li.act {
-	z-index: 3;
-}
-body .imp_editor_toolbar li a {
-	display: block;
-	height: 32px;
-	zoom: 1;
-	overflow: hidden;
-}
-body .imp_editor_toolbar li.separator {
-	width: 2px;
-	margin: 0 3px;	
-}
-body .imp_editor_drop_down {
-	z-index: 2;
-	position: absolute;
-	top: 32px;
-	left: 0;
-	background-color: #fff;
-	box-shadow: 0px 1px 5px #666;
-	-webkit-box-shadow: 0 1px 5px #666; 
-  	-moz-box-shadow: 0 1px 5px #666; 	  	
-}
-body .imp_editor_drop_down li {
-	font-size: 12px !important;
-	float: none;
-	list-style: none !important;	
-	width: 200px;	
-	height: auto !important;
-	background: none !important;	
-}
-body .imp_editor_drop_down li.separator_drop {
-	border-bottom: 1px solid #eee;
-}
-body .imp_editor_drop_down li a {
-	color: #000 !important;
-	text-decoration: none !important;
-	height: auto;	
-	display: block;
-	padding: 6px 36px 6px 8px;
-	background: none;
-}
-body .imp_editor_drop_down li a:hover {
-	color: #000 !important;
-	text-decoration: none !important;
-	background-color: #eee;
-}
-body .imp_editor_drop_down li a.editor_color_link {
-	padding: 0;
-	display: block !important;
-	width: 15px !important;
-	height: 15px !important;
-	float: left !important;
-	border: 2px solid #fff !important;
-	font-size: 1px;
-}
-								
-
-
-body .imp_editor_resize {	
-	cursor: s-resize;
-	height: 8px !important;
-	line-height: 1 !important;
-	font-size: 1px !important;
-}
-body .imp_editor_resize div {
-	height: 8px !important;
-	line-height: 0 !important;
-	font-size: 1px !important;
-}
-
-
-
-
-/* SKINS */
-
-/* =Carrara White
------------------------------------------------------------------------------*/
-body .imp_editor_box_carrara_white .imp_editor_toolbar {
-	background: url(../i/bg_carrara_white.png) repeat-x top #d1d1d1;
-	border-bottom: 1px solid #b2b2b2;
-}
-body .imp_editor_box_carrara_white .imp_editor_toolbar li.act {
-	background: url(../i/hover.png) repeat-x;
-}
-body .imp_editor_box_carrara_white .imp_editor_toolbar li a {
-	background: url(../i/icons.png) no-repeat;	
-}
-body .imp_editor_box_carrara_white .imp_editor_toolbar li:hover {
-	background: url(../i/hover.png) repeat-x;
-}
-body .imp_editor_box_carrara_white .imp_editor_resize {
-	border-top: 1px solid #d7d6d6 !important;
-	background: url(../i/bg_carrara_white.png) repeat-x !important;	
-}
-body .imp_editor_box_carrara_white .imp_editor_resize div {
-	background: url(../i/resizer.gif) center no-repeat !important;
-}
-body .imp_editor_box_carrara_white .imp_editor_toolbar li.separator {
-	background: url(../i/separator.png) no-repeat right;
-}
-
-/* =Cream White
------------------------------------------------------------------------------*/
-body .imp_editor_box_cream_white .imp_editor_toolbar {
-	background: url(../i/bg_cream_white.png) repeat-x top #ddd4c7;
-	border-bottom: 1px solid #b2b2b2;
-}
-body .imp_editor_box_cream_white .imp_editor_toolbar li.act {
-	background: url(../i/hover.png) repeat-x;
-}
-body .imp_editor_box_cream_white .imp_editor_toolbar li a {
-	background: url(../i/icons.png) no-repeat;	
-}
-body .imp_editor_box_cream_white .imp_editor_toolbar li:hover {
-	background: url(../i/hover.png) repeat-x;
-}
-body .imp_editor_box_cream_white .imp_editor_resize {
-	border-top: 1px solid #d7d6d6 !important;
-	background: url(../i/bg_cream_white.png) repeat-x !important;	
-}
-body .imp_editor_box_cream_white .imp_editor_resize div {
-	background: url(../i/resizer.gif) center no-repeat !important;
-}
-body .imp_editor_box_cream_white .imp_editor_toolbar li.separator {
-	background: url(../i/separator.png) no-repeat right;
-}
-
-/* =Arctic Silver
------------------------------------------------------------------------------*/
-body .imp_editor_box_arctic_silver .imp_editor_toolbar {
-	background: url(../i/bg_arctic_silver.png) repeat-x top #b9c7d4;
-	border-bottom: 1px solid #7f7f7f;
-}
-body .imp_editor_box_arctic_silver .imp_editor_toolbar li.act {
-	background: url(../i/hover.png) repeat-x;
-}
-body .imp_editor_box_arctic_silver .imp_editor_toolbar li a {
-	background: url(../i/icons.png) no-repeat;	
-}
-body .imp_editor_box_arctic_silver .imp_editor_toolbar li:hover {
-	background: url(../i/hover.png) repeat-x;
-}
-body .imp_editor_box_arctic_silver .imp_editor_resize {
-	border-top: 1px solid #d7d6d6 !important;
-	background: url(../i/bg_arctic_silver.png) repeat-x !important;	
-}
-body .imp_editor_box_arctic_silver .imp_editor_resize div {
-	background: url(../i/resizer.gif) center no-repeat !important;
-}
-body .imp_editor_box_arctic_silver .imp_editor_toolbar li.separator {
-	background: url(../i/separator.png) no-repeat right;
-}
-
-/* =Racing Green
------------------------------------------------------------------------------*/
-body .imp_editor_box_racing_green .imp_editor_toolbar {
-	background: url(../i/bg_racing_green.png) repeat-x top #546762;
-	border-bottom: 1px solid #151515;
-}
-body .imp_editor_box_racing_green .imp_editor_toolbar li.act {
-	background: url(../i/hover_invert.png) repeat-x;
-}
-body .imp_editor_box_racing_green .imp_editor_toolbar li a {
-	background: url(../i/icons_invert.png) no-repeat;	
-}
-body .imp_editor_box_racing_green .imp_editor_toolbar li:hover {
-	background: url(../i/hover_invert.png) repeat-x;
-}
-body .imp_editor_box_racing_green .imp_editor_resize {
-	border-top: 1px solid #666 !important;
-	background: url(../i/bg_racing_green.png) repeat-x !important;	
-}
-body .imp_editor_box_racing_green .imp_editor_resize div {
-	background: url(../i/resizer_invert.png) center no-repeat !important;
-}
-body .imp_editor_box_racing_green .imp_editor_toolbar li.separator {
-	background: url(../i/separator_invert.png) no-repeat right;
-}
-
-/* =Brown
------------------------------------------------------------------------------*/
-body .imp_editor_box_brown .imp_editor_toolbar {
-	background: url(../i/bg_brown.png) repeat-x top #332118;
-	border-bottom: 1px solid #151515;
-}
-body .imp_editor_box_brown .imp_editor_toolbar li.act {
-	background: url(../i/hover_invert.png) repeat-x;
-}
-body .imp_editor_box_brown .imp_editor_toolbar li a {
-	background: url(../i/icons_invert.png) no-repeat;	
-}
-body .imp_editor_box_brown .imp_editor_toolbar li:hover {
-	background: url(../i/hover_invert.png) repeat-x;
-}
-body .imp_editor_box_brown .imp_editor_resize {
-	border-top: 1px solid #151515 !important;
-	background: url(../i/bg_brown.png) repeat-x !important;	
-}
-body .imp_editor_box_brown .imp_editor_resize div {
-	background: url(../i/resizer_invert.png) center no-repeat !important;
-}
-body .imp_editor_box_brown .imp_editor_toolbar li.separator {
-	background: url(../i/separator_invert.png) no-repeat right;
-}
-
-/* =Macadamia
------------------------------------------------------------------------------*/
-body .imp_editor_box_macadamia .imp_editor_toolbar {
-	background: url(../i/bg_macadamia.png) repeat-x top #705246;
-	border-bottom: 1px solid #151515;
-}
-body .imp_editor_box_macadamia .imp_editor_toolbar li.act {
-	background: url(../i/hover_invert.png) repeat-x;
-}
-body .imp_editor_box_macadamia .imp_editor_toolbar li a {
-	background: url(../i/icons_invert.png) no-repeat;	
-}
-body .imp_editor_box_macadamia .imp_editor_toolbar li:hover {
-	background: url(../i/hover_invert.png) repeat-x;
-}
-body .imp_editor_box_macadamia .imp_editor_resize {
-	border-top: 1px solid #666 !important;
-	background: url(../i/bg_macadamia.png) repeat-x !important;	
-}
-body .imp_editor_box_macadamia .imp_editor_resize div {
-	background: url(../i/resizer_invert.png) center no-repeat !important;
-}
-body .imp_editor_box_macadamia .imp_editor_toolbar li.separator {
-	background: url(../i/separator_invert.png) no-repeat right;
-}
-
-/* =Guards Red
------------------------------------------------------------------------------*/
-body .imp_editor_box_guards_red .imp_editor_toolbar {
-	background: url(../i/bg_guards_red.png) repeat-x top #8e1316;
-	border-bottom: 1px solid #151515;
-}
-body .imp_editor_box_guards_red .imp_editor_toolbar li.act {
-	background: url(../i/hover_invert.png) repeat-x;
-}
-body .imp_editor_box_guards_red .imp_editor_toolbar li a {
-	background: url(../i/icons_invert.png) no-repeat;	
-}
-body .imp_editor_box_guards_red .imp_editor_toolbar li:hover {
-	background: url(../i/hover_invert.png) repeat-x;
-}
-body .imp_editor_box_guards_red .imp_editor_resize {
-	border-top: 1px solid #777 !important;
-	background: url(../i/bg_guards_red.png) repeat-x !important;	
-}
-body .imp_editor_box_guards_red .imp_editor_resize div {
-	background: url(../i/resizer_invert.png) center no-repeat !important;
-}
-body .imp_editor_box_guards_red .imp_editor_toolbar li.separator {
-	background: url(../i/separator_invert.png) no-repeat right;
-}
-
-
-/* BUTTONS */
-body .imp_editor_toolbar li a.imp_btn_html 		 { background-position: 0; }
-body .imp_editor_toolbar li a.imp_btn_styles 		 { background-position: -32px; }
-body .imp_editor_toolbar li a.imp_btn_format 		 { background-position: -64px; }
-body .imp_editor_toolbar li a.imp_btn_lists 		 { background-position: -96px; }
-body .imp_editor_toolbar li a.imp_btn_image 		 { background-position: -128px; }
-body .imp_editor_toolbar li a.imp_btn_table 		 { background-position: -160px; }
-body .imp_editor_toolbar li a.imp_btn_link 		 { background-position: -192px; }
-body .imp_editor_toolbar li a.imp_btn_video 		 { background-position: -224px; }
-body .imp_editor_toolbar li a.imp_btn_fullscreen 	 { background-position: -256px; }
-body .imp_editor_toolbar li a.imp_btn_undo 		 { background-position: -288px; }
-body .imp_editor_toolbar li a.imp_btn_redo		 { background-position: -320px; }
-body .imp_editor_toolbar li a.imp_btn_bold		 { background-position: -352px; }
-body .imp_editor_toolbar li a.imp_btn_italic 		 { background-position: -384px; }
-body .imp_editor_toolbar li a.imp_btn_superscript  { background-position: -416px; }
-body .imp_editor_toolbar li a.imp_btn_file 		 { background-position: -448px; }
-body .imp_editor_toolbar li a.imp_btn_hr 			 { background-position: -480px; }
-body .imp_editor_toolbar li a.imp_btn_align 		 { background-position: -512px; }
-body .imp_editor_toolbar li a.imp_btn_align_center { background-position: -544px; }
-body .imp_editor_toolbar li a.imp_btn_align_right  { background-position: -576px; }
-body .imp_editor_toolbar li a.imp_btn_outdent 	 { background-position: -608px; }
-body .imp_editor_toolbar li a.imp_btn_indent 		 { background-position: -640px; }
-body .imp_editor_toolbar li a.imp_btn_charmap 	 { background-position: -672px; }
-body .imp_editor_toolbar li a.imp_btn_backcolor  	 { background-position: -704px; }
-body .imp_editor_toolbar li a.imp_btn_fontcolor	 { background-position: -736px; }
-body .imp_editor_toolbar li a.imp_btn_orderlist 	 { background-position: -768px; }
-body .imp_editor_toolbar li a.imp_btn_align_left 	 { background-position: -800px; }
-body .imp_editor_toolbar li a.imp_btn_cut			 { background-position: -832px; }
-body .imp_editor_toolbar li a.imp_btn_strike   	 { background-position: -864px; }
-body .imp_editor_toolbar li a.imp_btn_unorderlist	 { background-position: -896px; }
-body .imp_editor_toolbar li a.imp_btn_format_clean { background-position: -928px; }
-
-
-
-
-
-/* MODAL */
-#editor_imp_modal_overlay {
-	position: absolute;
-	margin: auto;
-	top: 0;
-	left: 0;
-	width: 100%;
-	height: 100%;
-	z-index: 50000;
-	-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
-	filter:alpha(opacity=60);
-	opacity: 0.60;
-	background-color: #000 !important;
-}
-#editor_imp_modal_overlay[id] { position: fixed; }
-
-#editor_imp_modal {
-	background-color: #fff;
-	position: fixed;
-	top: 50%;
-	left: 50%;
-	
-	box-shadow: 0px 5px 20px #333;
-	-webkit-box-shadow: 0 5px 20px #333; 
-  	-moz-box-shadow: 0 5px 20px #333;		
-  	
-  	z-index: 50001;	
-  	
-	font-family: "Trebuchet MS", "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;   	
-	color: #000;
-}
-#editor_imp_modal_header {
-	padding: 30px 40px;
-	font-size: 24px;
-}
-#editor_imp_modal_inner {
-	padding: 0 40px 30px 40px;
-}
-#editor_imp_modal_close {
-	position: absolute;
-	right: -11px;
-	top: -11px;
-	width: 30px;
-	height: 30px;
-	background: url(../i/close.png) no-repeat;
-	cursor: pointer;
-}
-.editor_ruler td {
-	font-size: 12px;
-	padding: 5px;
-	border: none;
-}
-
-/* CHARMAP */
-#editor_charmap {
-	overflow: hidden;
-	margin-bottom: 1.5em;
-}
-#editor_charmap a, #editor_charmap a:hover {
-	float: left;
-	text-decoration: none !important;
-	color: #333 !important;
-	border: 1px solid #eee;
-	display: block;
-	line-height: 1;
-	width: 20px;
-	text-align: center;
-	padding: 4px 0;
-	font-size: 18px;
-}
-#editor_charmap a:hover {
-	background-color: #000;
-	color: #fff !important;
-	border: 1px solid #900;
-}

redactor/static/editor/css/writer.css

-
-/* =Reset
------------------------------------------------------------------------------*/
-html, body, div, span, a, img,
-h1, h2, h3, h4, h5, h6, hgroup, p,
-dl, dialog, dt, dd, ol, ul, li, 
-abbr, acronym, address, b, big, blockquote, 
-cite, code, del, dfn, em, i, ins, kbd, pre, q, 
-samp, tt, var, small, strong, sub, sup, 
-object, iframe, form, fieldset, label, legend, 
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, footer, header, nav, section,
-figure, menu, time, mark, audio, video { font-family: inherit; font-size: 100%; font-weight: inherit; font-style: inherit; vertical-align: baseline; white-space: normal; text-align: left; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; }
-textarea { font-family: inherit; font-size: 100%; font-weight: normal; font-style: normal; white-space: normal; text-align: left; margin: 0; padding: 0; }
-
-article, aside, footer, header, nav, section,
-dialog, figure, hgroup, menu { display: block; }
-
-h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }
-del, ins { text-decoration: none; }
-ol, ul { list-style: none; }
-nav ul { list-style-type: none; }
-table { border-collapse: separate; border-spacing: 0; background-color: transparent; width: auto; height: auto; }
-
-input { margin: 0; }
-textarea { overflow: auto;}
-
-
-body {
-	font-family: Georgia, Verdana, Arial, Tahoma, sans-serif;      
-	font-size: 90%;
-	margin: 0;
-	padding: 10px 0;	
-	
-}
-strong, b { font-weight: bold; }
-em,dfn, i     { font-style: italic; }
-sup, sub {  vertical-align: baseline; position: relative; }
-sup { top: -0.4em; }
-sub { bottom: -0.3em; }
-
-blockquote {
-	padding-left: 10px;
-	padding-right: 5px;
-	border-left: 3px solid #ddd;
-	margin-bottom: 1.5em;
-}
-div {
-	line-height: 1.3em;
-	padding: 0 10px;
-}
-p {
-	margin-bottom: 1.3em;
-	line-height: 1.5em;
-	padding: 0 10px;	
-}
-ul, ol {
-	line-height: 1.5em;
-	margin: 0 0 1.3em 0;
-}
-li {
-	padding: 0 10px;
-}
-table {
-	border-collapse: collapse;
-	font-size: 1em;	
-	margin: 0 10px;	
-	margin-bottom: 1.3em;	
-}
-table td {
-	border: 1px solid #ddd;
-	padding: 5px;
-}
-table thead td {
-	border-bottom: 2px solid #000 !important;
-	font-weight: bold;
-}
-code, pre { font: 1.2em/1 "Courier New", Courier, monospace; background: #f5f5f5;  padding: 1em; margin: 0 10px; margin-bottom: 1.3em; }
-pre { border: 1px dashed #ccc; line-height: 1.7em; font-size: .9em; background: #f5f5f5; overflow: auto;  }
-
-
-.img_left {
-	float: left;
-	margin-right: 10px; 
-	margin-bottom: 10px;
-}
-.img_right {
-	float: right;
-	margin-left: 10px; 
-	margin-bottom: 10px;
-}
-
-
-.editor_video_box {
-	width: 300px;
-	height: 200px;
-	background: url(../i/video_box.png) center no-repeat #000 !important;	
-	margin: 1.3em;
-}
-.editor_video_box object, .editor_video_box embed, .editor_video_box iframe {
-	display: none;
-}
-
-.editor_file_link {
-	padding-left: 20px;
-}
-.editor_file_ico_avi 	{ background: url(../i/fileicons/avi.png) no-repeat; }
-.editor_file_ico_csv 	{ background: url(../i/fileicons/csv.png) no-repeat; }
-.editor_file_ico_doc 	{ background: url(../i/fileicons/doc.png) no-repeat; }
-.editor_file_ico_gif 	{ background: url(../i/fileicons/gif.png) no-repeat; }
-.editor_file_ico_html 	{ background: url(../i/fileicons/html.png) no-repeat; }
-.editor_file_ico_jpg 	{ background: url(../i/fileicons/jpg.png) no-repeat; }
-.editor_file_ico_mov	{ background: url(../i/fileicons/mov.png) no-repeat; }
-.editor_file_ico_other 	{ background: url(../i/fileicons/other.png) no-repeat; }
-.editor_file_ico_pdf 	{ background: url(../i/fileicons/pdf.png) no-repeat; }
-.editor_file_ico_png 	{ background: url(../i/fileicons/png.png) no-repeat; }
-.editor_file_ico_ppt 	{ background: url(../i/fileicons/ppt.png) no-repeat; }
-.editor_file_ico_rar 	{ background: url(../i/fileicons/rar.png) no-repeat; }
-.editor_file_ico_rtf 	{ background: url(../i/fileicons/rtf.png) no-repeat; }
-.editor_file_ico_txt 	{ background: url(../i/fileicons/txt.png) no-repeat; }
-.editor_file_ico_xls 	{ background: url(../i/fileicons/xls.png) no-repeat; }
-.editor_file_ico_zip 	{ background: url(../i/fileicons/zip.png) no-repeat; }
-
-h1, h2, h3, h4,h5 {
-	font-weight: normal;
-	margin: 0;
-	padding: 0 10px;
-}
-
-h1 {
-	font-size: 30px;
-	margin-bottom: 12px;
-}
-h2 {
-	font-size: 24px;
-	margin-bottom: 10px;
-}
-h3 {
-	font-size: 18px;
-	margin-bottom: 8px;
-}
-h4 {
-	font-size: 12px;
-	font-weight: bolder;
-}

redactor/static/editor/editor.js

-/*
-	WYSIWYG Editor v6.4.0
-	http://imperavi.com/
- 
-	Copyright 2011, Imperavi Ltd.
-	Dual licensed under the MIT or GPL Version 2 licenses.
-	
-	EXAMPLE
-	$('#content').editor();
-*/
-
-var isCtrl = false;
-var editorActive = false;
-
-var $table = false;
-var $tbody = false;
-var $thead = false;
-var $current_tr = false;
-var $current_td = false;
-
-(function($){
-
-
-	// Initialization	
-	$.fn.editor = function(options)
-	{				
-		var obj = new Construct(this, options);	
-		
-		obj.init();
-		
-		return obj;
-	};
-	
-	// Options and variables	
-	function Construct(el, options) {
-
-		this.opts = $.extend({	
-			toolbar: 'original', // false, original, mini, classic
-			lang: 'ru',		
-			skin: 'carrara_white', //  carrara_white, cream_white, arctic_silver, racing_green, brown, macadamia, guards_red
-			fullscreen: false,
-			typo: '/typo.php',
-			autosave: false, // false or url
-			interval: 20, // seconds
-			resize: true,
-			visual: true,
-			focus: true,
-			image_upload: 'upload.php',
-			imageUploadParams: '', // GET params
-			imageUploadFunction: false, // callback function
-			file_upload: 'file.php',	
-			file_download: '/file.php?file=',		
-			file_delete: '/file.php?delete=',		
-			fileUploadParams: '', // GET params
-			fileUploadFunction: false, // callback function
-			autoclear: true,
-			remove_classes: false,	
-			init_clear: false,		
-			autoformat: true,
-			overlay: true, // modal overlay
-			colors: Array(
-				'#ffffff', '#000000', '#eeece1', '#1f497d', '#4f81bd', '#c0504d', '#9bbb59', '#8064a2', '#4bacc6', '#f79646',
-				'#f2f2f2', '#7f7f7f', '#ddd9c3', '#c6d9f0', '#dbe5f1', '#f2dcdb', '#ebf1dd', '#e5e0ec', '#dbeef3', '#fdeada',
-				'#d8d8d8', '#595959', '#c4bd97', '#8db3e2', '#b8cce4', '#e5b9b7', '#d7e3bc', '#ccc1d9', '#b7dde8', '#fbd5b5',
-				'#bfbfbf', '#3f3f3f', '#938953', '#548dd4', '#95b3d7', '#d99694', '#c3d69b', '#b2a2c7', '#b7dde8', '#fac08f',
-				'#a5a5a5', '#262626', '#494429', '#17365d', '#366092', '#953734', '#76923c', '#5f497a', '#92cddc', '#e36c09',
-				'#7f7f7f', '#0c0c0c', '#1d1b10', '#0f243e', '#244061', '#632423', '#4f6128', '#3f3151', '#31859b', '#974806'),
-			path: '',
-			pathCss: 'css/',
-			css: ['blank.css']
-		}, options);
-		
-		this.$el = $(el);
-	};
-
-	// Functionality
-	Construct.prototype = {
-	
-		init: function()
-		{
-			this.cssUrl = Array();
-			
-			// get editor css path
-			if (this.opts.path == '')
-			{
-				path = '';
-				$("script").each(function(i,s)
-				{
-					if (s.src && s.src.match(/editor\.js/)) path = s.src.replace(/editor\.js/, '');
-				});
-				this.opts.path = path;
-			}
-			if (this.opts.pathCss.substr(0,1) != '/') this.opts.pathCss = this.opts.path + this.opts.pathCss;
-			for (key in this.opts.css)
-			{
-				if (this.opts.css[key].substr(0,1) != '/') this.cssUrl[key] = this.opts.pathCss + this.opts.css[key];
-				else this.cssUrl[key] = this.opts.css[key];
-			}
-			
-			// lang
-			$('head').append($('<script type="text/javascript" src="' + this.opts.path + 'langs/' + this.opts.lang + '.js"></script>')); 									
-		
-			// sizes and id
-	   		this.frameID = this.$el.attr('id');
-	   		this.width = this.$el.css('width');
-	   		this.height = this.$el.css('height'); 
-	   		  		
-	   		
-	   		// modal overlay
-	   		if ($('#editor_imp_modal_overlay').size() == 0)
-	   		{
-		   		this.overlay = $('<div id="editor_imp_modal_overlay" style="display: none;"></div>');
-		   		$('body').prepend(this.overlay);
-		   	}
-	   		
-	   		// create container
-			this.box = $('<div id="imp_editor_box_' + this.frameID + '" style="width: ' + this.width + ';" class="imp_editor_box imp_editor_box_' + this.opts.skin + '"></div>');
-	
-	 		 // create iframe
-			this.frame = $('<iframe frameborder="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" scrolling="auto"  id="imp_editor_frame_' + this.frameID + '" style="height: ' + this.height + ';" class="imp_editor_frame"></iframe>');
-	   	
-			this.$el.hide().tabby();	
-					   	
-	   	
-			// append box and frame
-			$(this.box).insertAfter(this.$el).append(this.frame).append(this.$el);
-
- 			// toolbar
- 			if (this.opts.toolbar !== false)
- 			{
-				$('head').append($('<script type="text/javascript" src="' + this.opts.path + 'toolbars/' + this.opts.toolbar + '.js"></script>')); 						
-		   		this.toolbar = $('<ul id="imp_editor_toolbar_' + this.frameID + '" class="imp_editor_toolbar"></ul>');
-				$(this.box).prepend(this.toolbar);
-				this.buildToolbar();
-			}
-
-			// resizer
-			if (this.opts.resize)
-			{
-				this.resizer = $('<div id="imp_editor_resize' + this.frameID + '" class="imp_editor_resize"><div></div></div>');
-				$(this.box).append(this.resizer);
-	
-	           $(this.resizer).mousedown(function(e) { this.initResize(e) }.bind(this));
-			}
-			
-			
-			// enable	
-	   		this.enable(this.$el.val());
-
-			$(this.doc).click(function() { this.hideAllDropDown() }.bind(this));
-			$(this.doc).bind('paste', function(e)
-			{ 
-				if (this.opts.autoclear) setTimeout(function () { this.clearWord(); }.bind(this), 400);
-				else this.syncCode();
-					
-			}.bind(this));
-
-
-			// doc events
- 		
-			$(this.doc).keydown(function(e)
-		    {
-		        if (e.ctrlKey || e.metaKey) isCtrl = true;
-		                
-		        if (e.keyCode == 9) { this.execCommand('indent', false); return false; }
-		        if (e.keyCode == 66 && isCtrl) { this.execCommand('bold', 'bold'); return false; }
-		        if (e.keyCode == 73 && isCtrl) { this.execCommand('italic', 'italic'); return false; }	
- 		               
-		    }.bind(this)).keyup(function(e)
-		    {
-		        isCtrl = false;			        
-		        this.syncCode(true);		        	        
-		    }.bind(this));
-
-			
-			// autosave	
-			if (this.opts.autosave)	
-			{	
-				setInterval(function()
-				{
-					var html = this.getHtml();
-					$.post(this.opts.autosave, { data: html });
-
-				}.bind(this), this.opts.interval*1000);
-				
-			}		
-			
-			this.formSets();	
-
-			// focus
-			if (this.opts.focus) this.focus();   		 
-		},
-		
-	
-		/* 	
-			API 
-		*/
-		setHtml: function(html)
-		{
-			this.doc.body.innerHTML = html;			
-			this.docObserve();
-		},
-		getHtml: function(clear)
-		{
-			if (clear === true)  
-			{
-				this.paragraphise();
-
-				var html = this.doc.body.innerHTML;
-				html = this.preClear(html);			
-				html = this.cleanWHtml(html);			
-				return this.tidyUp(html);	
-			}
-			else return this.doc.body.innerHTML;
-		},
-		getCode: function(clear)
-		{
-			if (clear === true) 
-			{
-				var html = this.$el.val();
-				html = this.preClear(html);			
-				html = this.cleanWHtml(html);			
-				return this.tidyUp(html);				
-			}
-			else return this.$el.val();
-		},			
-		focus: function()
-		{
-			if ($.browser.msie) $(this.frame).load(function() { $(this).get(0).contentWindow.focus(); });
-			else this.frame.get(0).contentWindow.focus();
-		},	
-		typo: function()
-		{
-			var html = this.getHtml();
-			$.ajax({
-				url: this.opts.typo,
-				type: 'post',
-				data: 'editor=' + escape(encodeURIComponent(html)),
-				success: function(data)
-				{
-					this.setHtml(data);
-				}.bind(this)
-			});
-		},	
-		syncCode: function(keyup)
-		{
-			var html = this.getHtml();
-			
-			html = this.tidyUp(html, keyup);
-			
-			html = html.replace(/\%7B/gi, '{');
-			html = html.replace(/\%7D/gi, '}');
-	
-			html = html.replace(/<hr class="editor_cut">/gi, '<!--more-->');
-			html = html.replace(/<hr class=editor_cut>/gi, '<!--more-->');
-	
-			this.$el.val(html);
-		},
-					
-		
-		
-		/* 	
-			Enable 
-		*/	
-		enable: function(html)
-		{				
-	   		this.doc = this.contentDocumentFrame(this.frame);
-	   		
-			// flash replace
-			html = html.replace(/\<object([\w\W]*?)\<\/object\>/gi, '<p class="editor_video_box"><object$1</object></p>');	   		
-	   		
-	   		if (html == '')
-	   		{
-	   			if ($.browser.msie) html = "<p></p>";
-	   			else html = "<p>&nbsp;</p>";
-	   		}
-	   		
-			this.editorWrite(this.getEditorDoc(html));
-			
-			if (this.opts.init_clear) this.clearWord();
-			
-			this.designMode();		
-		},
-		editorWrite: function(html)
-		{
-			this.doc.open();
-			this.doc.write(html);
-			this.doc.close();		
-		},
-		getEditorDoc: function(html)
-		{
-			css = '';
-			for (key in this.cssUrl)
-			{
-				css += '<link media="all" type="text/css" href="' + this.cssUrl[key] + '" rel="stylesheet">';
-			}
-
-	    	var frameHtml = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n';
-			frameHtml += '<html><head>' + css + '</head><body>';
-			frameHtml += html;
-			frameHtml += '</body></html>';
-			return frameHtml;
-		},	
-		contentDocumentFrame: function(frame)
-		{	
-			frame = frame.get(0);
-	
-			if (frame.contentDocument) return frame.contentDocument;
-			else if (frame.contentWindow && frame.contentWindow.document) return frame.contentWindow.document;
-			else if (frame.document) return frame.document;
-			else return null;
-		},
-		designMode: function()
-		{
-			if (this.doc)
-			{
-				this.doc.designMode = 'on';
-				this.frame.load(function()
-				{ 				
-					// if ($.browser.msie) $(this.doc.body).css('padding', '0');
-					
-					this.enableObjects();
-					this.docObserve();			
-	   				this.doc.designMode = 'on'; 
-	   			}.bind(this));
-			}
-		},
-		enableObjects: function()
-		{
-	   		if ($.browser.mozilla)
-   			{
-				this.doc.execCommand("enableObjectResizing", false, "false");
-				this.doc.execCommand("enableInlineTableEditing", false, "false");	   		
-			}		
-		},
-		
-	
-		/*
-			Observers
-		*/		
-		docObserve: function()
-		{
-			var body = $(this.doc).find('body');
-			
-			body.find('img').click(function(e) { this.imageEdit(e); }.bind(this));
-			body.find('table').click(function(e) { this.tableObserver(e); }.bind(this));
-			body.find('.editor_file_link').click(function(e) { this.fileEdit(e); }.bind(this));
-
-		},		
-				
-		/*
-			Format on submit form 
-		*/
-		formSets: function()
-		{
-			var oldOnsubmit = null;		
-	
-			var theForm = $(this.box).parents('form');
-			if (theForm.length == 0) return false;
-	
-			oldOnsubmit = theForm.get(0).onsubmit;
-	
-			if (typeof theForm.get(0).onsubmit != "function")
-			{
-				theForm.get(0).onsubmit = function()
-				{
-	          		if (this.opts.visual)
-					{
-						this.syncCode();
-						
-						return true;
-					}
-				}.bind(this)
-			}
-			else
-			{
-				theForm.get(0).onsubmit = function()
-				{
-	            	if (this.opts.visual)
-					{
-						this.syncCode();
-	
-						return oldOnsubmit();
-					}
-				}.bind(this)
-			}
-	
-			return true;
-		},			
-		
-		/*
-			Exec
-		*/		
-		execCommand: function(cmd, param)
-		{		
-			if (this.opts.visual)
-			{
-				if (this.doc)
-				{
-	    			try
-		    		{
-	    				this.frame.get(0).contentWindow.focus();
-						
-		    			if (cmd == 'inserthtml' && $.browser.msie) this.doc.selection.createRange().pasteHTML(param);
-		    			else   			
-						{											
-							this.doc.execCommand(cmd, false, param);
-							
-							if (param == "blockquote" || param == 'pre')
-							{
-	    			    		this.doc.body.appendChild(this.doc.createElement("BR"));
-						    }					
-						}
-					}
-					catch (e) { }
-					
-					this.syncCode();		
-				}
-			}
-		},						
-	
-		/*
-			Fullscreen
-		*/		
-		fullscreen: function()
-		{	
-			if (this.opts.fullscreen === false)
-			{
-				this.addSelButton('fullscreen');					
-				this.opts.fullscreen = true;
-				if (this.resizer) this.resizer.hide();	
-				
-				this.height = this.frame.css('height');
-				this.width = (this.box.width() - 2) + 'px';
-				
-				var html = this.getHtml();
-
-				this.box.css({ position: 'absolute', top: 0, left: 0, zIndex: 10000 }).after('<span id="fullscreen_' + this.frameID +  '"></span>');
-				
-				$(document.body).prepend(this.box).css('overflow', 'hidden');
-
-				this.enable(html);
-				
-				$(this.doc).click(function() { this.hideAllDropDown() }.bind(this));
-								
-				this.fullScreenResize();				
-				$(window).resize(function() { this.fullScreenResize(); }.bind(this));
-				$(document).scrollTop(0,0);
-				this.focus();
-			}
-			else
-			{
-				this.opts.fullscreen = false;
-						
-				this.removeSelButton('fullscreen');					
-
-				$(window).unbind('resize', function() { this.fullScreenResize(); }.bind(this));	
-				$(document.body).css('overflow', '');		
-
-	
-				if (this.resizer) this.resizer.show();			
-				
-				var html = this.getHtml();	
-				
-				
-				this.box.css({ position: 'relative', top: 'auto', left: 'auto', zIndex: 1, width: this.width });
-				
-				$('#fullscreen_' + this.frameID).after(this.box).remove();			
-
-				this.enable(html);
-				
-				$(this.doc).click(function() { this.hideAllDropDown() }.bind(this));
-				
-				this.frame.css('height', this.height);						
-				this.$el.css('height', this.height);	
-				this.focus();								
-			}
-		},
-		fullScreenResize: function()
-		{
-			if (this.opts.fullscreen === false) return;
-			
-			var height = $(window).height() - 42;
-			
-			this.box.width($(window).width() - 2);
-			this.frame.height(height);		
-			this.$el.height(height);	
-		},
-		
-		/*
-			Tidy and format
-		*/	
-		clearWord: function()
-		{		
-			this.paragraphise();
-
-			var html = this.getHtml();
-
-			html = this.preClear(html);			
-			html = this.cleanWHtml(html);			
-			html = this.tidyUp(html);	
-
-			this.setHtml(html);
-	
-			return html;
-		},	
-		preClear: function(html)
-		{
-			// msie lowercase
-			if ($.browser.msie) 
-			{
-				html = html.replace(/< *(\/ *)?(\w+)/g,function(w){return w.toLowerCase()});
-				
-				html = html.replace(/ jQuery(.*?)=\"(.*?)\"/gi, '');
-			}
-			
-			// prepend cleaning
-			html = html.replace(/\<font(.*?)color="(.*?)"\>([\w\W]*?)\<\/font\>/gi, "<span style=\"color:$2;\">$3</span>");
-			var re= new RegExp('<font[^><]*>|<\/font[^><]*>','g')
-			html = html.replace(re,'');
-	
-			// convert rgb to hex
-			var matches = html.match(/rgb\((.*?)\)/gi);
-			for (i in matches)
-			{
-				var hex = this.convertRGB(matches[i]);
-				html = html.replace(matches[i], hex);
-			}			
-
-			if ($.browser.mozilla) html = this.convertSpan(html);
-			
-			return html;			
-		},
-		cleanWHtml: function(html)
-		{
-			var s = html.replace(/\r/g, '\n').replace(/\n/g, ' ');
-			
-			var rs = [];
-			rs.push(/<!--.+?-->/g);
-			rs.push(/<title>.+?<\/title>/g); 
-			rs.push(/<(meta|link|.?o:|.?style|.?div|.?html|body|.?span|!\[)[^>]*?>/g); 
-			rs.push(/ v:.*?=".*?"/g); 
-			rs.push(/ style=".*?"/g); 
-			
-			// remove classes
-			if (this.opts.remove_classes) rs.push(/ class=".*?"/g);
-			
-			rs.push(/(&nbsp;){2,}/g); 
-			rs.push(/<p>(\s|&nbsp;)*?<\/p>/g);
-			$.each(rs, function() {
-			    s = s.replace(this, '');
-			});
-			
-			s = s.replace(/\s+/g, ' ');
-			
-			return s;
-		},
-		tidyUp: function (html, keyup)
-		{
-
-		
-			html = html.replace(/[\t]*/g, ''); 
-			html = html.replace(/[\r\n]*/g, ''); 
-			html = html.replace(/\n\s*\n/g, "\n"); 
-			html = html.replace(/^[\s\n]*/, '');
-			html = html.replace(/[\s\n]*$/, '');		
-			
-			var lb = '\r\n';
-			var htags = ["<html","</html>","</head>","<title","</title>","<meta","<link","<style","</style>","</body>"];
-			for (i = 0; i < htags.length; ++i)
-			{
-				var hhh = htags[i];
-				html = html.replace(new RegExp(hhh,'gi'),lb+hhh);
-			}
-	
-			var btags = ["</form>","</fieldset>","<br>","<br />","<hr","<pre","</pre>","<blockquote","</blockquote>","<ul","</ul>","<ol","</ol>","<li","<dl","</dl>","<dt","</dt>","<dd","</dd>","<\!--","<table","</table>","</thead>","<tbody","</tbody>","<caption","</caption>","<th","</th>","<tr","</tr>","<td","<script","</script>","<noscript","</noscript>"];
-			for (i = 0; i < btags.length; ++i)
-			{
-				var bbb = btags[i];
-				html = html.replace(new RegExp(bbb,'gi'),lb+bbb);
-			}
-	
-			var ftags = ["<label","</label>","<legend","</legend>","<object","</object>","<embed","</embed>","<select","</select>","<option","<option","<input","<textarea","</textarea>"];
-			for (i = 0; i < ftags.length; ++i) 
-			{
-				var fff = ftags[i];
-				html = html.replace(new RegExp(fff,'gi'),lb+fff);
-			}
-	
-			var xtags = ["<body","<head","<div","<p","<form","<fieldset"];
-			for (i = 0; i < xtags.length; ++i) 
-			{
-				var xxx = xtags[i];
-				html = html.replace(new RegExp(xxx,'gi'),lb+lb+xxx);
-			}
-			
-			if (keyup !== true) html = HTMLtoXML(html)
-
-			// indenting
-			html = html.replace(/<li/g, "\t<li");
-			html = html.replace(/<tr/g, "\t<tr");
-			html = html.replace(/<td/g, "\t\t<td");		
-			html = html.replace(/<\/tr>/g, "\t</tr>");	
-			
-			// also
-			html = html.replace(/ class="Apple-style-span"/g, "");
-			html = html.replace(/ class="MsoNormal"/g, "");
-			html = html.replace(/ align="left"/g, "");						
-	
-			// empty tags
-			var btags = ["<pre></pre>","<blockquote></blockquote>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span><span>", "<p>&nbsp;</p>", "<p></p>", "<p><br></p>", "<div></div>"];
-			for (i = 0; i < btags.length; ++i)
-			{
-				var bbb = btags[i];
-				html = html.replace(new RegExp(bbb,'gi'), "");
-			}
-		
-			return html;
-		},
-
-		convertRGB: function(rgbString)
-		{
-			var parts = rgbString.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
-			
-			delete (parts[0]);
-			for (var i = 1; i <= 3; ++i)
-			{
-			    parts[i] = parseInt(parts[i]).toString(16);
-			    if (parts[i].length == 1) parts[i] = '0' + parts[i];
-			}
-			return '#' + parts.join('');
-		},
-
-		convertSpan: function(html)
-		{
-			html = html.replace(/\<span(.*?)style="font-weight: bold;"\>([\w\W]*?)\<\/span\>/gi, "<b>$2</b>");
-			html = html.replace(/\<span(.*?)style="font-style: italic;"\>([\w\W]*?)\<\/span\>/gi, "<i>$2</i>");
-			html = html.replace(/\<span(.*?)style="font-weight: bold; font-style: italic;"\>([\w\W]*?)\<\/span\>/gi, "<i><b>$2</b></i>");
-			html = html.replace(/\<span(.*?)style="font-style: italic; font-weight: bold;"\>([\w\W]*?)\<\/span\>/gi, "<b><i>$2</i></b>");
-	
-			return html;
-	  	},
-
-		/*
-			Paragraphise
-		*/
-		paragraphise: function()
-		{
-
-			if (this.opts.autoformat === false) return true;
-			if (this.opts.visual)
-			{
-				var theBody = this.doc.body;
-	
-				/* Remove all text nodes containing just whitespace */
-				for (var i = 0; i < theBody.childNodes.length; i++)
-				{
-					if (theBody.childNodes[i].nodeName.toLowerCase() == "#text" && theBody.childNodes[i].data.search(/^\s*$/) != -1)
-					{
-						theBody.removeChild(theBody.childNodes[i]);
-						i--;
-					}
-				}
-	
-				var removedElements = new Array();
-				for (var i = 0; i < theBody.childNodes.length; i++)
-				{
-					if (theBody.childNodes[i].nodeName.isInlineName())
-					{
-						removedElements.push(theBody.childNodes[i].cloneNode(true));
-						theBody.removeChild(theBody.childNodes[i]);	
-						i--;
-					}
-					else if (theBody.childNodes[i].nodeName.toLowerCase() == "br")
-					{
-						if (i + 1 < theBody.childNodes.length)
-						{
-							if (theBody.childNodes[i + 1].nodeName.toLowerCase() == "br")
-							{
-								while (i < theBody.childNodes.length && theBody.childNodes[i].nodeName.toLowerCase() == "br")
-								{
-									theBody.removeChild(theBody.childNodes[i]);
-								}
-	
-								if (removedElements.length > 0)
-								{
-									this.insertNewParagraph(removedElements, theBody.childNodes[i]);
-									removedElements = new Array();
-								}
-							}
-							else if (!theBody.childNodes[i + 1].nodeName.isInlineName()) theBody.removeChild(theBody.childNodes[i]);
-							else if (removedElements.length > 0)
-							{
-								removedElements.push(theBody.childNodes[i].cloneNode(true));	
-								theBody.removeChild(theBody.childNodes[i]);
-							}
-							else theBody.removeChild(theBody.childNodes[i]);
-							i--;
-						}
-						else theBody.removeChild(theBody.childNodes[i]);
-					}
-					else if (removedElements.length > 0)
-					{
-						this.insertNewParagraph(removedElements, theBody.childNodes[i]);
-						removedElements = new Array();
-					}
-				}
-	
-				if (removedElements.length > 0) this.insertNewParagraph(removedElements);
-			}
-	
-			return true;
-		},
-		insertNewParagraph: function(elementArray, succeedingElement)
-		{
-			var theBody = this.doc.getElementsByTagName("body")[0];
-			var theParagraph = this.doc.createElement("p");
-	
-			for (var i = 0; i < elementArray.length; i++) theParagraph.appendChild(elementArray[i]);
-	
-			if (typeof(succeedingElement) != "undefined") theBody.insertBefore(theParagraph, succeedingElement);
-			else theBody.appendChild(theParagraph);
-	
-			return true;
-		},
-
-		/*
-			Selection
-		*/			
-		get_selection: function ()
-		{
-			if (this.frame.get(0).contentWindow.getSelection) return this.frame.get(0).contentWindow.getSelection();
-			else if (this.frame.get(0).contentWindow.document.selection) return this.frame.contentWindow.get(0).document.selection.createRange();
-		},				
-		
-		setCut: function()
-		{
-			this.execCommand('inserthtml', '<hr class="editor_cut" />');
-		},		
-		
-		/*
-			Toggle
-		*/
-		toggle: function()
-		{
-			if (this.opts.visual)
-			{
-				this.addSelButton('html');
-				
-				var html = this.clearWord();
-	
-				html = html.replace(/\%7B/gi, '{');
-				html = html.replace(/\%7D/gi, '}');
-	
-				// flash replace
-				html = html.replace(/<p(.*?)class="editor_video_box"(.*?)>([\w\W]*?)\<\/p>/gi, "$3");
-
-				// cut replace	
-				html = html.replace(/<hr class="editor_cut"\/>/gi, '<!--more-->');
-				html = html.replace(/<hr class=editor_cut>/gi, '<!--more-->');
-		
-		
-				this.frame.hide();
-				this.$el.val(html);
-				this.$el.show().focus();
-	
-				var height = this.$el.height();
-				
-				this.opts.visual = false;
-			}
-			else
-			{
-				this.removeSelButton('html');
-				this.$el.hide();
-	
-				var html = this.$el.val();
-				
-				// cut replace
-				html = html.replace(/<!--more-->/gi, '<hr class="editor_cut"/>');
-	
-				// flash replace
-				html = html.replace(/\<object([\w\W]*?)\<\/object\>/gi, '<p class="editor_video_box"><object$1</object></p>');
-	
-					
-				this.opts.visual = true;
-	
-				this.setHtml(html);
-				
-				this.frame.show();
-				this.focus();
-			}
-		},	
-		
-		
-		/*
-			Video
-		*/
-		showVideo: function()
-		{
-			editorActive = this;
-			this.modalInit(RLANG.video, this.opts.path + 'plugins/video.html', 600, 360, function()
-			{
-				$('#editor_insert_video_area').focus();			
-			});
-		},	
-		insertVideo: function()
-		{
-			var data = $('#editor_insert_video_area').val();
-			if (editorActive.opts.visual) 
-			{
-				// iframe video
-				if (data.search('iframe')) {}
-				// flash
-				else data = '<p class="editor_video_box">' + data + '</p>';
-			}
-	
-			editorActive.execCommand('inserthtml', data);
-			this.modalClose();
-			
-		},	
-
-	
-		
-		/*
-			File
-		*/
-		showFile: function()
-		{
-			editorActive = this;
-			
-            var handler = function()
-            {
-                var params = '';
-
-                if (this.opts.fileUploadFunction) var params = this.opts.fileUploadFunction();
-                this.uploadInit('editorUploadFileForm', { url: this.opts.file_upload + params, trigger: 'editorUploadBtn', success: function(data) {
-                    this.fileUploadCallback(data);
-                }.bind(this)  });           
-
-            }.bind(this);
-            
-        
-            editorActive = this;
-			this.modalInit(RLANG.file, this.opts.path + 'plugins/file.html', 400, 200, handler);
-		},	
-		fileUploadCallback: function(data)
-		{
-			editorActive.frame.get(0).contentWindow.focus();
-			editorActive.execCommand('inserthtml', data);
-			this.modalClose();	
-			this.docObserve();		
-		},	
-		fileEdit: function(e)
-		{
-			var el = e.target;
-			var file_id = $(el).attr('rel');
-			
-			var handler = function()
-            {
-				$('#file').val($(el).text());
-				$('#editorFileDeleteBtn').click(function()
-				{
-					this.fileDelete(el, file_id);					
-				}.bind(this));
-				
-				$('#editorFileDownloadBtn').click(function()
-				{				
-					this.fileDownload(el, file_id);
-				}.bind(this));
-			
-			}.bind(this);
-			
-			editorActive = this;
-			this.modalInit(RLANG.file, this.opts.path + 'plugins/file_edit.html', 400, 200, handler);
-		},
-		fileDelete: function(el, file_id)
-		{
-			$(el).remove();
-			$.get(this.opts.file_delete + file_id);
-			editorActive.frame.get(0).contentWindow.focus();
-			this.modalClose();				
-		},
-		fileDownload: function(el, file_id)
-		{
-			top.location.href = this.opts.file_download + file_id;				
-		},		
-
-  		/*
-            Table
-        */
-        showTable: function()
-        {       
-            editorActive = this;
-            this.modalInit(RLANG.table, this.opts.path + 'plugins/table.html', 360, 200);
-        },
-        insertTable: function()
-        {           
-            var rows = $('#editor_table_rows').val();
-            var columns = $('#editor_table_columns').val();
-            
-            var table_box = $('<div></div>');
-            
-            var tableid = Math.floor(Math.random() * 99999);
-            var table = $('<table id="table' + tableid + '"><tbody></tbody></table>');
-            
-            for (i = 0; i < rows; i++)
-            {
-            	var row = $('<tr></tr>')
-            	for (z = 0; z < columns; z++)
-            	{
-            		var column = $('<td>&nbsp;</td>');
-            		$(row).append(column);
-            	}
-            	$(table).append(row);
-            }
-            
-            $(table_box).append(table);
-            var html = $(table_box).html();
-            if ($.browser.msie) html += '<p></p>';
- 			else  html += '<p>&nbsp;</p>';           
-                        
-            editorActive.execCommand('inserthtml', html);            
-   			this.enableObjects();
-            this.docObserve();          
-            this.modalClose();
-            
-            $table = $(this.doc).find('body').find('#table' + tableid);
-    
-            
-        },
-		tableObserver: function(e)
-		{
-			$table = $(e.target).parents('table');
-
-			$tbody = $(e.target).parents('tbody');
-			$thead = $($table).find('thead');
-
-			$current_td = $(e.target);
-			$current_tr = $(e.target).parents('tr');
-		},	
-		deleteTable: function()
-		{
-			$($table).remove();
-			$table = false;
-		},
-		deleteRow: function()
-		{
-			$($current_tr).remove();
-		},
-		deleteColumn: function()
-		{
-			var index = $($current_td).attr('cellIndex');
-            
-            $($table).find('tr').each(function()
-            {   
-                $(this).find('td').eq(index).remove();
-            });     
-		},	
-      	addHead: function()
-        {
-            if ($($table).find('thead').size() != 0) this.deleteHead();
-            else
-            {
-                var tr = $($table).find('tr').first().clone();
-                tr.find('td').html('&nbsp;');
-                $thead = $('<thead></thead>');
-                $thead.append(tr);
-                $($table).prepend($thead);
-            }
-        },      
-        deleteHead: function()
-        {
-            $($thead).remove(); 
-            $thead = false;   
-        },  
-		insertRowAbove: function()
-		{
-			this.insertRow('before');		
-		},	        
-		insertRowBelow: function()
-		{
-			this.insertRow('after');	
-		},
-		insertColumnLeft: function()
-		{
-			this.insertColumn('before');		
-		},
-		insertColumnRight: function()
-		{
-			this.insertColumn('after');
-		},	
-		insertRow: function(type)
-		{
-			var new_tr = $($current_tr).clone();
-			new_tr.find('td').html('&nbsp;');
-			if (type == 'after') $($current_tr).after(new_tr);		
-			else $($current_tr).before(new_tr);		
-		},
-		insertColumn: function(type)			    
-		{
-            var index = $($current_td).attr('cellIndex');
-            
-			$($table).find('tr').each(function(i,s)
-			{   
-			    var current = $(s).find('td').eq(index);    
-			    var td = current.clone();   
-			    td.html('&nbsp;');
-			    if (type == 'after') $(current).after(td);
-			    else $(current).before(td);			    
-			});			
-		},
-    
-        /*
-            Image
-        */  
-        imageEdit: function(e)
-        {
-            var handler = function()
-            {
-                var $el = $(e.target);
-                var src = $el.attr('src');      
-                $('#editor_image_edit_src').attr('href', src);
-                $('#editor_image_edit_delete').click(function() { this.deleteImage(e.target);  }.bind(this));
-                $('#editorSaveBtn').click(function() { this.imageSave(e.target);  }.bind(this));
-
-                $('#editor_file_alt').val($el.attr('alt'));
-                
-                var float = $el.css('float');
-                if (float == 'none') float = 0;
-                
-                $('#editor_form_image_align').val(float);
-
-            }.bind(this);       
-        
-            editorActive = this;      
-            this.modalInit(RLANG.image, this.opts.path + 'plugins/image_edit.html', 380, 290, handler);
-        },
-        imageSave: function(el)
-        {
-            $(el).attr('alt', $('#editor_file_alt').val());
-    
-            var style = '';
-            if ($('#editor_form_image_align') != 0)
-            {
-                var float = $('#editor_form_image_align').val();
-                
-                if (float == 'left') $(el).removeClass('img_right').addClass('img_left');
-                else if (float == 'right') $(el).removeClass('img_left').addClass('img_right');
-            }
-            else $(el).removeClass('img_left').removeClass('img_right');
-
-            this.modalClose();
-        },
-        deleteImage: function(el)
-        {
-            $(el).remove();
-            this.modalClose();
-        },      
-        showImage: function()
-        {
-            this.spanid = Math.floor(Math.random() * 99999);
-            if (jQuery.browser.msie)
-            {
-                this.execCommand('inserthtml', '<span id="span' + this.spanid + '"></span>');
-            }
-            
-            var handler = function()
-            {
-                var params = '';
-
-                if (this.opts.imageUploadFunction) var params = this.opts.imageUploadFunction();
-                this.uploadInit('editorInsertImageForm', { url: this.opts.image_upload + params, trigger: 'editorUploadBtn', success: function(data) {
-                    this.imageUploadCallback(data);
-                }.bind(this)  });           
-
-            }.bind(this);
-            
-        
-            editorActive = this;
-            this.modalInit(RLANG.image, this.opts.path + 'plugins/image.html', 450, 330, handler);
-        },
-        imageUploadCallback: function(data)
-        {
-            if ($('#editor_file_link').val() != '') data = $('#editor_file_link').val();
-            var alt = $('#editor_file_alt').val();
-    
-            var style = '';
-            if ($('#editor_form_image_align') != 0)
-            {
-                var float = $('#editor_form_image_align').val();
-                
-                if (float == 'left') style = 'class="img_left"';
-                else if (float == 'right') style = 'class="img_right"';
-                
-                var html = '<img alt="' + alt + '" src="' + data + '" ' + style + ' />';
-            }
-            else
-            {
-                var html = '<p><img alt="' + alt + '" src="' + data + '" /></p>'; 
-            }
-        
-            editorActive.frame.get(0).contentWindow.focus();
-            
-            if ($.browser.msie)
-            {       
-                $(editorActive.doc.getElementById('span' + editorActive.spanid)).after(html);
-                $(editorActive.doc.getElementById('span' + editorActive.spanid)).remove();
-            }   
-            else
-            {
-                editorActive.execCommand('inserthtml', html);
-            }
-    
-            this.modalClose();
-            this.docObserve();          
-    
-        },              
-        		
-		
-		/*
-			Charmap
-		*/		
-		showCharmap: function()
-		{
-			editorActive = this;
-			
-			var handler = function()
-			{
-				this.renderCharMapHTML('#editor_charmap');
-			}.bind(this);
-			
-			this.modalInit(RLANG.charmap, this.opts.path + 'plugins/char.html', 600, 420, handler);
-	
-	
-		},
-		renderCharMapHTML: function (element)
-		{
-			var _self = this;
-			for (var i=0; i<charmap.length; i++)
-			{
-				if (charmap[i][2]==true)
-				{
-
-					var click_func = charmap[i][0];
-					var a = $('<a href="javascript:void(null);" id="editor_charmap_' + i + '" title="' + charmap[i][3] + '" rel="' + charmap[i][0] + '">' + charmap[i][1] + '</a>').click(function (e) { this.insert_char(e) }.bind(this));
-					$(element).append(a);
-	
-	
-				}
-			 }
-	
-		},
-		insert_char: function (e)
-		{
-			var chr = $(e.target).attr('rel');
-			editorActive.execCommand('inserthtml', chr);
-			this.modalClose();
-		},
-		
-	
-		/*
-			Link
-		*/				
-		showLink: function()
-		{
-			editorActive = this;
-
-			var handler = function()
-			{
-				var sel = this.get_selection();
-				if ($.browser.msie)
-				{
-						var temp = sel.htmlText.match(/href="(.*?)"/gi);
-						if (temp != null)
-						{
-							temp = new String(temp);
-							temp = temp.replace(/href="(.*?)"/gi, '$1');
-						}
-
-  					 	var text = sel.text;
-						if (temp != null) var url = temp;
-						else  var url = '';
-						var title = '';
-				}
-				else
-				{
-					if (sel.anchorNode.parentNode.tagName == 'A')
-					{
-						var url = sel.anchorNode.parentNode.href;
-						var text = sel.anchorNode.parentNode.text;
-						var title = sel.anchorNode.parentNode.title;
-						if (sel.toString() == '') this.insert_link_node = sel.anchorNode.parentNode
-
-					}
-					else
-					{
-					 	var text = sel.toString();
-						var url = '';
-						var title = '';
-					}