Display HTML in plugin "Visual Element"

Hello! I am developing a plugin for materialized elements. The material element that will be usable will be displayed through html as a visual element, so that for example, “When material button=clicked, go to page” Is it possible to display html on a visual element in the plugin editor?

Thanks for the help in advance.
-Whitigol

I don’t know if it was what your were looking for. But I had some issues with that. I just found a way to display large html code, so I post it here maybe it can save someone time.

First you have to save a separated file with the html you want to display.

In your element code you add this :

<script> 
$(function(){
  $("#myHtmlFile").load("yourUrl"); 
});
</script> 

And in the fonction initialize :

function(instance, context) {

var myVisual = $('<div id="myHtmlFile"> </div>');
instance.canvas.append(myVisual);

}
2 Likes