MCPcopy
hub / github.com/basecamp/trix / removeBlockAttributesAtRange

Method removeBlockAttributesAtRange

src/trix/models/document.js:361–369  ·  view source on GitHub ↗
(range)

Source from the content-addressed store, hash-verified

359 }
360
361 removeBlockAttributesAtRange(range) {
362 let { blockList } = this
363 this.eachBlockAtRange(range, function(block, textRange, index) {
364 if (block.hasAttributes()) {
365 blockList = blockList.editObjectAtIndex(index, () => block.copyWithoutAttributes())
366 }
367 })
368 return new this.constructor(blockList)
369 }
370
371 expandRangeToLineBreaksAndSplitBlocks(range) {
372 let position

Callers 2

trix.jsFile · 0.80

Calls 4

eachBlockAtRangeMethod · 0.95
editObjectAtIndexMethod · 0.80
hasAttributesMethod · 0.45
copyWithoutAttributesMethod · 0.45

Tested by

no test coverage detected