mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
parent
afb113d5f9
commit
9e1c703ad3
3 changed files with 533 additions and 421 deletions
|
@ -163,15 +163,54 @@ $(document).ready(function() {
|
|||
return;
|
||||
}
|
||||
iframe.contentWindow.editor = new Squire(iframe.contentWindow.document);
|
||||
iframe.contentWindow.document.head.appendChild(style);
|
||||
iframe.contentWindow.editor.addStyles(
|
||||
'html {' +
|
||||
' height: 100%;' +
|
||||
'}' +
|
||||
'body {' +
|
||||
' -moz-box-sizing: border-box;' +
|
||||
' -webkit-box-sizing: border-box;' +
|
||||
' box-sizing: border-box;' +
|
||||
' height: 100%;' +
|
||||
' padding: 1em;' +
|
||||
' background: transparent;' +
|
||||
' color: #2b2b2b;' +
|
||||
' font: 13px/1.35 Helvetica, arial, sans-serif;' +
|
||||
' cursor: text;' +
|
||||
'}' +
|
||||
'a {' +
|
||||
' text-decoration: underline;' +
|
||||
'}' +
|
||||
'h1 {' +
|
||||
' font-size: 138.5%;' +
|
||||
'}' +
|
||||
'h2 {' +
|
||||
' font-size: 123.1%;' +
|
||||
'}' +
|
||||
'h3 {' +
|
||||
' font-size: 108%;' +
|
||||
'}' +
|
||||
'h1,h2,h3,p {' +
|
||||
' margin: 1em 0;' +
|
||||
'}' +
|
||||
'h4,h5,h6 {' +
|
||||
' margin: 0;' +
|
||||
'}' +
|
||||
'ul, ol {' +
|
||||
' margin: 0 1em;' +
|
||||
' padding: 0 1em;' +
|
||||
'}' +
|
||||
'blockquote {' +
|
||||
' border-left: 2px solid blue;' +
|
||||
' margin: 0;' +
|
||||
' padding: 0 10px;' +
|
||||
'}'
|
||||
);
|
||||
});
|
||||
|
||||
$(container).append(div);
|
||||
$(container).append(iframe);
|
||||
|
||||
var style = document.createElement('style');
|
||||
style.innerHTML = 'blockquote { border-left: 3px green solid; padding-left: 5px; }';
|
||||
|
||||
return iframe.contentWindow.editor;
|
||||
};
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue