Skip to content Skip to sidebar Skip to footer
Showing posts with the label Range

Define Multiple Ranges In Google Apps Script

I'm having difficulty defining multiple ranges in GAS. I have the following simple function I … Read more Define Multiple Ranges In Google Apps Script

With Rangy, Even Though I Extend The Range By Setstartbefore Method, Range.cansurroundcontents Method Still Returns False

I have the following html: Morbi quis augue vitae quam pharetra| varius at at| urna. The selecti… Read more With Rangy, Even Though I Extend The Range By Setstartbefore Method, Range.cansurroundcontents Method Still Returns False

Check If More Than Two Date Ranges Overlap

I have multiple date ranges. I want to check if they are overlapping in javascript. When there are … Read more Check If More Than Two Date Ranges Overlap

Problem Detecting Newlines In Javascript Range Object

I have some javascript that manipulates html based on what the user has selected. For real browsers… Read more Problem Detecting Newlines In Javascript Range Object

Get Elements In Text Selection

I want to get all of the elements contained in a user selection (as in DOM 2 ranges / MS TextRanges… Read more Get Elements In Text Selection

Replace Last Character While User Typing In Contenteditable Div

I found, somewhere in SE, a code to insert text in contenteditable by Tim Down. The code looks like… Read more Replace Last Character While User Typing In Contenteditable Div

Error When Trying To Use Setstart And Setend On Range: Uncaught Indexsizeerror: Failed To Execute 'setend' On 'range'

When I try to use a range, I get this error in the console: Uncaught IndexSizeError: Failed to exec… Read more Error When Trying To Use Setstart And Setend On Range: Uncaught Indexsizeerror: Failed To Execute 'setend' On 'range'

In Selection, Can The Focusoffset Be Before The Anchoroffset?

In programmatically defining a range/selection in JavaScript, is it not possible to have the focusO… Read more In Selection, Can The Focusoffset Be Before The Anchoroffset?

Javascript What Does Range.endoffset() Give You?

When I go: range.selectNodeContents(element); My understanding is that the range object selects al… Read more Javascript What Does Range.endoffset() Give You?