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/.

222 questions
0
votes
1 answer

Rangy and IE8 - positioning caret after element at end of paragraph

I'm using Rangy to perform several operations in a rich text editor (designmode = "on"). One of these functions is pasting formatted content which can represent certain pre-defined characters the user has created before-hand. All of the text content…
Jason
  • 2,059
  • 2
  • 21
  • 22
0
votes
1 answer

rangy - how to work with content in iframe

I need your help about rangy library . How can I apply rangy within iframe selected content, i cant to understand (( this code in my page create red bold selection with ALL iframe content, but I need to apply it to only user selection var…
user980966
0
votes
2 answers

Range.deserializeSelection checksum error?

It's a followup question of this. I've serialized the selection of text in an iframe and want to restore it but it gives me an error, "Uncaught Error: deserializeRange: checksums of serialized range root node (XXXXX) and target root node (XXXXX) do…
codef0rmer
  • 9,854
  • 9
  • 46
  • 75
0
votes
1 answer

Delete selection with rangy

I've made a little inline editor with some clean up logic. So if you paste from a word file it deletes all the formatting. My problem is, that if you select e.g. one sentence and paste, it doesn't get replaced. This is duo to the cleanUp logic. Now…
xotix
  • 347
  • 1
  • 11
  • 33
0
votes
0 answers

How to select text using Google rangy?

How can I select text and get that selected text using Rangy? For example, if I want to build a text editor like the one on Stack Overflow, where if I select a piece of text and click the B button, that text is replaced by two asterisks preceding…
SexyBeast
  • 8,635
  • 25
  • 92
  • 179
0
votes
1 answer

Inserting node before empty node in Chrome using JavaScript Rangy

I've noticed this problem when trying to insert a node before an empty element when at the start of another element (pipe | is the caret position). Starting with this:

|Some text

I used range.insertNode() on a Rangy range to paste…
Jason
  • 2,059
  • 2
  • 21
  • 22
0
votes
1 answer

Different behaviour when using rangy library and insertNodeAtCaret function in contenteditable

I am using great Rangy library. And I am also using Tim Down's function for inserting HTML node into contenteditable DIV: function insertNodeAtCaret(node) { var sel = rangy.getSelection(); if (sel.rangeCount) { var range =…
Frodik
  • 13,164
  • 22
  • 83
  • 132
0
votes
1 answer

Preserve caret position in contenteditable when unwrapping element?

I have this problem which I have tried to show in this jsFiddle. I have contenteditable in which is simple html - just text and one element. My question is about situation when the caret is somewhere inside element and user hits "X" key.…
Frodik
  • 13,164
  • 22
  • 83
  • 132
0
votes
1 answer

Why Rangy library doesn't work with contenteditable in Opera?

I am using popular Rangy library inside contenteditable DIV. My code is pretty simple: var saved_selection = false; $('#contenteditable').bind('keypress mouseup', function(e){ $(this).find('.rangySelectionBoundary').remove(); saved_selection =…
Frodik
  • 13,164
  • 22
  • 83
  • 132
-1
votes
1 answer

can you re-initiate a ui-popover?

Since I'm injecting a after the DOM is constructed I need to reinitiate the popovers otherwise it won't show. Is there away to do that? HTML
Amir A.Eitan
  • 163
  • 9
-1
votes
1 answer

Looking for a way or a plugin that save my marked text and could restore it after loose of focus

like i menthioned in the topic i'm looking for a plugin that save my marked text and could restore it after loose of focus. Like a JS Library called Rangy i used in the past. Is there such a plugin or does anyone has an idea how i could deal with…
andara
  • 33
  • 5
-2
votes
1 answer

Why not selection text replaced by special character and how to remove this special character?

I want to this type of demo; Simple String to here : "This is a demo text." selection text : "demo" Click button replace by special character => |^selectedText^| ReplacedText : |^demo^| removing special character when click on replace button and…
Dhaval Varsada
  • 91
  • 1
  • 1
  • 8
1 2 3
14
15