Skip to content

Commit

Permalink
select block whenever it is clicked on navtree
Browse files Browse the repository at this point in the history
  • Loading branch information
MAX-786 committed Jun 29, 2024
1 parent d87c10e commit 73661d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/volto-hydra/src/components/Iframe/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ const Iframe = (props) => {
},
],
});
useEffect(() => {
document
.getElementById('previewIframe')
.contentWindow.postMessage(
{ type: 'SELECT_BLOCK', uid: selectedBlock },
'*',
);
}, [selectedBlock]);
//-------------------------

const [url, setUrl] = useState('');
Expand Down

0 comments on commit 73661d6

Please sign in to comment.