mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-31 11:54:03 -05:00
Update to latest squire version.
This commit is contained in:
parent
cc38ca50dc
commit
afb113d5f9
4 changed files with 427 additions and 305 deletions
|
@ -149,19 +149,29 @@ $(document).ready(function() {
|
|||
});
|
||||
});
|
||||
|
||||
iframe.addEventListener('load', function() {
|
||||
// Make sure we're in standards mode.
|
||||
var doc = iframe.contentDocument;
|
||||
if ( doc.compatMode !== 'CSS1Compat' ) {
|
||||
doc.open();
|
||||
doc.write( '<!DOCTYPE html><title></title>' );
|
||||
doc.close();
|
||||
}
|
||||
// doc.close() can cause a re-entrant load event in some browsers,
|
||||
// such as IE9.
|
||||
if ( iframe.contentWindow.editor ) {
|
||||
return;
|
||||
}
|
||||
iframe.contentWindow.editor = new Squire(iframe.contentWindow.document);
|
||||
iframe.contentWindow.document.head.appendChild(style);
|
||||
});
|
||||
|
||||
$(container).append(div);
|
||||
$(container).append(iframe);
|
||||
|
||||
var style = document.createElement('style');
|
||||
style.innerHTML = 'blockquote { border-left: 3px green solid; padding-left: 5px; }';
|
||||
|
||||
|
||||
iframe.contentWindow.editor = new Squire(iframe.contentWindow.document);
|
||||
iframe.addEventListener('load', function() {
|
||||
iframe.contentWindow.editor = new Squire(iframe.contentWindow.document);
|
||||
});
|
||||
|
||||
iframe.contentWindow.document.head.appendChild(style);
|
||||
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
|
@ -16,7 +16,7 @@
|
|||
<script src="build/Squire-UI.js" type="text/javascript"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
UI = new SquireUI({replace: 'textarea#foo', height: 300});
|
||||
new SquireUI({replace: 'textarea#foo', height: 300});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue