Code element need to click the render button to update data. If you make some change and don’t render the code the code is not saved…
Which Bricks version are you running?
And what do you mean by “the code is not saved”? Can you provide a screen record or something?
Clicking the “run code” icon (or using the shortcut cmd/ctrl + R) is required to run/update your code on the canvas, so this is not a bug.
Please see the related Academy Article.
To run/execute the code in the builder, enable the “Execute Code” setting, then click the “Reload” icon at the top-right of the code editor once you’ve finished adding your code.
Sorry, I’m running beta version 1.3.7
By “the code is not saved” I mean that if I change the content of the code (without rendering the canvas) and click “save” button, then come back to the code and the code I was written is not there.
Imagine that I already have the code rendered but I want to change some part.
What is expected:
→ change the content of the code → click save button → the code is saved (I don’t click reload because I know the code is right, or whatever)
what is happening
–>change the content of the code → click save button → the code is NOT saved on the DB
Do you understand?
Aaaah ok, now I got it
The code is saved only after it has been executed. As I said, this is the expected behavior and is also described in the Academy. If you do this in e.g., Bricks 1.3.6, the behavior is the same.
Using the shortcode to render the code (cmd/ctrl + R) and the shortcode to save it (cmd/ctrl + S) is pretty easy, don’t you think?
I agree completely with @salwebs here…having to remember to press Cmd+R or risk losing all changes as soon as another element is selected sucks. Sometimes, I’ll add a bunch of code that takes 15-20 minutes, and losing all that is pretty devastating. It should save the contents of the field automatically.
I also agree with this. I found this out the hard way Of course I didn’t look in the academy, how hard could it be to insert some custom code, right?
I understand it’s “easy”, but here the problem is probably for advanced users that need some speed and better UX in that case. For example, editing code in the css input behaves different from php, or html. This hasn’t a common sense in my opinion. And is not intuitive.
I changed from Oxygen Builder because of the slowly builder. I like your product, but this kind of small things can make move from one product to another. And probably there are more people like me. Maybe I’m not your target, so here there is no discussion. But if I can be, I think you should consider it.