Support for Frame inside iframe / react-frame-component / react-styled-frame
See original GitHub issueI’d like to use Craft for a drag-and-drop React editor, where the preview is resizable to show responsive behavior.
I tried using react-styled-frame like this:
<Editor resolver={allComponents}>
<StyledFrame>
<Frame>
<Canvas>
<TextComponent text="Hello world" />
</Canvas>
</Frame>
</StyledFrame>
</Editor>
…but the drag-and-drop indicators show up in the wrong space, probably using the global window coordinates instead of the coordinates within the iframe.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Styled components are not rendering in React Iframe?
I've created a React Iframe (using 'react-frame-component'), and some styled components. When I try to render the styled components inside ...
Read more >Best practices for React iframes - LogRocket Blog
Short for inline frame, an iframe is essentially a frame within a frame. Using the <iframe/> tag, you can easily embed external content...
Read more >react-styled-frame - npm
React iframe that works well with styled-components.. Latest version: 1.1.0, last published: 4 years ago. Start using react-styled-frame in ...
Read more >react-styled-frame examples - CodeSandbox
Learn how to use react-styled-frame by viewing and forking example apps that make use of react-styled-frame on CodeSandbox. ; material-ui ; Inject styled...
Read more >Perfect iframe React component - clubmate.fi
Here's a cool iframe component that loads fast, is accessible, and easy on the eyes. I'm thinking the iframe (Inline Frame) should have...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, not sure if this could help, but I’m working to make it support iframes
https://github.com/prevwong/craft.js/pull/125
@ackvf Craft.js does not introduce additional markup/attributes (only the
draggable
attribute is added to the elements with thedrag
connector). You can still pass thejson
prop to preview the result and also set theenabled
prop tofalse
in the<Editor />
and that will disable all editing features, and remove thedraggable
attribute as well.