Sign in

Insert javascript in a post?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #454
    Harald Krause

    How can I insert a  javascript into a post? It gets automatically marked with <![CDATA[ and then not executed on the rendered page.

    #455
    ajeet

     

    I think it’s like this:


    <script>
    window.addEventListener("load", () => {
    flyingPages({
    delay: 0,
    ignoreKeywords: [],
    maxRPS: 3,
    hoverDelay: 50
    });
    });
    </script>

     

    #459
    BobBob
    Support

    Hi Harald,

    Consider injecting the code with a custom HTML tool; this is a better solution than paste it into the post.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #460
    Harald Krause

    Will do that. However this would also be a nice feature to have for certain cases..

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Insert javascript in a post?’ is closed to new replies.