Tohuhono / Oberon

https://oberon-tohuhono.vercel.app
MIT License
15 stars 2 forks source link

Works differently than in edit demo #218

Open aliaksandr-yanchuk opened 3 days ago

aliaksandr-yanchuk commented 3 days ago

Sorry but looks like at least on latest version of puck works not like expected. Trying it in the context of create-react-app, not next.js Start text is very small and I don't see rich text actions in context popup menu, what could be the problem? スクリーンショット 2024-11-27 205504

4leite commented 3 days ago

Happy to have a look, can you post a minimal reproduction please?

aliaksandr-yanchuk commented 3 days ago

Actually in clean sandbox for react 18 works without problems, so maybe it clashes with configuration for my app, which is private and hard to show as reproduction context. Wonder what it might be, what can block context buttons from appearing? Maybe some webpack configuration..

aliaksandr-yanchuk commented 3 days ago

Was able to fix it disabling iframe setting in Puck. Wondering why iframe was failing it though

4leite commented 2 days ago

This component was written before the actions override existed in puck. Consequently it has a fairly hacky and brittle css selector to target the actions, which is probably what broke. see: https://github.com/Tohuhono/Oberon/blob/5a899cd1797914ecec2f99c89351f3c780ecbe94/packages/tohuhono/puck-rich-text/src/rich-text-editor/lexical/utils/get-toolbar-portal.ts

aliaksandr-yanchuk commented 2 days ago

Thanks for finding out! I think it matches explanation of problem I've found perfectly