Add custom CSS field to elements
Jakub Pomykała
open
Jakub Pomykała
Hey Kyle Bahr and Carve
I hope you both are doing well. I just realised that you both are not talking about the "HTML Editor" (HTML + CSS) but about Canvas editor (this nice one with components and visual editor).
Currently, there is no easy option to add custom CSS support to the Canvas Editor as it uses completely different technology under the hood that doesn't support a such thing.
BUT, a long time ago, I started implementing a new Canvas editor with HTML/CSS/Video support. It looks and behaves nearly the same as the original version. I've never finished it in 100% as everyone seems to be happy with the existing solution, and there are still some things to improve.
You can test it right now:
- Go to: https://renderform.io/console/templates/
- Open developer console and paste: 'localStorage.setItem("beta", true);' and click enter.
- Refresh the page and you should be able to see "Canvas editor (beta)" from the editor selector.
If you are interested in helping me with making it better, help me find all the issues or propose new ideas, feel free to reach me out via email (jakub@renderform.io). or you can post your feedback here.
K
Kyle Bahr
You mean giving each layer / element in a RenderForm template a CSS class/ID - and then a CSS editor/field to style the items within the template?
Interesting...
Jakub Pomykała
If you could ensure the CSS field supports the ability to define {{merge_fields}} that could then be passed in the JSON payload to render the template, that would be ideal.
.my_element_css {
width: {{merge_field_width}},
color: {{merge_field_color}},
}
Payload:
{
"template": "<TEMPLATE_ID>",
"data": {
"merge_field_width": "100%",
"merge_field_color": "#ff0000"
"image-component.src": "https://my-blog.com/my-image.jpg"
}
}
Jakub Pomykała
in progress
Thanks, it's a very good idea and would greatly benefit power users.