From 6a348e084b8dfb3d0542d1425b9e67b584bf4e81 Mon Sep 17 00:00:00 2001
From: Neil Jenkins
Date: Tue, 22 Mar 2016 17:57:00 +1100
Subject: [PATCH] Make Squire work without an iframe(!)
---
Demo.html | 124 ++++-----
build/squire-raw.js | 590 +++++++++++++++++++++---------------------
build/squire.js | 4 +-
source/Clean.js | 14 +-
source/Clipboard.js | 19 +-
source/Constants.js | 1 +
source/Editor.js | 256 +++++++++---------
source/KeyHandlers.js | 72 +++---
source/Node.js | 145 ++++++-----
source/Range.js | 83 +++---
10 files changed, 643 insertions(+), 665 deletions(-)
diff --git a/Demo.html b/Demo.html
index ec99ad9..7287705 100644
--- a/Demo.html
+++ b/Demo.html
@@ -23,10 +23,41 @@
p {
margin: 5px 0;
}
- iframe {
+ #editor {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ min-height: 200px;
border: 1px solid #888;
- width: 100%;
- height: 500px;
+ padding: 1em;
+ background: transparent;
+ color: #2b2b2b;
+ font: 13px/1.35 Helvetica, arial, sans-serif;
+ cursor: text;
+ }
+ a {
+ text-decoration: underline;
+ }
+ 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;
}
@@ -69,84 +100,19 @@
Redo
-
+