MCPcopy
hub / github.com/marktext/marktext / createBlockP

Method createBlockP

packages/muyajs/lib/contentState/index.js:348–353  ·  view source on GitHub ↗
(text = '')

Source from the content-addressed store, hash-verified

346 }
347
348 createBlockP(text = '') {
349 const pBlock = this.createBlock('p')
350 const contentBlock = this.createBlock('span', { text })
351 this.appendChild(pBlock, contentBlock)
352 return pBlock
353 }
354
355 isCollapse(cursor = this.cursor) {
356 const { start, end } = cursor

Callers 12

constructorMethod · 0.95
importRegisterFunction · 0.80
pasteCtrlFunction · 0.80
paragraphCtrlFunction · 0.80
dragDropCtrlFunction · 0.80
enterCtrlFunction · 0.80
getFirstBlockInNextRowFunction · 0.80
arrowCtrlFunction · 0.80
clickCtrlFunction · 0.80
updateCtrlFunction · 0.80
footnoteCtrlFunction · 0.80
backspaceCtrlFunction · 0.80

Calls 2

createBlockMethod · 0.95
appendChildMethod · 0.95

Tested by

no test coverage detected