REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.69 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/Draft/components/SelectedText.jsx
Text
Base64
import { useSelectedText } from '@draft/hooks/useSelectedText'; import { store as blockEditorStore } from '@wordpress/block-editor'; import { Button } from '@wordpress/components'; import { useDispatch } from '@wordpress/data'; import { useEffect, useState } from '@wordpress/element'; import { __, isRTL } from '@wordpress/i18n'; import { Icon, pencil, trash } from '@wordpress/icons'; export const SelectedText = ({ loading }) => { const [text, setText] = useState(); const { clearSelectedBlock } = useDispatch(blockEditorStore); const { selectedText } = useSelectedText(); useEffect(() => { setText(selectedText); }, [setText, selectedText]); if (!text) return; const truncatedText = () => { const preformat = text.split(' '); if (preformat.length <= 20) return text; return `${text.split(' ', 14).join(' ')}... ${text.slice( text.lastIndexOf(' ') - 14, )}`; }; return ( <div className="mb-4 flex space-x-2 overflow-hidden rounded-xs border-none bg-gray-100 p-3" data-test="existing-text-container" > <div> <Icon icon={pencil} className="fill-current" /> </div> <div> <div className="mb-1 hyphens-auto text-pretty text-gray-800" dangerouslySetInnerHTML={{ __html: truncatedText(), }} /> <div className="mt-3 flex w-full justify-end"> <Button size="compact" onClick={clearSelectedBlock} disabled={loading} icon={trash} iconPosition={isRTL() ? 'right' : 'left'} className="relative flex-row-reverse rounded-sm bg-gray-300 text-gray-800 hover:bg-gray-400" data-test="remove-selection" > {__('Remove selection', 'extendify-local')} </Button> </div> </div> </div> ); };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 11
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
image-generation
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
stock-images
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Completion.jsx
616 B
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ConsentSidebar.jsx
769 B
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DraftMenu.jsx
1.22 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DynamicTextarea.jsx
2.15 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EditMenu.jsx
2.36 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
GenerateImageButtons.jsx
5.11 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Input.jsx
2.52 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InsertMenu.jsx
7.46 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SelectedText.jsx
1.69 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ToolbarMenu.jsx
5.04 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TranslationDropdown.jsx
6.34 KB
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).