Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update repository with latest changes #2

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
769ab5c
Fix for missing method from issue 157.
Mar 18, 2013
bcd63d8
Changed so that Rangy's own DOM4-compliant implementation is always u…
Apr 14, 2013
eb0dad3
Added unfinished support for AMD (issue 154)
Apr 25, 2013
908c71e
Fix for issue 160
May 11, 2013
9b5f1d8
Fix for issue 165: calling rangeToTextRange on WrappedTextRange rathe…
May 11, 2013
fcae2f0
Added highlighter conveniences: getHighlightsInSelection() method and…
Jun 3, 2013
df4d22f
Fix for issue 169 (error handling in comparePoints)
Jun 7, 2013
9090009
Fix for issue 174 (canDeserializeRange bug) plus started on highlight…
Jul 18, 2013
ed00d1b
Implemented elementAttributes option in ClassApplier
Jul 18, 2013
8b95930
Fix for issue 176 (class applier merge exception)
Jul 23, 2013
dfb0b91
Changed MIME type for CSS file
Jul 25, 2013
1af306b
Added onElementCreate option to class applier
Jul 25, 2013
ab2b912
Fixed highlighter demo (issue 172)
Jul 26, 2013
aff4ef7
Tweaks
Jul 27, 2013
6a26afe
Fix for issue 171.
Aug 5, 2013
00feae3
Improvements to text range line break handling. Tidy of class applier.
Nov 21, 2013
876e29d
Fix for issue 190: a boundary container text node is included in getN…
Nov 21, 2013
9a15638
Fix for issue 189. Original selection is now restored after Rangy ini…
Nov 22, 2013
eb2a44f
Fix for issue 188 (preserving range when removing empty containers in…
Nov 23, 2013
2be294b
Updated dev files from latest release
Nov 29, 2013
f54e113
Fixed TextRange demo
Dec 7, 2013
5eb6a9e
Removed console logs
Dec 7, 2013
c7c6e40
Error now thrown when deserializing highlights if class applier is no…
Dec 9, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions demos/highlighter.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ <h3>Highlighter</h3>
<input type="button" ontouchstart="noteSelectedText();" onclick="noteSelectedText();" value="Add note to selection">
<input type="button" ontouchstart="removeHighlightFromSelectedText();" onclick="removeHighlightFromSelectedText();" value="Remove highlights from selection">
<br>
<input type="button" ontouchstart="highlightScopedSelectedText();" onclick="highlightScopedSelectedText();" value="Highlight within para">
<input type="button" ontouchstart="noteScopedSelectedText();" onclick="noteScopedSelectedText();" value="Annotate selection within para">
<input type="button" ontouchstart="highlightScopedSelectedText();" onclick="highlightScopedSelectedText();" value="Highlight within outlined paragraph">
<input type="button" ontouchstart="noteScopedSelectedText();" onclick="noteScopedSelectedText();" value="Annotate selection within outlined paragraph">

<h3>Preserving highlights between page requests</h3>
<form action="highlighter.html" method="get">
Expand Down Expand Up @@ -140,14 +140,14 @@ <h1>Rangy Highlighter Module Demo</h1>
match has 90 minutes of play, with a break of 15 minutes in the middle. The break in the middle is called
half-time.
</p>
<h2>Competitions <span class="smaller">(this section is editable)</span></h2>
<p contenteditable="true">
<h2>Competitions</h2>
<p>
There are many competitions for football, for both football clubs and countries. Football clubs usually play
other teams in their own country, with a few exceptions. <b>Cardiff City F.C.</b> from Wales for example, play
in the English leagues and in the English FA Cup.
</p>
<h2>Who plays football <span class="smaller">(this section is editable and in pre-formatted text)</span></h2>
<pre contenteditable="true">
<h2>Who plays football <span class="smaller">(this section is in pre-formatted text)</span></h2>
<pre>
Football is the world's most popular sport. It is played in more
countries than any other game. In fact, FIFA (the Federation
Internationale de Football Association) has more members than the
Expand All @@ -157,9 +157,6 @@ <h2>Who plays football <span class="smaller">(this section is editable and in pr


</pre>
<p id="controlRange" style="display: none" contenteditable="true">
Some controls to put in a ControlRange: <input> and <input> and <input>
</p>
</div>

<p class="small">
Expand Down
14 changes: 9 additions & 5 deletions demos/textrange.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@

function initFind() {
// Enable buttons
var cssClassApplierModule = rangy.modules.CssClassApplier;
var cssClassApplierModule = rangy.modules.ClassApplier;
if (rangy.supported && cssClassApplierModule && cssClassApplierModule.supported) {
searchResultApplier = rangy.createCssClassApplier("searchResult");
searchResultApplier = rangy.createClassApplier("searchResult");

var searchBox = gEBI("search"),
regexCheckBox = gEBI("regex"),
Expand Down Expand Up @@ -140,15 +140,19 @@
function initSnapToWords2() {
gEBI("demo2").onmouseup = function() {
rangy.getSelection().expand("word", {
includeTrailingSpace: true
wordOptions: {
includeTrailingSpace: true
}
});
};
}

function initSnapToWords3() {
gEBI("demo3").onmouseup = function() {
rangy.getSelection().expand("word", {
wordRegex: /[a-z0-9]+(['\-][a-z0-9]+)*/gi
wordOptions: {
wordRegex: /[a-z0-9]+(['\-][a-z0-9]+)*/gi
}
});
};
}
Expand Down Expand Up @@ -180,7 +184,7 @@
rangy.getSelection().restoreCharacterRanges(containerElement, savedSel);
};

var redItalicApplier = rangy.createCssClassApplier("redItalic");
var redItalicApplier = rangy.createClassApplier("redItalic");
var textLength = rangy.innerText(containerElement).length;

changeFormattingButton.disabled = false;
Expand Down
6 changes: 3 additions & 3 deletions dev/rangy-core.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dev/rangy-cssclassapplier.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dev/rangy-highlighter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading