Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > extendify > src > > Draft > hooks
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
useCompletion.js | File | 1407 bytes | March 04 2024 10:54:28. | |
useContentHighlight.js | File | 705 bytes | October 11 2023 06:07:34. | |
useRouter.js | File | 2948 bytes | August 28 2024 19:51:40. | |
useSelectedText.js | File | 683 bytes | March 04 2024 10:54:28. | |
useUnsplashImages.js | File | 650 bytes | May 19 2025 16:47:28. |
import { store as blockEditorStore } from '@wordpress/block-editor'; import { useSelect } from '@wordpress/data'; import { useCallback } from '@wordpress/element'; export const useSelectedText = () => { const { getSelectedBlockClientIds, getBlocksByClientId } = useSelect( (select) => select(blockEditorStore), [], ); const selectedBlockId = getSelectedBlockClientIds(); const getSelectedContent = useCallback(() => { const selectedBlocks = getBlocksByClientId(selectedBlockId); return selectedBlocks .map(({ attributes }) => attributes.content) .join('\n\n'); }, [getBlocksByClientId, selectedBlockId]); return { selectedText: getSelectedContent(), }; };
SILENT KILLER Tool