Questions tagged [rangy]

Rangy is a cross-browser JavaScript range and selection library.

Rangy is a cross-browser JavaScript range and selection library. It provides a simple standards-based API for performing common DOM Range and Selection tasks in all major browsers, abstracting away the wildly different implementations of this functionality between Internet Explorer up to and including version 8 and DOM-compliant browsers.

The project website is http://code.google.com/p/rangy/.

225 questions
2
votes
0 answers

Why is rangy not scrolling to the position of the result in the range?

I'm using rangy to highlight some text in a specific div after the user searches for it. The text that is being searched is wrapped in one div, which I am limiting the range to. This searchable text is also many paragraphs, requiring the user to…
Joe Berg
  • 774
  • 2
  • 8
  • 21
2
votes
1 answer

Cannot delete HTML element in contentEditable parent if said element is the first child

The problem I am building a custom boolean search input that should accept the boolean tags under the form of some "boolean tag bubbles" that can be added to the query via a click. Basically, instead of typing {AND} the user can click on the "AND"…
Darkkz
  • 384
  • 4
  • 21
2
votes
0 answers

rangy highlighter in tinymce wysiwyg editor iframe

I am working on some sort of marking selected text and annotation tool for text documents, in TinyMCE editor. I made it work by wrapping selected text in s but when the text contains some nested HTML it often breaks. I tried to make a workaround…
2
votes
0 answers

Rangy deserialize doesn't show span id's

I'm using highlighter.deserialize(item.rangyObject); to create my span's and highlights from a DB. It looks like the deserialize function doesn't creates them with any id's. Rangy's restoreSelection function does create them. Should I be using this…
Amir A.Eitan
  • 183
  • 1
  • 12
2
votes
0 answers

Highlight functionality same as medium application

I want to implement highlight functionality for my website and mobile app. I want this functionality work same as medium app. So that if user highlight some text from mobile application then it will automatically display on the website. And if user…
arun kamboj
  • 1,145
  • 4
  • 17
  • 48
2
votes
0 answers

Maintaining caret position in variable contenteditable div

I have a contenteditable div which gets it's innerhtml via a websocket from another client's contenteditable div. Everytime a client's div html is received and set, both clients lose their selection range and caret position. I've been using rangy to…
John R.
  • 39
  • 3
2
votes
0 answers

Rangy causing Chrome Extension to be rejected

I'm using rangy-core.js as a part of my Chrome extension, but as soon as the extension is uploaded it gets rejected due to malware policy. In order to narrow down the problem, I removed the rangy js files and uploaded the exact same extension. This…
Arjun Tuli
  • 1,257
  • 1
  • 11
  • 13
2
votes
4 answers

Error initializing Rangy.js in Internet Explorer

I'm working on an angular app that uses textAngular, which depends on rangy-core and rangy-selectionsaverestore. I'm having the following errors with the latest IE: Module 'WrappedSelection' failed to load: Unspecified error. Error: Unspecified…
2
votes
3 answers

get the span tag name of selected text javascript

How to get the span name of selected text: text2 text3 text4 text5 text6 when user select text4 then I want to get Span=Class1 Any answer can help ( in Jquery or Rangy or ...)
ouss88
  • 35
  • 5
2
votes
0 answers

How to get cursor HTML offset in contenteditable?

I'd like to get the number of characters between the start of a container and the cursor (including tags characters). Example :

This| is an

example.