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

Method removeLastBlockAttribute

src/trix/models/composition.js:270–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268 }
269
270 removeLastBlockAttribute() {
271 const [ startPosition, endPosition ] = Array.from(this.getSelectedRange())
272 const block = this.document.getBlockAtPosition(endPosition)
273 this.removeCurrentAttribute(block.getLastAttribute())
274 return this.setSelection(startPosition)
275 }
276
277 insertPlaceholder() {
278 this.placeholderPosition = this.getPosition()

Callers 1

insertLineBreakMethod · 0.95

Calls 5

getSelectedRangeMethod · 0.95
setSelectionMethod · 0.95
getBlockAtPositionMethod · 0.80
getLastAttributeMethod · 0.45

Tested by

no test coverage detected