(attribute, range)
| 251 | } |
| 252 | |
| 253 | removeAttributeAtRange(attribute, range) { |
| 254 | let { blockList } = this |
| 255 | this.eachBlockAtRange(range, function(block, textRange, index) { |
| 256 | if (getBlockConfig(attribute)) { |
| 257 | blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(attribute)) |
| 258 | } else if (textRange[0] !== textRange[1]) { |
| 259 | blockList = blockList.editObjectAtIndex(index, () => |
| 260 | block.copyWithText(block.text.removeAttributeAtRange(attribute, textRange)) |
| 261 | ) |
| 262 | } |
| 263 | }) |
| 264 | return new this.constructor(blockList) |
| 265 | } |
| 266 | |
| 267 | updateAttributesForAttachment(attributes, attachment) { |
| 268 | const range = this.getRangeOfAttachment(attachment) |
no test coverage detected