# extendify/3.0.6/src/Agent/workflows/block-selector/tools/get-block-content.js

Extendify, version 3.0.6. 12 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.0.6/code/src/Agent/workflows/block-selector/tools/get-block-content.js
- Raw: https://pluginprobe.com/plugins/extendify/3.0.6/raw/src/Agent/workflows/block-selector/tools/get-block-content.js
- Modified: 2026-02-18T22:27:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.0.6/code/src/Agent/workflows/block-selector/tools/get-block-content.js#L10-L20`.

```javascript
import { useWorkflowStore } from '@agent/state/workflows';
import apiFetch from '@wordpress/api-fetch';

export default async () => {
	const { block } = useWorkflowStore.getState();
	const { postId } = window.extAgentData.context;
	const response = await apiFetch({
		path: `/extendify/v1/agent/get-block-code?postId=${postId}&blockId=${block.id}`,
	});
	return { previousContent: response?.block ?? '' };
};

```
