[{"data":1,"prerenderedAt":549},["ShallowReactive",2],{"msfe-doc:\u002Fen\u002Fapi\u002Fcommands":3},{"id":4,"title":5,"body":6,"description":538,"extension":539,"keywords":540,"locale":541,"meta":542,"navigation":543,"order":534,"path":544,"section":545,"seo":546,"stem":547,"__hash__":548},"docs\u002Fapi\u002Fcommands.en.md","Command and target API",{"type":7,"value":8,"toc":517},"minimark",[9,13,18,27,31,35,38,41,45,48,51,55,74,88,91,94,97,100,104,107,110,114,117,120,124,127,130,134,142,145,149,152,155,159,165,168,171,174,177,180,183,193,196,199,202,205,208,211,215,247,252,278,363,393,396,399,403,413,419,437,440,443,447,469,472,474,478,494,497,500,503,506,509,512,515],[10,11,12],"p",{},"Signatures come from public package exports. Descriptions are checked against current JSDoc; identifiers retain their original names.",[14,15,17],"h2",{"id":16},"command-context","Command context",[10,19,20,21,26],{},"Commands are pure and synchronous. Use props.commands for nested work; see ",[22,23,25],"a",{"href":24},"\u002Fen\u002Fguide\u002Fcommands","Commands",".",[28,29],"msfe-api",{"name":30},"CommandProps",[14,32,34],{"id":33},"source-transactions","Source transactions",[10,36,37],{},"Each step uses the current draft coordinates, not stale initial offsets.",[28,39],{"name":40},"SourceTransaction",[14,42,44],{"id":43},"planner-adapter","Planner adapter",[10,46,47],{},"Adapt a pure CodeMirror planner to the same command chain.",[28,49],{"name":50},"sourceCommand",[14,52,54],{"id":53},"semantic-format-commands","Semantic format commands",[10,56,57,61,62,65,66,69,70,73],{},[58,59,60],"code",{},"toggleSourceMark({ node: 'StrongEmphasis', marker: '**', markerNode: 'EmphasisMark' })","\nreturns a pure planner for ",[58,63,64],{},"editor.run()"," or ",[58,67,68],{},"sourceCommand()",". Features declare grammar; Core handles\npaired markers, directed selections and complete shells, then verifies both the requested format and\nexisting paired semantics. A complete body selection may expand over hidden shells. When no lossless\nplan is proved, the command returns ",[58,71,72],{},"null"," without changing source or history. Partial mark removal and\ncrossing ranges are not automatically split. Empty selections still seed paired markers for free source input.",[10,75,76,79,80,83,84,87],{},[58,77,78],{},"querySourceInline(state, range)"," reads endpoint ancestors without parsing, scanning the document or\nrunning a format command. Use it for structural availability. ",[58,81,82],{},"reason === null"," permits planning but\ndoes not guarantee a specific combination; eligible blank prose may have no node. Explicit planning\nis limited to one inline owner of at most 20,000 characters, with a 12ms parse-validation budget.\nFailure to verify in that budget also refuses. Multiple ranges are planned before one atomic commit.\nThe low-level ",[58,85,86],{},"toggleDelimiter"," remains a literal source tool.",[28,89],{"name":90},"SourceMarkFormat",[28,92],{"name":93},"SourceInlineQuery",[28,95],{"name":96},"querySourceInline",[28,98],{"name":99},"toggleSourceMark",[14,101,103],{"id":102},"result-branches","Result branches",[10,105,106],{},"Named commands return booleans; inspect lastCommandResult for details.",[28,108],{"name":109},"MsfeResult",[14,111,113],{"id":112},"external-changes","External changes",[10,115,116],{},"baseRevision is the local source revision, not a server ETag.",[28,118],{"name":119},"MsfeExternalChange",[14,121,123],{"id":122},"exact-targets","Exact targets",[10,125,126],{},"Suitable for short menus; source changes can invalidate the target.",[28,128],{"name":129},"MsfeTarget",[14,131,133],{"id":132},"mapped-intent","Mapped intent",[10,135,136,137,141],{},"See ",[22,138,140],{"href":139},"\u002Fen\u002Fguide\u002Fselection","Selection and captured intent"," for the complete async helper.",[28,143],{"name":144},"SourceAnchor",[14,146,148],{"id":147},"mapping-policy","Mapping policy",[10,150,151],{},"Choose endpoint and deletion semantics for the feature independently of presentation.",[28,153],{"name":154},"RangePolicy",[14,156,158],{"id":157},"source-block-commands","Source block commands",[10,160,161,162,164],{},"Resolve complete syntax blocks and run commands with a captured ",[58,163,129],{},". Planners preserve the source payload, use one undo step and reject cross-flow moves.",[28,166],{"name":167},"SourceBlock",[28,169],{"name":170},"SourceBlockSide",[28,172],{"name":173},"sourceBlockAt",[28,175],{"name":176},"sourceBlockSibling",[28,178],{"name":179},"sameSourceBlockScope",[28,181],{"name":182},"insertSourceBlock",[10,184,185,188,189,192],{},[58,186,187],{},"replaceSourceBlock(block, markdown)"," replaces a complete block atomically, preserving required\nsibling separators and validating enclosing container boundaries. Run it with\n",[58,190,191],{},"editor.run(command, capturedTarget)"," to reject stale menu intents.",[28,194],{"name":195},"replaceSourceBlock",[28,197],{"name":198},"SourceBlankLine",[28,200],{"name":201},"sourceBlankLineAt",[28,203],{"name":204},"insertAtSourceBlankLine",[28,206],{"name":207},"removeSourceBlock",[28,209],{"name":210},"moveSourceBlock",[14,212,214],{"id":213},"editing-boundaries","Editing boundaries",[10,216,217,218,221,222,225,226,229,230,233,234,237,238,242,243,246],{},"Features declare semantic ranges of hidden source through ",[58,219,220],{},"addEditingBoundaries()"," or the\n",[58,223,224],{},"editingBoundaries"," descriptor field. The same option on ",[58,227,228],{},"MdEditor",", ",[58,231,232],{},"createMdEditor"," and\n",[58,235,236],{},"createMdEditorExtensions"," lets the host override defaults by node. See\n",[22,239,241],{"href":240},"\u002Fen\u002Fguide\u002Fmd-editor#caret-and-editing-boundaries","Caret and editing boundaries"," for integration.\nThese declarations govern navigation, selection and native input protection. Structural actions\nfor Enter, Shift-Enter and Mod-Enter use the ",[58,244,245],{},"addBlockInput()"," contract below.",[248,249,251],"h3",{"id":250},"ranges-and-policies","Ranges and policies",[10,253,254,255,258,259,262,263,266,267,270,271,274,275,277],{},"All offsets belong to the current ",[58,256,257],{},"state.doc"," and must satisfy\n",[58,260,261],{},"0 ≤ from ≤ contentFrom ≤ contentTo ≤ to ≤ state.doc.length",". Optional\n",[58,264,265],{},"selectFrom\u002FselectTo"," must enclose ",[58,268,269],{},"from\u002Fto"," within the document. An invalid range throws\n",[58,272,273],{},"invalid-editing-boundary"," when the rule resolves. Return ",[58,276,72],{}," when syntax cannot be confirmed.",[279,280,281,296],"table",{},[282,283,284],"thead",{},[285,286,287,293],"tr",{},[288,289,290],"th",{},[58,291,292],{},"kind",[288,294,295],{},"Meaning and typical use",[297,298,299,310,320,330,340,353],"tbody",{},[285,300,301,307],{},[302,303,304],"td",{},[58,305,306],{},"style",[302,308,309],{},"Bold, emphasis, code, links and other inline formats with editable content inside paired shells",[285,311,312,317],{},[302,313,314],{},[58,315,316],{},"block",[302,318,319],{},"Code or containers; shell protection includes adjacent line breaks needed to retain structure",[285,321,322,327],{},[302,323,324],{},[58,325,326],{},"prefix",[302,328,329],{},"Heading, list or quote prefixes; the caret enters the content after the prefix",[285,331,332,337],{},[302,333,334],{},[58,335,336],{},"separator",[302,338,339],{},"Compressed structural gaps skipped by navigation; the product permits native deletion to join text",[285,341,342,347],{},[302,343,344],{},[58,345,346],{},"syntax",[302,348,349,350,352],{},"Table pipes or alignment rows; ",[58,351,265],{}," can identify the complete table",[285,354,355,360],{},[302,356,357],{},[58,358,359],{},"atom",[302,361,362],{},"Whole components or empty fences; the caret stays outside and deletion at an edge first selects the object",[10,364,365,368,369,372,373,376,377,380,381,384,385,388,389,392],{},[58,366,367],{},"navigation: 'content'"," is the default inline entry policy; ",[58,370,371],{},"split"," keeps both inside and outside\nstops. Blocks can explicitly declare ",[58,374,375],{},"content"," to clamp native line endpoints to their content,\nas table rows do for outer pipes. Horizontal arrows still skip duplicate stops, and deletion\nprotection is unchanged. Omitted block policies retain the default navigation across shells.\nCurrently ",[58,378,379],{},"navigation: 'native'"," opts the entire syntax rule out of the shared runtime,\nincluding input protection. ",[58,382,383],{},"deletion: 'unwrap'"," removes the full style or prefix at its relevant\nedge; ",[58,386,387],{},"protect"," retains the shell; ",[58,390,391],{},"deletion: 'native'"," delegates editing while keeping navigation\nrules. Declare the deletion policy explicitly. A complete owner selection permits whole removal;\npartial selections retain its shell.",[28,394],{"name":395},"EditingBoundary",[28,397],{"name":398},"EditingBoundaryKind",[248,400,402],{"id":401},"queries-and-priority","Queries and priority",[10,404,405,408,409,412],{},[58,406,407],{},"nodes"," names parser nodes. ",[58,410,411],{},"resolve"," is a pure query over current source: do not dispatch, retain\nold node offsets or infer positions from visible line counts. Navigation queries endpoints and\nancestors, and editing queries syntax intersecting the actual changes. Custom resolvers should\nkeep their work within those same bounds.",[10,414,415,416,418],{},"The first rule for each node in extension-priority order wins. Host overrides precede feature\ndefaults. Rules replace whole declarations rather than merging fields; returning ",[58,417,72],{}," opts\nthat syntax rule out without falling back to the next one. Materialized block components\nindependently contribute whole-object ranges, superseding syntax rules within them.",[10,420,421,422,425,426,429,430,433,434,436],{},"The default ",[58,423,424],{},"when: 'hidden'"," enables rules when presentation hides syntax globally. ",[58,427,428],{},"when: 'prose'","\nalso queries rules in Markdown editing. To protect unrevealed code or similar structures, first\ncheck the specific range through ",[58,431,432],{},"isSourceRevealed(state, node)"," and return ",[58,435,72],{}," when revealed.\nBoundary normalization is disabled in source mode and during composition.",[28,438],{"name":439},"EditingBoundaryRule",[28,441],{"name":442},"EditingBoundaryContext",[248,444,446],{"id":445},"installation-and-lifecycle","Installation and lifecycle",[10,448,449,450,452,453,456,457,460,461,464,465,468],{},"Ordinary features install automatically through ",[58,451,220],{},". Advanced CM integrations\ncan install ",[58,454,455],{},"editingBoundaries(rules)"," from ",[58,458,459],{},"addCodeMirrorExtensions()","; multiple installations\nreuse the same runtime. Empty ",[58,462,463],{},"rules"," returns an empty extension without uninstalling other\nfeatures' rules. MD Editor's ",[58,466,467],{},"editingBoundaries: []"," also retains defaults. Options are read on\ncreation; updating Vue props does not reinstall the rules.",[10,470,471],{},"Input protection plans complete changes before accepting the transaction, preserving annotations\nand mapping effects. Moving the caret neither writes source nor adds history. Explicit structure\ncommands, external document updates and history retain their own authority. Transactions that\nbypass filtering only receive selection recovery when needed, guarded by current state identity\nand disposal. Read-only mode does not accept text writes.",[28,473],{"name":224},[14,475,477],{"id":476},"block-owned-enter","Block-owned Enter",[10,479,480,481,483,484,486,487,490,491,493],{},"Declare syntax ownership with ",[58,482,245],{},"; see ",[22,485,25],{"href":24},". ",[58,488,489],{},"planBlockInput"," is the pure planner entry point. A ",[58,492,72],{}," result leaves native handling to the caller.",[28,495],{"name":496},"BlockInputRule",[28,498],{"name":499},"BlockInputContext",[28,501],{"name":502},"BlockInputTarget",[28,504],{"name":505},"BlockInputIntent",[28,507],{"name":508},"BlockInputResult",[28,510],{"name":511},"BlockInputHandler",[28,513],{"name":514},"BlockInputBehavior",[28,516],{"name":489},{"title":518,"searchDepth":519,"depth":519,"links":520},"",2,[521,522,523,524,525,526,527,528,529,530,531,537],{"id":16,"depth":519,"text":17},{"id":33,"depth":519,"text":34},{"id":43,"depth":519,"text":44},{"id":53,"depth":519,"text":54},{"id":102,"depth":519,"text":103},{"id":112,"depth":519,"text":113},{"id":122,"depth":519,"text":123},{"id":132,"depth":519,"text":133},{"id":147,"depth":519,"text":148},{"id":157,"depth":519,"text":158},{"id":213,"depth":519,"text":214,"children":532},[533,535,536],{"id":250,"depth":534,"text":251},3,{"id":401,"depth":534,"text":402},{"id":445,"depth":534,"text":446},{"id":476,"depth":519,"text":477},"Command drafts, rejection results, external edits and captured ranges.","md",[30,40,50,109,119,129,144,154],"en",{},true,"\u002Fen\u002Fapi\u002Fcommands","API reference",{"title":5,"description":538},"api\u002Fcommands.en","DGa2CKgaMe797LCXi7sF4EZzJulgP4U0JS2bl-wVJVY",1793046312820]