diff --git a/packages/editor/api/api.json b/packages/editor/api/api.json index d6c01d768..6945f077c 100644 --- a/packages/editor/api/api.json +++ b/packages/editor/api/api.json @@ -7947,7 +7947,7 @@ { "kind": "Method", "canonicalReference": "@tldraw/editor!Editor#batch:member(1)", - "docComment": "/**\n * Run a function in a batch, which will be undone/redone as a single action.\n *\n * @example\n * ```ts\n * editor.batch(() => {\n * \teditor.selectAll()\n * \teditor.deleteShapes(editor.getSelectedShapeIds())\n * \teditor.createShapes(myShapes)\n * \teditor.selectNone()\n * })\n *\n * editor.undo() // will undo all of the above\n * ```\n *\n * @public\n */\n", + "docComment": "/**\n * Run a function in a batch.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index df7df0c50..4f1b12f72 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -885,19 +885,7 @@ export class Editor extends EventEmitter { } /** - * Run a function in a batch, which will be undone/redone as a single action. - * - * @example - * ```ts - * editor.batch(() => { - * editor.selectAll() - * editor.deleteShapes(editor.getSelectedShapeIds()) - * editor.createShapes(myShapes) - * editor.selectNone() - * }) - * - * editor.undo() // will undo all of the above - * ``` + * Run a function in a batch. * * @public */