Hacker News new | ask | show | jobs
by superfrank 915 days ago
That's not really the question I was asking. Most WYSIWYG's that I've used in the past are built around the idea that you can use them over and over. I'm thinking of things like Wix and Squarespace or even all the way back to Microsoft Frontpage.

My question is more focused on the idea that at some point there will be something that I need to do that can't be done through the WYSIWYG editor. I'm wondering what happens in that use case. Can I open up VS code and start changing the underlying code myself? If so how does the tool maintain those changes through iterations and how maintainable is the code that Plasmic generates?

My concern comes from the fact that I've used some of these tools in the past and the code they spit out will have things like 8 levels of nested divs for no reason, empty tags, and inlined and !important styles all over the place. I'm not saying Plasmic will do that, but I'm wondering if anyone who has used this can say how good or bad the generated code actually is.

2 comments

The main way to extend Plasmic is to use your own React code components. So if there's something you can't achieve with our editor, you can make a component that does it, and use it in the design. An alternative way is to use the Plasmic components that we generate, which expose a lot of hooks that lets you instrument the props and rendered content within the component, without having to edit the generated component code itself. It is our explicit goal that you never need to edit the Plasmic-generated code in order to extend it to do what you want.

As for the actually generated code, it basically maps to what you've created yourself in the studio. Plasmic does have a styling / element abstraction, but it's fairly low-level, and everything is pretty close to how you'd write a React component yourself. If you're not creating empty divs in the editor, you shouldn't see empty divs in the generated code :-)

You can also take a look here! https://github.com/plasmicapp/plasmic/tree/master/platform/w...

This is Plasmic-generated code that we ourselves use to build our visual editor.