Update redactor to latest

This commit is contained in:
Samuel Georges 2015-02-14 16:36:08 +11:00
parent 9927568d98
commit 8fab7df4d9
5 changed files with 4988 additions and 4754 deletions

View File

@ -1,203 +0,0 @@
html {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 10px;
font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif;
}
code,
pre {
font-family: Menlo, Monaco, monospace, sans-serif;
}
div,
p,
ul,
ol,
table,
dl,
blockquote,
pre {
font-size: 15px;
line-height: 1.5rem;
}
div {
border: 1px dashed #bbb !important;
}
a {
color: #15c;
text-decoration: underline;
}
.redactor_placeholder {
color: #999 !important;
display: block !important;
margin-bottom: 10px !important;
}
object,
embed,
video,
img {
max-width: 100%;
width: auto;
}
video,
img {
height: auto;
}
div,
p,
ul,
ol,
table,
dl,
blockquote,
pre {
margin: 0;
margin-bottom: 15px;
border: none;
background: none;
box-shadow: none;
}
iframe,
object,
hr {
margin-bottom: 15px;
}
blockquote {
margin-left: 1.5em !important;
padding-left: 0;
color: #777;
font-style: italic;
}
ul,
ol {
padding-left: 2em;
}
ul ul,
ol ol,
ul ol,
ol ul {
margin: 2px;
padding: 0;
padding-left: 2em;
border: none;
}
dl dt { font-weight: bold; }
dd { margin-left: 1em;}
table {
border-collapse: collapse;
font-size: 1em;
}
table td {
padding: 5px;
border: 1px solid #ddd;
vertical-align: top;
}
table thead td {
border-bottom: 2px solid #000;
font-weight: bold;
}
code {
background-color: #d8d7d7;
}
pre {
overflow: auto;
padding: 1em;
border: 1px solid #ddd;
border-radius: 3px;
background: #f8f8f8;
white-space: pre;
font-size: 90%;
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
}
h1,
h2,
h3,
h4,
h5 {
margin: 0;
padding: 0;
background: none;
color: #000;
font-weight: bold;
}
h1 {
margin-bottom: 10px;
font-size: 36px;
line-height: 40px;
}
h2 {
margin-bottom: 15px;
font-size: 30px;
line-height: 38px;
}
h3 {
margin-bottom: 10px;
font-size: 24px;
line-height: 30px;
}
h4 {
margin-bottom: 10px;
font-size: 18px;
line-height: 24px;
}
h5 {
margin-bottom: 10px;
font-size: 1em;
}
body.redactor_editor_wym {
background: #f4f4f4;
}
.redactor_editor_wym div,
.redactor_editor_wym p,
.redactor_editor_wym ul,
.redactor_editor_wym ol,
.redactor_editor_wym table,
.redactor_editor_wym dl,
.redactor_editor_wym pre,
.redactor_editor_wym h1,
.redactor_editor_wym h2,
.redactor_editor_wym h3,
.redactor_editor_wym h4,
.redactor_editor_wym h5,
.redactor_editor_wym blockquote {
margin: 0 0 10px 0;
padding: 7px 10px;
border: 1px solid #e4e4e4;
background-color: #fff;
}
.redactor_editor_wym div {
border: 1px dashed #bbb !important;
}
.redactor_editor_wym pre {
border: 2px dashed #e4e4e4 !important;
background-color: #fafafa !important;
}
.redactor_editor_wym code {
background-color: #f4f4f4 !important;
}
.redactor_editor_wym ul,
.redactor_editor_wym ol {
padding-left: 2em !important;
}
.redactor_editor_wym ul li ul,
.redactor_editor_wym ul li ol,
.redactor_editor_wym ol li ol,
.redactor_editor_wym ol li ul {
border: none !important;
}

View File

@ -17,21 +17,14 @@
.redactor-box {
position: relative;
overflow: visible;
background: #fff;
margin-bottom: 24px;
}
.redactor-box iframe,
.redactor-box textarea {
display: block;
position: relative;
margin: 0;
padding: 0;
width: 100%;
}
.redactor-box iframe {
border: 1px solid #eee;
}
.redactor-box textarea {
overflow: auto;
outline: none;
border: none;
@ -49,21 +42,25 @@
Z-index setup
*/
.redactor-editor,
.redactor-box {
background: #fff;
}
.redactor-editor,
.redactor-box,
.redactor-box textarea {
z-index: auto !important;
}
.redactor-box-fullscreen {
z-index: 99 !important;
z-index: 1052 !important;
}
.redactor-toolbar,
.redactor-dropdown {
z-index: 1050 !important;
z-index: 1053 !important;
}
#redactor-modal-overlay,
#redactor-modal-box,
#redactor-modal {
z-index: 1051 !important;
z-index: 1054 !important;
}
/*
Resize
@ -90,6 +87,12 @@ body .redactor-box-fullscreen {
left: 0;
width: 100%;
}
/*
Utils
*/
.body-redactor-hidden {
overflow: hidden;
}
/*
Editor
*/
@ -124,8 +127,8 @@ body .redactor-box-fullscreen {
}
/* Placeholder in linebreaks mode */
.redactor-linebreaks.redactor-placeholder:after {
top: 10px;
left: 10px;
top: 20px;
left: 20px;
}
/*
Toolbar
@ -339,7 +342,7 @@ body .redactor-box-fullscreen {
*/
.redactor-toolbar-tooltip {
position: absolute;
z-index: 100;
z-index: 1054;
text-align: center;
top: 0;
left: 0;
@ -383,6 +386,42 @@ body .redactor-box-fullscreen {
color: #fff !important;
text-decoration: none;
}
/*
IMAGE BOX
*/
#redactor-image-box {
position: relative;
max-width: 100%;
display: inline-block;
line-height: 0;
outline: 1px dashed rgba(0, 0, 0, 0.6);
}
#redactor-image-editter {
position: absolute;
z-index: 5;
top: 50%;
left: 50%;
margin-top: -11px;
margin-left: -18px;
line-height: 1;
background-color: #000;
color: #fff;
font-size: 11px;
padding: 7px 10px;
cursor: pointer;
}
#redactor-image-resizer {
position: absolute;
z-index: 2;
line-height: 1;
cursor: nw-resize;
bottom: -4px;
right: -5px;
border: 1px solid #fff;
background-color: #000;
width: 8px;
height: 8px;
}
/*
LINK TOOLTIP
*/
@ -782,9 +821,6 @@ body .redactor-box-fullscreen {
.redactor-editor hr {
margin-bottom: 15px;
}
.redactor-editor iframe {
width: auto;
}
.redactor-editor blockquote {
margin-left: 1.6em !important;
padding-left: 0;
@ -851,7 +887,7 @@ body .redactor-box-fullscreen {
.redactor-editor h5,
.redactor-editor h6 {
font-weight: bold;
color: #0000;
color: #000;
padding: 0;
background: none;
text-rendering: optimizeLegibility;

File diff suppressed because it is too large Load Diff

View File

@ -5,28 +5,28 @@
clear: both;
}
}
.transition(@transition: all linear .2s) {
.transition-redactor(@transition: all linear .2s) {
-moz-transition: @transition;
transition: @transition;
}
.opacity(@opacity: 100) {
.opacity-redactor(@opacity: 100) {
filter: e(%("alpha(opacity=%d)", @opacity));
-moz-opacity: @opacity / 100;
opacity: @opacity / 100;
}
.box-sizing(@box-model) {
.box-sizing-redactor(@box-model) {
-webkit-box-sizing: @box-model;
-moz-box-sizing: @box-model;
box-sizing: @box-model;
}
.striped(@color: rgba(255, 255, 255, .2); @angle: 45deg) {
.striped-redactor(@color: rgba(255, 255, 255, .2); @angle: 45deg) {
background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
}
.animation(@animation) {
.animation-redactor(@animation) {
-webkit-animation: @animation;
-o-animation: @animation;
animation: @animation;
@ -61,21 +61,14 @@
.redactor-box {
position: relative;
overflow: visible;
background: #fff;
margin-bottom: 24px;
& iframe,
& textarea {
display: block;
position: relative;
margin: 0;
padding: 0;
width: 100%;
}
& iframe {
border: 1px solid #eee;
}
& textarea {
overflow: auto;
outline: none;
border: none;
@ -95,22 +88,27 @@
Z-index setup
*/
.redactor-editor,
.redactor-box {
background: #fff;
}
.redactor-editor,
.redactor-box,
.redactor-box textarea {
z-index: auto !important;
}
.redactor-box-fullscreen {
z-index: 99 !important;
z-index: 1052 !important;
}
.redactor-toolbar,
.redactor-dropdown {
z-index: 1050 !important;
z-index: 1053 !important;
}
#redactor-modal-overlay,
#redactor-modal-box,
#redactor-modal {
z-index: 1051 !important;
z-index: 1054 !important;
}
@ -141,7 +139,12 @@ body .redactor-box-fullscreen {
width: 100%;
}
/*
Utils
*/
.body-redactor-hidden {
overflow: hidden;
}
/*
Editor
@ -178,8 +181,8 @@ body .redactor-box-fullscreen {
}
/* Placeholder in linebreaks mode */
.redactor-linebreaks.redactor-placeholder:after {
top: 10px;
left: 10px;
top: 20px;
left: 20px;
}
@ -219,7 +222,7 @@ body .redactor-box-fullscreen {
padding: 0 !important;
outline: none;
list-style: none !important;
.box-sizing(content-box);
.box-sizing-redactor(content-box);
}
& li a {
display: block;
@ -232,7 +235,7 @@ body .redactor-box-fullscreen {
text-decoration: none;
cursor: pointer;
zoom: 1;
.box-sizing(content-box);
.box-sizing-redactor(content-box);
}
& li a {
&:hover {
@ -262,7 +265,7 @@ body .redactor-box-fullscreen {
line-height: 1;
}
& li a.redactor-button-disabled {
.opacity(30);
.opacity-redactor(30);
&:hover {
color: #333;
outline: none;
@ -396,7 +399,7 @@ body .redactor-box-fullscreen {
*/
.redactor-toolbar-tooltip {
position: absolute;
z-index: 100;
z-index: 1054;
text-align: center;
top: 0;
left: 0;
@ -443,6 +446,43 @@ body .redactor-box-fullscreen {
}
}
/*
IMAGE BOX
*/
#redactor-image-box {
position: relative;
max-width: 100%;
display: inline-block;
line-height: 0;
outline: 1px dashed rgba(0, 0, 0, .6),
}
#redactor-image-editter {
position: absolute;
z-index: 5;
top: 50%;
left: 50%;
margin-top: -11px;
margin-left: -18px;
line-height: 1;
background-color: #000;
color: #fff;
font-size: 11px;
padding: 7px 10px;
cursor: pointer;
}
#redactor-image-resizer {
position: absolute;
z-index: 2;
line-height: 1;
cursor: nw-resize;
bottom: -4px;
right: -5px;
border: 1px solid #fff;
background-color: #000;
width: 8px;
height: 8px;
}
/*
@ -509,8 +549,8 @@ body .redactor-box-fullscreen {
width: 100%;
height: 100%;
background-color: #3d58a8;
.striped();
.animation(progress-bar-stripes 2s linear infinite);
.striped-redactor();
.animation-redactor(progress-bar-stripes 2s linear infinite);
background-size: 40px 40px;
}
@ -540,7 +580,7 @@ body .redactor-box-fullscreen {
width: 100%;
height: 100%;
background-color: #000 !important;
.opacity(30);
.opacity-redactor(30);
}
#redactor-modal-box {
position: fixed;
@ -602,7 +642,7 @@ body .redactor-box-fullscreen {
width: 100%;
font-size: 14px;
font-family: @redactorFontFamily;
.transition(border 0.3s ease-in);
.transition-redactor(border 0.3s ease-in);
&:focus {
outline: none;
border-color: #5ca9e4;
@ -843,9 +883,6 @@ body .redactor-box-fullscreen {
hr {
margin-bottom: 15px;
}
iframe {
width: auto;
}
blockquote {
margin-left: 1.6em !important;
padding-left: 0;
@ -912,7 +949,7 @@ body .redactor-box-fullscreen {
h5,
h6 {
font-weight: bold;
color: #0000;
color: #000;
padding: 0;
background: none;
text-rendering: optimizeLegibility;

File diff suppressed because one or more lines are too long