This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Rafael Lüder
Posted Oct 30 - Read on Facebook

What would be the best way of loading a html snippet from an external html file inside of a layer? Something like:

myTable = new Layer
myTable.snippet = "snippets/table.html"

The snippet would have all the html and css needed to structure and style the table (layer.snippet obviously doesn't exist).

Another solution would be to turn the html snippets into images with something like http://html2canvas.hertzen.com/ and then simply use layer.image to load the generated image inside the layer.

I'm probably over thinking things but the main idea is to quickly structure and style elements using html and css (using bootstrap, polymer, etc.) instead of having to create them on Photoshop or Sketch first.

It'd also keep the .js file clean by avoiding the inline html that might get quite complex for anything more than a simple div.

Thoughts? :)

1 Comments

Koen Bok

I would say an iframe.

Read the entire post on Facebook