corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [04/92] [abbrv] [partial] incubator-corinthia git commit: Add editing code from UX Write
Date Wed, 17 Dec 2014 13:28:14 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents17-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents17-input.html b/Editor/tests/selection/deleteContents17-input.html
new file mode 100644
index 0000000..d5e97cd
--- /dev/null
+++ b/Editor/tests/selection/deleteContents17-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p style="color: blue">First [one</p>
+<p style="color: red">Second ]two</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents18-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents18-expected.html b/Editor/tests/selection/deleteContents18-expected.html
new file mode 100644
index 0000000..2f0ef70
--- /dev/null
+++ b/Editor/tests/selection/deleteContents18-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>First []two</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents18-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents18-input.html b/Editor/tests/selection/deleteContents18-input.html
new file mode 100644
index 0000000..681d804
--- /dev/null
+++ b/Editor/tests/selection/deleteContents18-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>First [one</p>
+<p>Second ]two</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents18a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents18a-expected.html b/Editor/tests/selection/deleteContents18a-expected.html
new file mode 100644
index 0000000..2f0ef70
--- /dev/null
+++ b/Editor/tests/selection/deleteContents18a-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>First []two</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents18a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents18a-input.html b/Editor/tests/selection/deleteContents18a-input.html
new file mode 100644
index 0000000..1a8ed3e
--- /dev/null
+++ b/Editor/tests/selection/deleteContents18a-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+First [one
+<p>Second ]two</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents18b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents18b-expected.html b/Editor/tests/selection/deleteContents18b-expected.html
new file mode 100644
index 0000000..2f0ef70
--- /dev/null
+++ b/Editor/tests/selection/deleteContents18b-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>First []two</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents18b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents18b-input.html b/Editor/tests/selection/deleteContents18b-input.html
new file mode 100644
index 0000000..f118f7f
--- /dev/null
+++ b/Editor/tests/selection/deleteContents18b-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>First [one</p>
+Second ]two
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents19-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents19-expected.html b/Editor/tests/selection/deleteContents19-expected.html
new file mode 100644
index 0000000..ea56e63
--- /dev/null
+++ b/Editor/tests/selection/deleteContents19-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p><b>First []two</b></p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents19-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents19-input.html b/Editor/tests/selection/deleteContents19-input.html
new file mode 100644
index 0000000..459a9ca
--- /dev/null
+++ b/Editor/tests/selection/deleteContents19-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p><b>First [one</b></p>
+<p><b>Second ]two</b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents19a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents19a-expected.html b/Editor/tests/selection/deleteContents19a-expected.html
new file mode 100644
index 0000000..ea56e63
--- /dev/null
+++ b/Editor/tests/selection/deleteContents19a-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p><b>First []two</b></p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents19a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents19a-input.html b/Editor/tests/selection/deleteContents19a-input.html
new file mode 100644
index 0000000..b25f656
--- /dev/null
+++ b/Editor/tests/selection/deleteContents19a-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<b>First [one</b>
+<p><b>Second ]two</b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents19b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents19b-expected.html b/Editor/tests/selection/deleteContents19b-expected.html
new file mode 100644
index 0000000..ea56e63
--- /dev/null
+++ b/Editor/tests/selection/deleteContents19b-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p><b>First []two</b></p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents19b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents19b-input.html b/Editor/tests/selection/deleteContents19b-input.html
new file mode 100644
index 0000000..606cf73
--- /dev/null
+++ b/Editor/tests/selection/deleteContents19b-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p><b>First [one</b></p>
+<b>Second ]two</b>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents20-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents20-expected.html b/Editor/tests/selection/deleteContents20-expected.html
new file mode 100644
index 0000000..f539041
--- /dev/null
+++ b/Editor/tests/selection/deleteContents20-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><div><p>First []two</p></div></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents20-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents20-input.html b/Editor/tests/selection/deleteContents20-input.html
new file mode 100644
index 0000000..1b21c70
--- /dev/null
+++ b/Editor/tests/selection/deleteContents20-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<div><p>First [one</p></div>
+<div><p>Second ]two</p></div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents20a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents20a-expected.html b/Editor/tests/selection/deleteContents20a-expected.html
new file mode 100644
index 0000000..f539041
--- /dev/null
+++ b/Editor/tests/selection/deleteContents20a-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><div><p>First []two</p></div></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents20a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents20a-input.html b/Editor/tests/selection/deleteContents20a-input.html
new file mode 100644
index 0000000..18cea84
--- /dev/null
+++ b/Editor/tests/selection/deleteContents20a-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+First [one
+<div><p>Second ]two</p></div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents20b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents20b-expected.html b/Editor/tests/selection/deleteContents20b-expected.html
new file mode 100644
index 0000000..f539041
--- /dev/null
+++ b/Editor/tests/selection/deleteContents20b-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><div><p>First []two</p></div></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents20b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents20b-input.html b/Editor/tests/selection/deleteContents20b-input.html
new file mode 100644
index 0000000..14a5f4b
--- /dev/null
+++ b/Editor/tests/selection/deleteContents20b-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<div><p>First [one</p></div>
+Second ]two
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents21-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents21-expected.html b/Editor/tests/selection/deleteContents21-expected.html
new file mode 100644
index 0000000..a87d29f
--- /dev/null
+++ b/Editor/tests/selection/deleteContents21-expected.html
@@ -0,0 +1,11 @@
+<html>
+  <head></head>
+  <body>
+    <div>
+      <p>
+        <b><i>First</i></b>
+        two
+      </p>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents21-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents21-input.html b/Editor/tests/selection/deleteContents21-input.html
new file mode 100644
index 0000000..6592c3f
--- /dev/null
+++ b/Editor/tests/selection/deleteContents21-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+}
+</script>
+</head>
+<body>
+<div><p><b><i>First [one</i></b></p></div>
+<div><p>Second ]two</p></div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents21a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents21a-expected.html b/Editor/tests/selection/deleteContents21a-expected.html
new file mode 100644
index 0000000..a87d29f
--- /dev/null
+++ b/Editor/tests/selection/deleteContents21a-expected.html
@@ -0,0 +1,11 @@
+<html>
+  <head></head>
+  <body>
+    <div>
+      <p>
+        <b><i>First</i></b>
+        two
+      </p>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents21a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents21a-input.html b/Editor/tests/selection/deleteContents21a-input.html
new file mode 100644
index 0000000..3ac270c
--- /dev/null
+++ b/Editor/tests/selection/deleteContents21a-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+}
+</script>
+</head>
+<body>
+<b><i>First [one</i></b>
+<div><p>Second ]two</p></div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents21b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents21b-expected.html b/Editor/tests/selection/deleteContents21b-expected.html
new file mode 100644
index 0000000..a87d29f
--- /dev/null
+++ b/Editor/tests/selection/deleteContents21b-expected.html
@@ -0,0 +1,11 @@
+<html>
+  <head></head>
+  <body>
+    <div>
+      <p>
+        <b><i>First</i></b>
+        two
+      </p>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents21b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents21b-input.html b/Editor/tests/selection/deleteContents21b-input.html
new file mode 100644
index 0000000..94aa41f
--- /dev/null
+++ b/Editor/tests/selection/deleteContents21b-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+}
+</script>
+</head>
+<body>
+<div><p><b><i>First [one</i></b></p></div>
+Second ]two
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents22-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents22-expected.html b/Editor/tests/selection/deleteContents22-expected.html
new file mode 100644
index 0000000..533a41e
--- /dev/null
+++ b/Editor/tests/selection/deleteContents22-expected.html
@@ -0,0 +1,15 @@
+<html>
+  <head></head>
+  <body>
+    <div>
+      <p>
+        <b>
+          <i>
+            <u><tt>First</tt></u>
+            two
+          </i>
+        </b>
+      </p>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents22-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents22-input.html b/Editor/tests/selection/deleteContents22-input.html
new file mode 100644
index 0000000..d75c81b
--- /dev/null
+++ b/Editor/tests/selection/deleteContents22-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+}
+</script>
+</head>
+<body>
+<div><p><b><i><u><tt>First [one</tt></u></i></b></p></div>
+<div><p><b><i>Second ]two</i></b></p></div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents22a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents22a-expected.html b/Editor/tests/selection/deleteContents22a-expected.html
new file mode 100644
index 0000000..533a41e
--- /dev/null
+++ b/Editor/tests/selection/deleteContents22a-expected.html
@@ -0,0 +1,15 @@
+<html>
+  <head></head>
+  <body>
+    <div>
+      <p>
+        <b>
+          <i>
+            <u><tt>First</tt></u>
+            two
+          </i>
+        </b>
+      </p>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents22a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents22a-input.html b/Editor/tests/selection/deleteContents22a-input.html
new file mode 100644
index 0000000..108d53d
--- /dev/null
+++ b/Editor/tests/selection/deleteContents22a-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+}
+</script>
+</head>
+<body>
+<b><i><u><tt>First [one</tt></u></i></b>
+<div><p><b><i>Second ]two</i></b></p></div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents22b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents22b-expected.html b/Editor/tests/selection/deleteContents22b-expected.html
new file mode 100644
index 0000000..533a41e
--- /dev/null
+++ b/Editor/tests/selection/deleteContents22b-expected.html
@@ -0,0 +1,15 @@
+<html>
+  <head></head>
+  <body>
+    <div>
+      <p>
+        <b>
+          <i>
+            <u><tt>First</tt></u>
+            two
+          </i>
+        </b>
+      </p>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents22b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents22b-input.html b/Editor/tests/selection/deleteContents22b-input.html
new file mode 100644
index 0000000..929f9f6
--- /dev/null
+++ b/Editor/tests/selection/deleteContents22b-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+}
+</script>
+</head>
+<body>
+<div><p><b><i><u><tt>First [one</tt></u></i></b></p></div>
+<b><i>Second ]two</i></b>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-figure01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-figure01-expected.html b/Editor/tests/selection/highlights-figure01-expected.html
new file mode 100644
index 0000000..a7cff4f
--- /dev/null
+++ b/Editor/tests/selection/highlights-figure01-expected.html
@@ -0,0 +1,27 @@
+<html>
+  <head>
+    <style>
+figure {
+    margin-left: auto;
+    margin-right: auto;
+    text-align: center;
+}
+    </style>
+  </head>
+  <body>
+    <p>
+      Text
+      <span class="uxwrite-selection">before</span>
+    </p>
+    <div class="uxwrite-selection">
+      <figure>
+        <img src="../figures/nothing.png"/>
+        <figcaption>Test figure</figcaption>
+      </figure>
+    </div>
+    <p>
+      <span class="uxwrite-selection">Text</span>
+      after
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-figure01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-figure01-input.html b/Editor/tests/selection/highlights-figure01-input.html
new file mode 100644
index 0000000..fc6945c
--- /dev/null
+++ b/Editor/tests/selection/highlights-figure01-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+figure {
+    margin-left: auto;
+    margin-right: auto;
+    text-align: center;
+}
+    </style>
+<script>
+function performTest()
+{
+   outputOptions.keepSelectionHighlights = true;
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<figure>
+  <img src="../figures/nothing.png">
+  <figcaption>Test figure</figcaption>
+</figure>
+<p>Text] after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-figure02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-figure02-expected.html b/Editor/tests/selection/highlights-figure02-expected.html
new file mode 100644
index 0000000..fbecf51
--- /dev/null
+++ b/Editor/tests/selection/highlights-figure02-expected.html
@@ -0,0 +1,22 @@
+<html>
+  <head>
+    <style>
+figure {
+    margin-left: auto;
+    margin-right: auto;
+    text-align: center;
+}
+    </style>
+  </head>
+  <body>
+    <p>
+      <span class="uxwrite-selection">T</span>
+      ext before
+    </p>
+    <figure>
+      <img src="../figures/nothing.png"/>
+      <figcaption>Test figure</figcaption>
+    </figure>
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-figure02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-figure02-input.html b/Editor/tests/selection/highlights-figure02-input.html
new file mode 100644
index 0000000..4a4f6c9
--- /dev/null
+++ b/Editor/tests/selection/highlights-figure02-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+figure {
+    margin-left: auto;
+    margin-right: auto;
+    text-align: center;
+}
+    </style>
+<script>
+function performTest()
+{
+    outputOptions.keepSelectionHighlights = true;
+
+    var p = document.getElementsByTagName("P")[0];
+    var text = p.firstChild;
+    Selection_set(text,0,text,1);
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<figure>
+  <img src="../figures/nothing.png">
+  <figcaption>Test figure</figcaption>
+</figure>
+<p>Text] after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-table01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-table01-expected.html b/Editor/tests/selection/highlights-table01-expected.html
new file mode 100644
index 0000000..c6df315
--- /dev/null
+++ b/Editor/tests/selection/highlights-table01-expected.html
@@ -0,0 +1,48 @@
+<html>
+  <head>
+    <style>
+caption {
+    caption-side: bottom;
+}
+table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+}
+td > :first-child, th > :first-child {
+    margin-top: 0;
+}
+td > :last-child, th > :last-child {
+    margin-bottom: 0;
+}
+td, th {
+    border: 1px solid black;
+}
+    </style>
+  </head>
+  <body>
+    <p>
+      Text
+      <span class="uxwrite-selection">before</span>
+    </p>
+    <div class="uxwrite-selection">
+      <table width="100%">
+        <caption>Test caption</caption>
+        <tbody>
+          <tr>
+            <td>One</td>
+            <td>Two</td>
+          </tr>
+          <tr>
+            <td>Three</td>
+            <td>Four</td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p>
+      <span class="uxwrite-selection">Text</span>
+      after
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-table01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-table01-input.html b/Editor/tests/selection/highlights-table01-input.html
new file mode 100644
index 0000000..361dffd
--- /dev/null
+++ b/Editor/tests/selection/highlights-table01-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+caption {
+    caption-side: bottom;
+}
+table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+}
+td > :first-child, th > :first-child {
+    margin-top: 0;
+}
+td > :last-child, th > :last-child {
+    margin-bottom: 0;
+}
+td, th {
+    border: 1px solid black;
+}
+</style>
+<script>
+function performTest()
+{
+    outputOptions.keepSelectionHighlights = true;
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<table width="100%">
+  <caption>Test caption</caption>
+  <tr>
+    <td>One</td>
+    <td>Two</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Text] after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-table02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-table02-expected.html b/Editor/tests/selection/highlights-table02-expected.html
new file mode 100644
index 0000000..5d17f3b
--- /dev/null
+++ b/Editor/tests/selection/highlights-table02-expected.html
@@ -0,0 +1,43 @@
+<html>
+  <head>
+    <style>
+caption {
+    caption-side: bottom;
+}
+table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+}
+td > :first-child, th > :first-child {
+    margin-top: 0;
+}
+td > :last-child, th > :last-child {
+    margin-bottom: 0;
+}
+td, th {
+    border: 1px solid black;
+}
+    </style>
+  </head>
+  <body>
+    <p>
+      <span class="uxwrite-selection">T</span>
+      ext before
+    </p>
+    <table width="100%">
+      <caption>Test caption</caption>
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>Two</td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-table02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-table02-input.html b/Editor/tests/selection/highlights-table02-input.html
new file mode 100644
index 0000000..6cd3545
--- /dev/null
+++ b/Editor/tests/selection/highlights-table02-input.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+caption {
+    caption-side: bottom;
+}
+table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+}
+td > :first-child, th > :first-child {
+    margin-top: 0;
+}
+td > :last-child, th > :last-child {
+    margin-bottom: 0;
+}
+td, th {
+    border: 1px solid black;
+}
+</style>
+<script>
+function performTest()
+{
+    outputOptions.keepSelectionHighlights = true;
+
+    var p = document.getElementsByTagName("P")[0];
+    var text = p.firstChild;
+    Selection_set(text,0,text,1);
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<table width="100%">
+  <caption>Test caption</caption>
+  <tr>
+    <td>One</td>
+    <td>Two</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Text] after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-table03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-table03-expected.html b/Editor/tests/selection/highlights-table03-expected.html
new file mode 100644
index 0000000..9d7bb32
--- /dev/null
+++ b/Editor/tests/selection/highlights-table03-expected.html
@@ -0,0 +1,43 @@
+<html>
+  <head>
+    <style>
+caption {
+    caption-side: bottom;
+}
+table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+}
+td > :first-child, th > :first-child {
+    margin-top: 0;
+}
+td > :last-child, th > :last-child {
+    margin-bottom: 0;
+}
+td, th {
+    border: 1px solid black;
+}
+    </style>
+  </head>
+  <body>
+    <p>Text before</p>
+    <table width="100%">
+      <caption>Test caption</caption>
+      <tbody>
+        <tr>
+          <td>
+            <span class="uxwrite-selection">O</span>
+            ne
+          </td>
+          <td>Two</td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-table03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-table03-input.html b/Editor/tests/selection/highlights-table03-input.html
new file mode 100644
index 0000000..80774ce
--- /dev/null
+++ b/Editor/tests/selection/highlights-table03-input.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+caption {
+    caption-side: bottom;
+}
+table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+}
+td > :first-child, th > :first-child {
+    margin-top: 0;
+}
+td > :last-child, th > :last-child {
+    margin-bottom: 0;
+}
+td, th {
+    border: 1px solid black;
+}
+</style>
+<script>
+function performTest()
+{
+    outputOptions.keepSelectionHighlights = true;
+
+    var tds = document.getElementsByTagName("TD");
+    var text = tds[0].firstChild;
+    Selection_set(text,0,text,1);
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<table width="100%">
+  <caption>Test caption</caption>
+  <tr>
+    <td>One</td>
+    <td>Two</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Text] after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-toc01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-toc01-expected.html b/Editor/tests/selection/highlights-toc01-expected.html
new file mode 100644
index 0000000..3fff834
--- /dev/null
+++ b/Editor/tests/selection/highlights-toc01-expected.html
@@ -0,0 +1,25 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      Text
+      <span class="uxwrite-selection">before</span>
+    </p>
+    <div class="uxwrite-selection">
+      <nav class="tableofcontents">
+        <p class="toc1"><a href="#item1">First section</a></p>
+        <p class="toc1"><a href="#item2">Second section</a></p>
+        <p class="toc1"><a href="#item3">Third section</a></p>
+      </nav>
+    </div>
+    <p>
+      <span class="uxwrite-selection">Text</span>
+      after
+    </p>
+    <h1 id="item1">First section</h1>
+    <h1 id="item2">Second section</h1>
+    <h1 id="item3">Third section</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-toc01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-toc01-input.html b/Editor/tests/selection/highlights-toc01-input.html
new file mode 100644
index 0000000..7be5644
--- /dev/null
+++ b/Editor/tests/selection/highlights-toc01-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+
+    outputOptions.keepSelectionHighlights = true;
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<nav class="tableofcontents">
+</nav>
+<p>Text] after</p>
+<h1>First section</h1>
+<h1>Second section</h1>
+<h1>Third section</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-toc02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-toc02-expected.html b/Editor/tests/selection/highlights-toc02-expected.html
new file mode 100644
index 0000000..2646343
--- /dev/null
+++ b/Editor/tests/selection/highlights-toc02-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <span class="uxwrite-selection">T</span>
+      ext before
+    </p>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">First section</a></p>
+      <p class="toc1"><a href="#item2">Second section</a></p>
+      <p class="toc1"><a href="#item3">Third section</a></p>
+    </nav>
+    <p>Text after</p>
+    <h1 id="item1">First section</h1>
+    <h1 id="item2">Second section</h1>
+    <h1 id="item3">Third section</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights-toc02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights-toc02-input.html b/Editor/tests/selection/highlights-toc02-input.html
new file mode 100644
index 0000000..83ba229
--- /dev/null
+++ b/Editor/tests/selection/highlights-toc02-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+
+    outputOptions.keepSelectionHighlights = true;
+
+    var p = document.getElementsByTagName("P")[0];
+    var text = p.firstChild;
+    Selection_set(text,0,text,1);
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<nav class="tableofcontents">
+</nav>
+<p>Text] after</p>
+<h1>First section</h1>
+<h1>Second section</h1>
+<h1>Third section</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights01-expected.html b/Editor/tests/selection/highlights01-expected.html
new file mode 100644
index 0000000..3e71667
--- /dev/null
+++ b/Editor/tests/selection/highlights01-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>First paragraph</p>
+    <p><span class="uxwrite-selection">Second paragraph</span></p>
+    <p>Third paragraph</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights01-input.html b/Editor/tests/selection/highlights01-input.html
new file mode 100644
index 0000000..01142b9
--- /dev/null
+++ b/Editor/tests/selection/highlights01-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_selectParagraph();
+    outputOptions.keepSelectionHighlights = true;
+}
+</script>
+</head>
+<body>
+<p>First paragraph</p>
+<p>Second []paragraph</p>
+<p>Third paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights02-expected.html b/Editor/tests/selection/highlights02-expected.html
new file mode 100644
index 0000000..7858d05
--- /dev/null
+++ b/Editor/tests/selection/highlights02-expected.html
@@ -0,0 +1,14 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      First
+      <span class="uxwrite-selection">paragraph</span>
+    </p>
+    <p><span class="uxwrite-selection">Second paragraph</span></p>
+    <p>
+      <span class="uxwrite-selection">Third</span>
+      paragraph
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights02-input.html b/Editor/tests/selection/highlights02-input.html
new file mode 100644
index 0000000..c1c916a
--- /dev/null
+++ b/Editor/tests/selection/highlights02-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    outputOptions.keepSelectionHighlights = true;
+}
+</script>
+</head>
+<body>
+<p>First[ paragraph</p>
+<p>Second paragraph</p>
+<p>Third ]paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights03-expected.html b/Editor/tests/selection/highlights03-expected.html
new file mode 100644
index 0000000..e594049
--- /dev/null
+++ b/Editor/tests/selection/highlights03-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p><span class="uxwrite-selection">First paragraph</span></p>
+    <p><span class="uxwrite-selection">Second paragraph</span></p>
+    <p><span class="uxwrite-selection">Third paragraph</span></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights03-input.html b/Editor/tests/selection/highlights03-input.html
new file mode 100644
index 0000000..49a3a13
--- /dev/null
+++ b/Editor/tests/selection/highlights03-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_selectAll();
+
+    outputOptions.keepSelectionHighlights = true;
+}
+</script>
+</head>
+<body>
+<p>First paragraph</p>
+<p>Second paragraph</p>
+<p>Third paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights04-expected.html b/Editor/tests/selection/highlights04-expected.html
new file mode 100644
index 0000000..6377969
--- /dev/null
+++ b/Editor/tests/selection/highlights04-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>First paragraph</p>
+    <p>Second paragraph</p>
+    <p>Third paragraph</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights04-input.html b/Editor/tests/selection/highlights04-input.html
new file mode 100644
index 0000000..ab3ad9e
--- /dev/null
+++ b/Editor/tests/selection/highlights04-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_selectAll();
+    PostponedActions_perform();
+    Clipboard_cut();
+    PostponedActions_perform();
+
+    UndoManager_undo();
+    PostponedActions_perform();
+
+    UndoManager_undo();
+    PostponedActions_perform();
+
+    outputOptions.keepSelectionHighlights = true;
+}
+</script>
+</head>
+<body>
+<p>First paragraph</p>
+<p>Second paragraph</p>
+<p>Third paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights05-expected.html b/Editor/tests/selection/highlights05-expected.html
new file mode 100644
index 0000000..8de2703
--- /dev/null
+++ b/Editor/tests/selection/highlights05-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>First paragraph</p>
+    <p>Second paragraph</p>
+    <p><span class="uxwrite-selection">Third paragraph</span></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/highlights05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/highlights05-input.html b/Editor/tests/selection/highlights05-input.html
new file mode 100644
index 0000000..f4a988b
--- /dev/null
+++ b/Editor/tests/selection/highlights05-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_selectAll();
+    PostponedActions_perform();
+    Clipboard_cut();
+    PostponedActions_perform();
+
+    UndoManager_undo();
+    PostponedActions_perform();
+
+    selectNode(document.getElementsByTagName("P")[2]);
+
+    outputOptions.keepSelectionHighlights = true;
+}
+</script>
+</head>
+<body>
+<p>First paragraph</p>
+<p>Second paragraph</p>
+<p>Third paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner01a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner01a-expected.html b/Editor/tests/selection/positions-inner01a-expected.html
new file mode 100644
index 0000000..934874a
--- /dev/null
+++ b/Editor/tests/selection/positions-inner01a-expected.html
@@ -0,0 +1,27 @@
+From "one [two three four] five"
+To   "one two [three] four five"
+
+"|one two three four five"   ->   "|one "             ->   "|one two "     ->   YES/YES
+"o|ne two three four five"   ->   "o|ne "             ->   "o|ne two "     ->   YES/YES
+"on|e two three four five"   ->   "on|e "             ->   "on|e two "     ->   YES/YES
+"one| two three four five"   ->   "one| "             ->   "one| two "     ->   YES/YES
+"one |two three four five"   ->   "|two three four"   ->   "one |two "     ->   YES/YES
+"one t|wo three four five"   ->   "t|wo three four"   ->   "one t|wo "     ->   YES/YES
+"one tw|o three four five"   ->   "tw|o three four"   ->   "one tw|o "     ->   YES/YES
+"one two| three four five"   ->   "two| three four"   ->   "one two| "     ->   YES/YES
+"one two |three four five"   ->   "two |three four"   ->   "|three"        ->   YES/YES
+"one two t|hree four five"   ->   "two t|hree four"   ->   "t|hree"        ->   YES/YES
+"one two th|ree four five"   ->   "two th|ree four"   ->   "th|ree"        ->   YES/YES
+"one two thr|ee four five"   ->   "two thr|ee four"   ->   "thr|ee"        ->   YES/YES
+"one two thre|e four five"   ->   "two thre|e four"   ->   "thre|e"        ->   YES/YES
+"one two three| four five"   ->   "two three| four"   ->   "three|"        ->   YES/YES
+"one two three |four five"   ->   "two three |four"   ->   " |four five"   ->   YES/YES
+"one two three f|our five"   ->   "two three f|our"   ->   " f|our five"   ->   YES/YES
+"one two three fo|ur five"   ->   "two three fo|ur"   ->   " fo|ur five"   ->   YES/YES
+"one two three fou|r five"   ->   "two three fou|r"   ->   " fou|r five"   ->   YES/YES
+"one two three four| five"   ->   "two three four|"   ->   " four| five"   ->   YES/YES
+"one two three four |five"   ->   " |five"            ->   " four |five"   ->   YES/YES
+"one two three four f|ive"   ->   " f|ive"            ->   " four f|ive"   ->   YES/YES
+"one two three four fi|ve"   ->   " fi|ve"            ->   " four fi|ve"   ->   YES/YES
+"one two three four fiv|e"   ->   " fiv|e"            ->   " four fiv|e"   ->   YES/YES
+"one two three four five|"   ->   " five|"            ->   " four five|"   ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner01a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner01a-input.html b/Editor/tests/selection/positions-inner01a-input.html
new file mode 100644
index 0000000..6f61e7f
--- /dev/null
+++ b/Editor/tests/selection/positions-inner01a-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one [two three four] five"
+    // To   "one two [three] four five"
+    return positionTest(4,18,8,13);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner01b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner01b-expected.html b/Editor/tests/selection/positions-inner01b-expected.html
new file mode 100644
index 0000000..976d11d
--- /dev/null
+++ b/Editor/tests/selection/positions-inner01b-expected.html
@@ -0,0 +1,27 @@
+From "one two [three] four five"
+To   "one [two three four] five"
+
+"|one two three four five"   ->   "|one two "     ->   "|one "             ->   YES/YES
+"o|ne two three four five"   ->   "o|ne two "     ->   "o|ne "             ->   YES/YES
+"on|e two three four five"   ->   "on|e two "     ->   "on|e "             ->   YES/YES
+"one| two three four five"   ->   "one| two "     ->   "one| "             ->   YES/YES
+"one |two three four five"   ->   "one |two "     ->   "|two three four"   ->   YES/YES
+"one t|wo three four five"   ->   "one t|wo "     ->   "t|wo three four"   ->   YES/YES
+"one tw|o three four five"   ->   "one tw|o "     ->   "tw|o three four"   ->   YES/YES
+"one two| three four five"   ->   "one two| "     ->   "two| three four"   ->   YES/YES
+"one two |three four five"   ->   "|three"        ->   "two |three four"   ->   YES/YES
+"one two t|hree four five"   ->   "t|hree"        ->   "two t|hree four"   ->   YES/YES
+"one two th|ree four five"   ->   "th|ree"        ->   "two th|ree four"   ->   YES/YES
+"one two thr|ee four five"   ->   "thr|ee"        ->   "two thr|ee four"   ->   YES/YES
+"one two thre|e four five"   ->   "thre|e"        ->   "two thre|e four"   ->   YES/YES
+"one two three| four five"   ->   "three|"        ->   "two three| four"   ->   YES/YES
+"one two three |four five"   ->   " |four five"   ->   "two three |four"   ->   YES/YES
+"one two three f|our five"   ->   " f|our five"   ->   "two three f|our"   ->   YES/YES
+"one two three fo|ur five"   ->   " fo|ur five"   ->   "two three fo|ur"   ->   YES/YES
+"one two three fou|r five"   ->   " fou|r five"   ->   "two three fou|r"   ->   YES/YES
+"one two three four| five"   ->   " four| five"   ->   "two three four|"   ->   YES/YES
+"one two three four |five"   ->   " four |five"   ->   " |five"            ->   YES/YES
+"one two three four f|ive"   ->   " four f|ive"   ->   " f|ive"            ->   YES/YES
+"one two three four fi|ve"   ->   " four fi|ve"   ->   " fi|ve"            ->   YES/YES
+"one two three four fiv|e"   ->   " four fiv|e"   ->   " fiv|e"            ->   YES/YES
+"one two three four five|"   ->   " four five|"   ->   " five|"            ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner01b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner01b-input.html b/Editor/tests/selection/positions-inner01b-input.html
new file mode 100644
index 0000000..767dfc2
--- /dev/null
+++ b/Editor/tests/selection/positions-inner01b-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one two [three] four five"
+    // To   "one [two three four] five"
+    return positionTest(8,13,4,18);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner02a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner02a-expected.html b/Editor/tests/selection/positions-inner02a-expected.html
new file mode 100644
index 0000000..80f55d9
--- /dev/null
+++ b/Editor/tests/selection/positions-inner02a-expected.html
@@ -0,0 +1,27 @@
+From "one [two three four] five"
+To   "one [two three] four five"
+
+"|one two three four five"   ->   "|one "             ->   "|one "         ->   YES/YES
+"o|ne two three four five"   ->   "o|ne "             ->   "o|ne "         ->   YES/YES
+"on|e two three four five"   ->   "on|e "             ->   "on|e "         ->   YES/YES
+"one| two three four five"   ->   "one| "             ->   "one| "         ->   YES/YES
+"one |two three four five"   ->   "|two three four"   ->   "|two three"    ->   YES/YES
+"one t|wo three four five"   ->   "t|wo three four"   ->   "t|wo three"    ->   YES/YES
+"one tw|o three four five"   ->   "tw|o three four"   ->   "tw|o three"    ->   YES/YES
+"one two| three four five"   ->   "two| three four"   ->   "two| three"    ->   YES/YES
+"one two |three four five"   ->   "two |three four"   ->   "two |three"    ->   YES/YES
+"one two t|hree four five"   ->   "two t|hree four"   ->   "two t|hree"    ->   YES/YES
+"one two th|ree four five"   ->   "two th|ree four"   ->   "two th|ree"    ->   YES/YES
+"one two thr|ee four five"   ->   "two thr|ee four"   ->   "two thr|ee"    ->   YES/YES
+"one two thre|e four five"   ->   "two thre|e four"   ->   "two thre|e"    ->   YES/YES
+"one two three| four five"   ->   "two three| four"   ->   "two three|"    ->   YES/YES
+"one two three |four five"   ->   "two three |four"   ->   " |four five"   ->   YES/YES
+"one two three f|our five"   ->   "two three f|our"   ->   " f|our five"   ->   YES/YES
+"one two three fo|ur five"   ->   "two three fo|ur"   ->   " fo|ur five"   ->   YES/YES
+"one two three fou|r five"   ->   "two three fou|r"   ->   " fou|r five"   ->   YES/YES
+"one two three four| five"   ->   "two three four|"   ->   " four| five"   ->   YES/YES
+"one two three four |five"   ->   " |five"            ->   " four |five"   ->   YES/YES
+"one two three four f|ive"   ->   " f|ive"            ->   " four f|ive"   ->   YES/YES
+"one two three four fi|ve"   ->   " fi|ve"            ->   " four fi|ve"   ->   YES/YES
+"one two three four fiv|e"   ->   " fiv|e"            ->   " four fiv|e"   ->   YES/YES
+"one two three four five|"   ->   " five|"            ->   " four five|"   ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner02a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner02a-input.html b/Editor/tests/selection/positions-inner02a-input.html
new file mode 100644
index 0000000..0059baf
--- /dev/null
+++ b/Editor/tests/selection/positions-inner02a-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one [two three four] five"
+    // To   "one [two three] four five"
+    return positionTest(4,18,4,13);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner02b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner02b-expected.html b/Editor/tests/selection/positions-inner02b-expected.html
new file mode 100644
index 0000000..bdd8487
--- /dev/null
+++ b/Editor/tests/selection/positions-inner02b-expected.html
@@ -0,0 +1,27 @@
+From "one [two three] four five"
+To   "one [two three four] five"
+
+"|one two three four five"   ->   "|one "         ->   "|one "             ->   YES/YES
+"o|ne two three four five"   ->   "o|ne "         ->   "o|ne "             ->   YES/YES
+"on|e two three four five"   ->   "on|e "         ->   "on|e "             ->   YES/YES
+"one| two three four five"   ->   "one| "         ->   "one| "             ->   YES/YES
+"one |two three four five"   ->   "|two three"    ->   "|two three four"   ->   YES/YES
+"one t|wo three four five"   ->   "t|wo three"    ->   "t|wo three four"   ->   YES/YES
+"one tw|o three four five"   ->   "tw|o three"    ->   "tw|o three four"   ->   YES/YES
+"one two| three four five"   ->   "two| three"    ->   "two| three four"   ->   YES/YES
+"one two |three four five"   ->   "two |three"    ->   "two |three four"   ->   YES/YES
+"one two t|hree four five"   ->   "two t|hree"    ->   "two t|hree four"   ->   YES/YES
+"one two th|ree four five"   ->   "two th|ree"    ->   "two th|ree four"   ->   YES/YES
+"one two thr|ee four five"   ->   "two thr|ee"    ->   "two thr|ee four"   ->   YES/YES
+"one two thre|e four five"   ->   "two thre|e"    ->   "two thre|e four"   ->   YES/YES
+"one two three| four five"   ->   "two three|"    ->   "two three| four"   ->   YES/YES
+"one two three |four five"   ->   " |four five"   ->   "two three |four"   ->   YES/YES
+"one two three f|our five"   ->   " f|our five"   ->   "two three f|our"   ->   YES/YES
+"one two three fo|ur five"   ->   " fo|ur five"   ->   "two three fo|ur"   ->   YES/YES
+"one two three fou|r five"   ->   " fou|r five"   ->   "two three fou|r"   ->   YES/YES
+"one two three four| five"   ->   " four| five"   ->   "two three four|"   ->   YES/YES
+"one two three four |five"   ->   " four |five"   ->   " |five"            ->   YES/YES
+"one two three four f|ive"   ->   " four f|ive"   ->   " f|ive"            ->   YES/YES
+"one two three four fi|ve"   ->   " four fi|ve"   ->   " fi|ve"            ->   YES/YES
+"one two three four fiv|e"   ->   " four fiv|e"   ->   " fiv|e"            ->   YES/YES
+"one two three four five|"   ->   " four five|"   ->   " five|"            ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner02b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner02b-input.html b/Editor/tests/selection/positions-inner02b-input.html
new file mode 100644
index 0000000..21fa1cd
--- /dev/null
+++ b/Editor/tests/selection/positions-inner02b-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one [two three] four five"
+    // To   "one [two three four] five"
+    return positionTest(4,13,4,18);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner03a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner03a-expected.html b/Editor/tests/selection/positions-inner03a-expected.html
new file mode 100644
index 0000000..ee4f5f0
--- /dev/null
+++ b/Editor/tests/selection/positions-inner03a-expected.html
@@ -0,0 +1,27 @@
+From "one [two three four] five"
+To   "one two [three four] five"
+
+"|one two three four five"   ->   "|one "             ->   "|one two "     ->   YES/YES
+"o|ne two three four five"   ->   "o|ne "             ->   "o|ne two "     ->   YES/YES
+"on|e two three four five"   ->   "on|e "             ->   "on|e two "     ->   YES/YES
+"one| two three four five"   ->   "one| "             ->   "one| two "     ->   YES/YES
+"one |two three four five"   ->   "|two three four"   ->   "one |two "     ->   YES/YES
+"one t|wo three four five"   ->   "t|wo three four"   ->   "one t|wo "     ->   YES/YES
+"one tw|o three four five"   ->   "tw|o three four"   ->   "one tw|o "     ->   YES/YES
+"one two| three four five"   ->   "two| three four"   ->   "one two| "     ->   YES/YES
+"one two |three four five"   ->   "two |three four"   ->   "|three four"   ->   YES/YES
+"one two t|hree four five"   ->   "two t|hree four"   ->   "t|hree four"   ->   YES/YES
+"one two th|ree four five"   ->   "two th|ree four"   ->   "th|ree four"   ->   YES/YES
+"one two thr|ee four five"   ->   "two thr|ee four"   ->   "thr|ee four"   ->   YES/YES
+"one two thre|e four five"   ->   "two thre|e four"   ->   "thre|e four"   ->   YES/YES
+"one two three| four five"   ->   "two three| four"   ->   "three| four"   ->   YES/YES
+"one two three |four five"   ->   "two three |four"   ->   "three |four"   ->   YES/YES
+"one two three f|our five"   ->   "two three f|our"   ->   "three f|our"   ->   YES/YES
+"one two three fo|ur five"   ->   "two three fo|ur"   ->   "three fo|ur"   ->   YES/YES
+"one two three fou|r five"   ->   "two three fou|r"   ->   "three fou|r"   ->   YES/YES
+"one two three four| five"   ->   "two three four|"   ->   "three four|"   ->   YES/YES
+"one two three four |five"   ->   " |five"            ->   " |five"        ->   YES/YES
+"one two three four f|ive"   ->   " f|ive"            ->   " f|ive"        ->   YES/YES
+"one two three four fi|ve"   ->   " fi|ve"            ->   " fi|ve"        ->   YES/YES
+"one two three four fiv|e"   ->   " fiv|e"            ->   " fiv|e"        ->   YES/YES
+"one two three four five|"   ->   " five|"            ->   " five|"        ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner03a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner03a-input.html b/Editor/tests/selection/positions-inner03a-input.html
new file mode 100644
index 0000000..8de3c1b
--- /dev/null
+++ b/Editor/tests/selection/positions-inner03a-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one [two three four] five"
+    // To   "one two [three four] five"
+    return positionTest(4,18,8,18);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner03b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner03b-expected.html b/Editor/tests/selection/positions-inner03b-expected.html
new file mode 100644
index 0000000..317fe97
--- /dev/null
+++ b/Editor/tests/selection/positions-inner03b-expected.html
@@ -0,0 +1,27 @@
+From "one two [three four] five"
+To   "one [two three four] five"
+
+"|one two three four five"   ->   "|one two "     ->   "|one "             ->   YES/YES
+"o|ne two three four five"   ->   "o|ne two "     ->   "o|ne "             ->   YES/YES
+"on|e two three four five"   ->   "on|e two "     ->   "on|e "             ->   YES/YES
+"one| two three four five"   ->   "one| two "     ->   "one| "             ->   YES/YES
+"one |two three four five"   ->   "one |two "     ->   "|two three four"   ->   YES/YES
+"one t|wo three four five"   ->   "one t|wo "     ->   "t|wo three four"   ->   YES/YES
+"one tw|o three four five"   ->   "one tw|o "     ->   "tw|o three four"   ->   YES/YES
+"one two| three four five"   ->   "one two| "     ->   "two| three four"   ->   YES/YES
+"one two |three four five"   ->   "|three four"   ->   "two |three four"   ->   YES/YES
+"one two t|hree four five"   ->   "t|hree four"   ->   "two t|hree four"   ->   YES/YES
+"one two th|ree four five"   ->   "th|ree four"   ->   "two th|ree four"   ->   YES/YES
+"one two thr|ee four five"   ->   "thr|ee four"   ->   "two thr|ee four"   ->   YES/YES
+"one two thre|e four five"   ->   "thre|e four"   ->   "two thre|e four"   ->   YES/YES
+"one two three| four five"   ->   "three| four"   ->   "two three| four"   ->   YES/YES
+"one two three |four five"   ->   "three |four"   ->   "two three |four"   ->   YES/YES
+"one two three f|our five"   ->   "three f|our"   ->   "two three f|our"   ->   YES/YES
+"one two three fo|ur five"   ->   "three fo|ur"   ->   "two three fo|ur"   ->   YES/YES
+"one two three fou|r five"   ->   "three fou|r"   ->   "two three fou|r"   ->   YES/YES
+"one two three four| five"   ->   "three four|"   ->   "two three four|"   ->   YES/YES
+"one two three four |five"   ->   " |five"        ->   " |five"            ->   YES/YES
+"one two three four f|ive"   ->   " f|ive"        ->   " f|ive"            ->   YES/YES
+"one two three four fi|ve"   ->   " fi|ve"        ->   " fi|ve"            ->   YES/YES
+"one two three four fiv|e"   ->   " fiv|e"        ->   " fiv|e"            ->   YES/YES
+"one two three four five|"   ->   " five|"        ->   " five|"            ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner03b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner03b-input.html b/Editor/tests/selection/positions-inner03b-input.html
new file mode 100644
index 0000000..d1ed09b
--- /dev/null
+++ b/Editor/tests/selection/positions-inner03b-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one two [three four] five"
+    // To   "one [two three four] five"
+    return positionTest(8,18,4,18);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner04a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner04a-expected.html b/Editor/tests/selection/positions-inner04a-expected.html
new file mode 100644
index 0000000..c959aff
--- /dev/null
+++ b/Editor/tests/selection/positions-inner04a-expected.html
@@ -0,0 +1,27 @@
+From "one [two three] four five"
+To   "one two [three four] five"
+
+"|one two three four five"   ->   "|one "         ->   "|one two "     ->   YES/YES
+"o|ne two three four five"   ->   "o|ne "         ->   "o|ne two "     ->   YES/YES
+"on|e two three four five"   ->   "on|e "         ->   "on|e two "     ->   YES/YES
+"one| two three four five"   ->   "one| "         ->   "one| two "     ->   YES/YES
+"one |two three four five"   ->   "|two three"    ->   "one |two "     ->   YES/YES
+"one t|wo three four five"   ->   "t|wo three"    ->   "one t|wo "     ->   YES/YES
+"one tw|o three four five"   ->   "tw|o three"    ->   "one tw|o "     ->   YES/YES
+"one two| three four five"   ->   "two| three"    ->   "one two| "     ->   YES/YES
+"one two |three four five"   ->   "two |three"    ->   "|three four"   ->   YES/YES
+"one two t|hree four five"   ->   "two t|hree"    ->   "t|hree four"   ->   YES/YES
+"one two th|ree four five"   ->   "two th|ree"    ->   "th|ree four"   ->   YES/YES
+"one two thr|ee four five"   ->   "two thr|ee"    ->   "thr|ee four"   ->   YES/YES
+"one two thre|e four five"   ->   "two thre|e"    ->   "thre|e four"   ->   YES/YES
+"one two three| four five"   ->   "two three|"    ->   "three| four"   ->   YES/YES
+"one two three |four five"   ->   " |four five"   ->   "three |four"   ->   YES/YES
+"one two three f|our five"   ->   " f|our five"   ->   "three f|our"   ->   YES/YES
+"one two three fo|ur five"   ->   " fo|ur five"   ->   "three fo|ur"   ->   YES/YES
+"one two three fou|r five"   ->   " fou|r five"   ->   "three fou|r"   ->   YES/YES
+"one two three four| five"   ->   " four| five"   ->   "three four|"   ->   YES/YES
+"one two three four |five"   ->   " four |five"   ->   " |five"        ->   YES/YES
+"one two three four f|ive"   ->   " four f|ive"   ->   " f|ive"        ->   YES/YES
+"one two three four fi|ve"   ->   " four fi|ve"   ->   " fi|ve"        ->   YES/YES
+"one two three four fiv|e"   ->   " four fiv|e"   ->   " fiv|e"        ->   YES/YES
+"one two three four five|"   ->   " four five|"   ->   " five|"        ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner04a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner04a-input.html b/Editor/tests/selection/positions-inner04a-input.html
new file mode 100644
index 0000000..b6ee197
--- /dev/null
+++ b/Editor/tests/selection/positions-inner04a-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one [two three] four five"
+    // To   "one two [three four] five"
+    return positionTest(4,13,8,18);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner04b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner04b-expected.html b/Editor/tests/selection/positions-inner04b-expected.html
new file mode 100644
index 0000000..a2c875b
--- /dev/null
+++ b/Editor/tests/selection/positions-inner04b-expected.html
@@ -0,0 +1,27 @@
+From "one two [three four] five"
+To   "one [two three] four five"
+
+"|one two three four five"   ->   "|one two "     ->   "|one "         ->   YES/YES
+"o|ne two three four five"   ->   "o|ne two "     ->   "o|ne "         ->   YES/YES
+"on|e two three four five"   ->   "on|e two "     ->   "on|e "         ->   YES/YES
+"one| two three four five"   ->   "one| two "     ->   "one| "         ->   YES/YES
+"one |two three four five"   ->   "one |two "     ->   "|two three"    ->   YES/YES
+"one t|wo three four five"   ->   "one t|wo "     ->   "t|wo three"    ->   YES/YES
+"one tw|o three four five"   ->   "one tw|o "     ->   "tw|o three"    ->   YES/YES
+"one two| three four five"   ->   "one two| "     ->   "two| three"    ->   YES/YES
+"one two |three four five"   ->   "|three four"   ->   "two |three"    ->   YES/YES
+"one two t|hree four five"   ->   "t|hree four"   ->   "two t|hree"    ->   YES/YES
+"one two th|ree four five"   ->   "th|ree four"   ->   "two th|ree"    ->   YES/YES
+"one two thr|ee four five"   ->   "thr|ee four"   ->   "two thr|ee"    ->   YES/YES
+"one two thre|e four five"   ->   "thre|e four"   ->   "two thre|e"    ->   YES/YES
+"one two three| four five"   ->   "three| four"   ->   "two three|"    ->   YES/YES
+"one two three |four five"   ->   "three |four"   ->   " |four five"   ->   YES/YES
+"one two three f|our five"   ->   "three f|our"   ->   " f|our five"   ->   YES/YES
+"one two three fo|ur five"   ->   "three fo|ur"   ->   " fo|ur five"   ->   YES/YES
+"one two three fou|r five"   ->   "three fou|r"   ->   " fou|r five"   ->   YES/YES
+"one two three four| five"   ->   "three four|"   ->   " four| five"   ->   YES/YES
+"one two three four |five"   ->   " |five"        ->   " four |five"   ->   YES/YES
+"one two three four f|ive"   ->   " f|ive"        ->   " four f|ive"   ->   YES/YES
+"one two three four fi|ve"   ->   " fi|ve"        ->   " four fi|ve"   ->   YES/YES
+"one two three four fiv|e"   ->   " fiv|e"        ->   " four fiv|e"   ->   YES/YES
+"one two three four five|"   ->   " five|"        ->   " four five|"   ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner04b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner04b-input.html b/Editor/tests/selection/positions-inner04b-input.html
new file mode 100644
index 0000000..09fe48e
--- /dev/null
+++ b/Editor/tests/selection/positions-inner04b-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one two [three four] five"
+    // To   "one [two three] four five"
+    return positionTest(8,18,4,13);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner05a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner05a-expected.html b/Editor/tests/selection/positions-inner05a-expected.html
new file mode 100644
index 0000000..9a47890
--- /dev/null
+++ b/Editor/tests/selection/positions-inner05a-expected.html
@@ -0,0 +1,27 @@
+From "one [two th]ree four five"
+To   "one two th[ree four] five"
+
+"|one two three four five"   ->   "|one "            ->   "|one two th"   ->   YES/YES
+"o|ne two three four five"   ->   "o|ne "            ->   "o|ne two th"   ->   YES/YES
+"on|e two three four five"   ->   "on|e "            ->   "on|e two th"   ->   YES/YES
+"one| two three four five"   ->   "one| "            ->   "one| two th"   ->   YES/YES
+"one |two three four five"   ->   "|two th"          ->   "one |two th"   ->   YES/YES
+"one t|wo three four five"   ->   "t|wo th"          ->   "one t|wo th"   ->   YES/YES
+"one tw|o three four five"   ->   "tw|o th"          ->   "one tw|o th"   ->   YES/YES
+"one two| three four five"   ->   "two| th"          ->   "one two| th"   ->   YES/YES
+"one two |three four five"   ->   "two |th"          ->   "one two |th"   ->   YES/YES
+"one two t|hree four five"   ->   "two t|h"          ->   "one two t|h"   ->   YES/YES
+"one two th|ree four five"   ->   "two th|"          ->   "|ree four"     ->   YES/YES
+"one two thr|ee four five"   ->   "r|ee four five"   ->   "r|ee four"     ->   YES/YES
+"one two thre|e four five"   ->   "re|e four five"   ->   "re|e four"     ->   YES/YES
+"one two three| four five"   ->   "ree| four five"   ->   "ree| four"     ->   YES/YES
+"one two three |four five"   ->   "ree |four five"   ->   "ree |four"     ->   YES/YES
+"one two three f|our five"   ->   "ree f|our five"   ->   "ree f|our"     ->   YES/YES
+"one two three fo|ur five"   ->   "ree fo|ur five"   ->   "ree fo|ur"     ->   YES/YES
+"one two three fou|r five"   ->   "ree fou|r five"   ->   "ree fou|r"     ->   YES/YES
+"one two three four| five"   ->   "ree four| five"   ->   "ree four|"     ->   YES/YES
+"one two three four |five"   ->   "ree four |five"   ->   " |five"        ->   YES/YES
+"one two three four f|ive"   ->   "ree four f|ive"   ->   " f|ive"        ->   YES/YES
+"one two three four fi|ve"   ->   "ree four fi|ve"   ->   " fi|ve"        ->   YES/YES
+"one two three four fiv|e"   ->   "ree four fiv|e"   ->   " fiv|e"        ->   YES/YES
+"one two three four five|"   ->   "ree four five|"   ->   " five|"        ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner05a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner05a-input.html b/Editor/tests/selection/positions-inner05a-input.html
new file mode 100644
index 0000000..a01dfcb
--- /dev/null
+++ b/Editor/tests/selection/positions-inner05a-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one [two th]ree four five"
+    // To   "one two th[ree four] five"
+    return positionTest(4,10,10,18);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner05b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner05b-expected.html b/Editor/tests/selection/positions-inner05b-expected.html
new file mode 100644
index 0000000..a21cdd2
--- /dev/null
+++ b/Editor/tests/selection/positions-inner05b-expected.html
@@ -0,0 +1,27 @@
+From "one two th[ree four] five"
+To   "one [two th]ree four five"
+
+"|one two three four five"   ->   "|one two th"   ->   "|one "            ->   YES/YES
+"o|ne two three four five"   ->   "o|ne two th"   ->   "o|ne "            ->   YES/YES
+"on|e two three four five"   ->   "on|e two th"   ->   "on|e "            ->   YES/YES
+"one| two three four five"   ->   "one| two th"   ->   "one| "            ->   YES/YES
+"one |two three four five"   ->   "one |two th"   ->   "|two th"          ->   YES/YES
+"one t|wo three four five"   ->   "one t|wo th"   ->   "t|wo th"          ->   YES/YES
+"one tw|o three four five"   ->   "one tw|o th"   ->   "tw|o th"          ->   YES/YES
+"one two| three four five"   ->   "one two| th"   ->   "two| th"          ->   YES/YES
+"one two |three four five"   ->   "one two |th"   ->   "two |th"          ->   YES/YES
+"one two t|hree four five"   ->   "one two t|h"   ->   "two t|h"          ->   YES/YES
+"one two th|ree four five"   ->   "|ree four"     ->   "two th|"          ->   YES/YES
+"one two thr|ee four five"   ->   "r|ee four"     ->   "r|ee four five"   ->   YES/YES
+"one two thre|e four five"   ->   "re|e four"     ->   "re|e four five"   ->   YES/YES
+"one two three| four five"   ->   "ree| four"     ->   "ree| four five"   ->   YES/YES
+"one two three |four five"   ->   "ree |four"     ->   "ree |four five"   ->   YES/YES
+"one two three f|our five"   ->   "ree f|our"     ->   "ree f|our five"   ->   YES/YES
+"one two three fo|ur five"   ->   "ree fo|ur"     ->   "ree fo|ur five"   ->   YES/YES
+"one two three fou|r five"   ->   "ree fou|r"     ->   "ree fou|r five"   ->   YES/YES
+"one two three four| five"   ->   "ree four|"     ->   "ree four| five"   ->   YES/YES
+"one two three four |five"   ->   " |five"        ->   "ree four |five"   ->   YES/YES
+"one two three four f|ive"   ->   " f|ive"        ->   "ree four f|ive"   ->   YES/YES
+"one two three four fi|ve"   ->   " fi|ve"        ->   "ree four fi|ve"   ->   YES/YES
+"one two three four fiv|e"   ->   " fiv|e"        ->   "ree four fiv|e"   ->   YES/YES
+"one two three four five|"   ->   " five|"        ->   "ree four five|"   ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner05b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner05b-input.html b/Editor/tests/selection/positions-inner05b-input.html
new file mode 100644
index 0000000..1bb20d2
--- /dev/null
+++ b/Editor/tests/selection/positions-inner05b-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one two th[ree four] five"
+    // To   "one [two th]ree four five"
+    return positionTest(10,18,4,10);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner06a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner06a-expected.html b/Editor/tests/selection/positions-inner06a-expected.html
new file mode 100644
index 0000000..1db9e73
--- /dev/null
+++ b/Editor/tests/selection/positions-inner06a-expected.html
@@ -0,0 +1,27 @@
+From "one [two] three four five"
+To   "one two three [four] five"
+
+"|one two three four five"   ->   "|one "               ->   "|one two three "   ->   YES/YES
+"o|ne two three four five"   ->   "o|ne "               ->   "o|ne two three "   ->   YES/YES
+"on|e two three four five"   ->   "on|e "               ->   "on|e two three "   ->   YES/YES
+"one| two three four five"   ->   "one| "               ->   "one| two three "   ->   YES/YES
+"one |two three four five"   ->   "|two"                ->   "one |two three "   ->   YES/YES
+"one t|wo three four five"   ->   "t|wo"                ->   "one t|wo three "   ->   YES/YES
+"one tw|o three four five"   ->   "tw|o"                ->   "one tw|o three "   ->   YES/YES
+"one two| three four five"   ->   "two|"                ->   "one two| three "   ->   YES/YES
+"one two |three four five"   ->   " |three four five"   ->   "one two |three "   ->   YES/YES
+"one two t|hree four five"   ->   " t|hree four five"   ->   "one two t|hree "   ->   YES/YES
+"one two th|ree four five"   ->   " th|ree four five"   ->   "one two th|ree "   ->   YES/YES
+"one two thr|ee four five"   ->   " thr|ee four five"   ->   "one two thr|ee "   ->   YES/YES
+"one two thre|e four five"   ->   " thre|e four five"   ->   "one two thre|e "   ->   YES/YES
+"one two three| four five"   ->   " three| four five"   ->   "one two three| "   ->   YES/YES
+"one two three |four five"   ->   " three |four five"   ->   "|four"             ->   YES/YES
+"one two three f|our five"   ->   " three f|our five"   ->   "f|our"             ->   YES/YES
+"one two three fo|ur five"   ->   " three fo|ur five"   ->   "fo|ur"             ->   YES/YES
+"one two three fou|r five"   ->   " three fou|r five"   ->   "fou|r"             ->   YES/YES
+"one two three four| five"   ->   " three four| five"   ->   "four|"             ->   YES/YES
+"one two three four |five"   ->   " three four |five"   ->   " |five"            ->   YES/YES
+"one two three four f|ive"   ->   " three four f|ive"   ->   " f|ive"            ->   YES/YES
+"one two three four fi|ve"   ->   " three four fi|ve"   ->   " fi|ve"            ->   YES/YES
+"one two three four fiv|e"   ->   " three four fiv|e"   ->   " fiv|e"            ->   YES/YES
+"one two three four five|"   ->   " three four five|"   ->   " five|"            ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner06a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner06a-input.html b/Editor/tests/selection/positions-inner06a-input.html
new file mode 100644
index 0000000..2ecc068
--- /dev/null
+++ b/Editor/tests/selection/positions-inner06a-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one [two] three four five"
+    // To   "one two three [four] five"
+    return positionTest(4,7,14,18);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner06b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner06b-expected.html b/Editor/tests/selection/positions-inner06b-expected.html
new file mode 100644
index 0000000..c93a016
--- /dev/null
+++ b/Editor/tests/selection/positions-inner06b-expected.html
@@ -0,0 +1,27 @@
+From "one two three [four] five"
+To   "one [two] three four five"
+
+"|one two three four five"   ->   "|one two three "   ->   "|one "               ->   YES/YES
+"o|ne two three four five"   ->   "o|ne two three "   ->   "o|ne "               ->   YES/YES
+"on|e two three four five"   ->   "on|e two three "   ->   "on|e "               ->   YES/YES
+"one| two three four five"   ->   "one| two three "   ->   "one| "               ->   YES/YES
+"one |two three four five"   ->   "one |two three "   ->   "|two"                ->   YES/YES
+"one t|wo three four five"   ->   "one t|wo three "   ->   "t|wo"                ->   YES/YES
+"one tw|o three four five"   ->   "one tw|o three "   ->   "tw|o"                ->   YES/YES
+"one two| three four five"   ->   "one two| three "   ->   "two|"                ->   YES/YES
+"one two |three four five"   ->   "one two |three "   ->   " |three four five"   ->   YES/YES
+"one two t|hree four five"   ->   "one two t|hree "   ->   " t|hree four five"   ->   YES/YES
+"one two th|ree four five"   ->   "one two th|ree "   ->   " th|ree four five"   ->   YES/YES
+"one two thr|ee four five"   ->   "one two thr|ee "   ->   " thr|ee four five"   ->   YES/YES
+"one two thre|e four five"   ->   "one two thre|e "   ->   " thre|e four five"   ->   YES/YES
+"one two three| four five"   ->   "one two three| "   ->   " three| four five"   ->   YES/YES
+"one two three |four five"   ->   "|four"             ->   " three |four five"   ->   YES/YES
+"one two three f|our five"   ->   "f|our"             ->   " three f|our five"   ->   YES/YES
+"one two three fo|ur five"   ->   "fo|ur"             ->   " three fo|ur five"   ->   YES/YES
+"one two three fou|r five"   ->   "fou|r"             ->   " three fou|r five"   ->   YES/YES
+"one two three four| five"   ->   "four|"             ->   " three four| five"   ->   YES/YES
+"one two three four |five"   ->   " |five"            ->   " three four |five"   ->   YES/YES
+"one two three four f|ive"   ->   " f|ive"            ->   " three four f|ive"   ->   YES/YES
+"one two three four fi|ve"   ->   " fi|ve"            ->   " three four fi|ve"   ->   YES/YES
+"one two three four fiv|e"   ->   " fiv|e"            ->   " three four fiv|e"   ->   YES/YES
+"one two three four five|"   ->   " five|"            ->   " three four five|"   ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-inner06b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-inner06b-input.html b/Editor/tests/selection/positions-inner06b-input.html
new file mode 100644
index 0000000..696557b
--- /dev/null
+++ b/Editor/tests/selection/positions-inner06b-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "one two three [four] five"
+    // To   "one [two] three four five"
+    return positionTest(14,18,4,7);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-outer01a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-outer01a-expected.html b/Editor/tests/selection/positions-outer01a-expected.html
new file mode 100644
index 0000000..2f0a340
--- /dev/null
+++ b/Editor/tests/selection/positions-outer01a-expected.html
@@ -0,0 +1,27 @@
+From "[one two three four five]"
+To   "one two [three] four five"
+
+"|one two three four five"   ->   "|one two three four five"   ->   "|one two "     ->   YES/YES
+"o|ne two three four five"   ->   "o|ne two three four five"   ->   "o|ne two "     ->   YES/YES
+"on|e two three four five"   ->   "on|e two three four five"   ->   "on|e two "     ->   YES/YES
+"one| two three four five"   ->   "one| two three four five"   ->   "one| two "     ->   YES/YES
+"one |two three four five"   ->   "one |two three four five"   ->   "one |two "     ->   YES/YES
+"one t|wo three four five"   ->   "one t|wo three four five"   ->   "one t|wo "     ->   YES/YES
+"one tw|o three four five"   ->   "one tw|o three four five"   ->   "one tw|o "     ->   YES/YES
+"one two| three four five"   ->   "one two| three four five"   ->   "one two| "     ->   YES/YES
+"one two |three four five"   ->   "one two |three four five"   ->   "|three"        ->   YES/YES
+"one two t|hree four five"   ->   "one two t|hree four five"   ->   "t|hree"        ->   YES/YES
+"one two th|ree four five"   ->   "one two th|ree four five"   ->   "th|ree"        ->   YES/YES
+"one two thr|ee four five"   ->   "one two thr|ee four five"   ->   "thr|ee"        ->   YES/YES
+"one two thre|e four five"   ->   "one two thre|e four five"   ->   "thre|e"        ->   YES/YES
+"one two three| four five"   ->   "one two three| four five"   ->   "three|"        ->   YES/YES
+"one two three |four five"   ->   "one two three |four five"   ->   " |four five"   ->   YES/YES
+"one two three f|our five"   ->   "one two three f|our five"   ->   " f|our five"   ->   YES/YES
+"one two three fo|ur five"   ->   "one two three fo|ur five"   ->   " fo|ur five"   ->   YES/YES
+"one two three fou|r five"   ->   "one two three fou|r five"   ->   " fou|r five"   ->   YES/YES
+"one two three four| five"   ->   "one two three four| five"   ->   " four| five"   ->   YES/YES
+"one two three four |five"   ->   "one two three four |five"   ->   " four |five"   ->   YES/YES
+"one two three four f|ive"   ->   "one two three four f|ive"   ->   " four f|ive"   ->   YES/YES
+"one two three four fi|ve"   ->   "one two three four fi|ve"   ->   " four fi|ve"   ->   YES/YES
+"one two three four fiv|e"   ->   "one two three four fiv|e"   ->   " four fiv|e"   ->   YES/YES
+"one two three four five|"   ->   "one two three four five|"   ->   " four five|"   ->   YES/YES

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-outer01a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-outer01a-input.html b/Editor/tests/selection/positions-outer01a-input.html
new file mode 100644
index 0000000..973f777
--- /dev/null
+++ b/Editor/tests/selection/positions-outer01a-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="PositionTests.js"></script>
+<script>
+function performTest()
+{
+    // From "[one two three four five]"
+    // To   "one two [three] four five"
+    return positionTest(0,23,8,13);
+}
+</script>
+</head>
+<body>
+<p>one two three four five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/positions-outer01b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/positions-outer01b-expected.html b/Editor/tests/selection/positions-outer01b-expected.html
new file mode 100644
index 0000000..c6f5b68
--- /dev/null
+++ b/Editor/tests/selection/positions-outer01b-expected.html
@@ -0,0 +1,27 @@
+From "one two [three] four five"
+To   "[one two three four five]"
+
+"|one two three four five"   ->   "|one two "     ->   "|one two three four five"   ->   YES/YES
+"o|ne two three four five"   ->   "o|ne two "     ->   "o|ne two three four five"   ->   YES/YES
+"on|e two three four five"   ->   "on|e two "     ->   "on|e two three four five"   ->   YES/YES
+"one| two three four five"   ->   "one| two "     ->   "one| two three four five"   ->   YES/YES
+"one |two three four five"   ->   "one |two "     ->   "one |two three four five"   ->   YES/YES
+"one t|wo three four five"   ->   "one t|wo "     ->   "one t|wo three four five"   ->   YES/YES
+"one tw|o three four five"   ->   "one tw|o "     ->   "one tw|o three four five"   ->   YES/YES
+"one two| three four five"   ->   "one two| "     ->   "one two| three four five"   ->   YES/YES
+"one two |three four five"   ->   "|three"        ->   "one two |three four five"   ->   YES/YES
+"one two t|hree four five"   ->   "t|hree"        ->   "one two t|hree four five"   ->   YES/YES
+"one two th|ree four five"   ->   "th|ree"        ->   "one two th|ree four five"   ->   YES/YES
+"one two thr|ee four five"   ->   "thr|ee"        ->   "one two thr|ee four five"   ->   YES/YES
+"one two thre|e four five"   ->   "thre|e"        ->   "one two thre|e four five"   ->   YES/YES
+"one two three| four five"   ->   "three|"        ->   "one two three| four five"   ->   YES/YES
+"one two three |four five"   ->   " |four five"   ->   "one two three |four five"   ->   YES/YES
+"one two three f|our five"   ->   " f|our five"   ->   "one two three f|our five"   ->   YES/YES
+"one two three fo|ur five"   ->   " fo|ur five"   ->   "one two three fo|ur five"   ->   YES/YES
+"one two three fou|r five"   ->   " fou|r five"   ->   "one two three fou|r five"   ->   YES/YES
+"one two three four| five"   ->   " four| five"   ->   "one two three four| five"   ->   YES/YES
+"one two three four |five"   ->   " four |five"   ->   "one two three four |five"   ->   YES/YES
+"one two three four f|ive"   ->   " four f|ive"   ->   "one two three four f|ive"   ->   YES/YES
+"one two three four fi|ve"   ->   " four fi|ve"   ->   "one two three four fi|ve"   ->   YES/YES
+"one two three four fiv|e"   ->   " four fiv|e"   ->   "one two three four fiv|e"   ->   YES/YES
+"one two three four five|"   ->   " four five|"   ->   "one two three four five|"   ->   YES/YES


Mime
View raw message