-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
3,032 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
body { | ||
background: #f3f6f8; | ||
color: #2f4452; | ||
font-family: Merriweather, Georgia, "Times New Roman", Times, serif; | ||
font-size: 1.25em; | ||
line-height: 1.5; | ||
margin: 1em; | ||
} | ||
|
||
a { | ||
color: inherit; | ||
} | ||
|
||
nav { | ||
font-size: 16px; | ||
} | ||
|
||
nav:target { | ||
display: none; | ||
} | ||
|
||
nav li.is-active { | ||
font-weight: bold; | ||
} | ||
|
||
#editor { | ||
background: #fff; | ||
margin: 5em auto; | ||
outline: none; | ||
padding: 5em; | ||
width: 37.5em; | ||
} | ||
|
||
#editor iframe { | ||
max-width: 100%; | ||
border: 0; | ||
} | ||
|
||
#editor img { | ||
max-width: 100%; | ||
height: auto; | ||
} | ||
|
||
#editor figure { | ||
margin: 0; | ||
} | ||
|
||
#editor figure.aligncenter { | ||
display: block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
#editor figure.alignleft { | ||
float: left; | ||
margin: 0.5em 1em 0.5em 0; | ||
width: 50%; | ||
} | ||
|
||
#editor figure.alignright { | ||
float: right; | ||
margin: 0.5em 0 0.5em 1em; | ||
width: 50%; | ||
} | ||
|
||
#editor figcaption { | ||
font-size: 0.8em; | ||
margin-top: 0.5em; | ||
} | ||
|
||
#editor figure img { | ||
display: block; | ||
} | ||
|
||
#editor pre { | ||
overflow: auto; | ||
} | ||
|
||
#editor:after { | ||
content: "."; | ||
visibility: hidden; | ||
display: block; | ||
height: 0; | ||
clear: both; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
( function( tinymce ) { | ||
tinymce.PluginManager.add( 'clean-paste', function( editor ) { | ||
// To do: remove pasted classes but keep when internally pasted. | ||
|
||
editor.on( 'BeforePastePreProcess', function( event ) { | ||
var content = event.content; | ||
|
||
// Remove all external styles | ||
content = content.replace( /(<[^>]+) style="[^"]*"([^>]*>)/gi, '$1$2' ); | ||
|
||
// Keep internal styles | ||
content = content.replace( /(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi, function( all, before, value, after ) { | ||
return before + ' style="' + value + '"' + after; | ||
} ); | ||
|
||
event.content = content; | ||
} ); | ||
} ); | ||
} )( window.tinymce ); |
Oops, something went wrong.