how to embed html5 into website via plugin?

I’m trying to embed an html/javascript application into my website. I do this my first time and bought an with a bit of description how to do it. I thought it’s easier but I don’t get it to work.

That’s the tutorial that comes with the app: https://support.vebto.com/help-center/articles/10/13/50/getting-started

What I did to embed it was creating a new plugin folder in FDP-Manager. And put all the Plugin-Files in it, like described. And made a .php file, in which I defined a shortcode, so I can place the app wherever I want on my webpage. Underneath I put the code, which they provide for embedding the plugin. My code firist:

 <?php
    /**
    * Plugin Name: My_first_embed
    * Plugin URI: http://www.my_first_embed.doesntmatter
    * Description: My_first_embed
    * Version: 1.0
    * Author: Me
    * Author URI:
    **/
    ?>
    add_shortcode( ‘shortcode_name’, function () {
    
    $out = ‘<p>[editor]</p>’;
    
    return $out;
    } );
    add_action( ‘wp_head’, function () { ?>
    <script>
    
    <html>
    <head>
    <link rel=”stylesheet” href=”pixie/styles.min.css”>
    </head>
    <body>
    <pixie-editor></pixie-editor>
    ​
    <script src=”pixie/scripts.min.js”></script>
    ​
    <script>
    var pixie = new Pixie({
    onLoad: function() {
    console.log(‘Pixie is ready’);
    }
    });
    </script>
    </body>
    </html>

First, the plugin worked, but it was not loading, then I changed the code too because I thought that it should be enough... but it didn’t work either:

    <pixie-editor></pixie-editor>
    ​
    <script src=”pixie/scripts.min.js”></script>
    ​
    <script>
    var pixie = new Pixie({
    onLoad: function() {
    console.log(‘Pixie is ready’);
    }
    });
    </script>​

So any suggestions? 🙂 I appreciate every contribution!

thank you! cheers



Read more here: https://stackoverflow.com/questions/66336200/how-to-embed-html5-into-website-via-plugin

Content Attribution

This content was originally published by huronsen at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: