Is it possible to add custom attributes to UI objects?


#1

I am trying to use vue.js together with blocs.
Works kind of ok if I enter the needed code in the page footer - but I also need to add custom attributes in order to bind Vue properties to UI objects.

For example, in order to link a button to the underlying Vue model I’d need to do something like

Reverse Message

But the only way I have found to achieve this is to use a custom HTML object… which works. But I also loose lots of the nice features offered by the blocs software.

So: is there a way to add custom attributes such as the “v-on:click” above?

More info on vue.js here: https://vuejs.org/v2/guide/index.html


#2

Did you find a good solution for this? I’d like to do the same thing, but so far the best solution I can think of is to create the design in Blocs and then export the project to HTML. At that point, the source can be modified in an IDE, but you lose the ability to go back into Blocs and make design changes.

It would be nice to nice to be able to round-trip the design, but I don’t see how that can work right now.


#3

No, didn’t find a way to do this in blocs.

I am now using blocs for the basic layout/design (which it does very nicely), then doing massive additional tweaks by hand.
Works, but it’s a pain if I need to add additional pages etc to the site…


#4

It’s good to see an influx of advanced minded users descending upon Blocs.

I think it will help advance the app in areas such as this where there is no clear present avenue of execution for common tasks and requirements of various libraries. This is just one good clear example of that.

There are quite a few useful libraries that require data binding and attributes (among other things). Hopefully these abilities can be included into Blocs, to help lesson the need to orphan the Blocs file from the development cycle, with requiring post edits.