Support » Plugin: Prismatic » Re-initialize after page load?

  • Resolved Dan Kirshner

    (@dan-kirshner)


    My WP site/plugin loads/decodes some text via JavaScript *after* the page loads. It appears the prismatic doesn’t “see” those; code within tags that’s present at page load is formatted nicely (broken up into spans for tokens), but the same code loaded later is touched only partially (there’s just one span class=”token class-name” for a whole line of code).

    Is there some way to tell prismatic to do it’s thing at a later time (that is, after text is in place/decoded)?

    Thanks much!

    –Dan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Interesting idea but not something the plugin can do at this time. The reason is because the plugin relies on the post content hook to parse and escape, etc. So no current way to do all of that after the page has loaded.

    Let me know if I can provide any more infos, glad to help anytime.

    • This reply was modified 1 month, 2 weeks ago by Jeff Starr.
    Thread Starter Dan Kirshner

    (@dan-kirshner)

    OK, thanks. I found what I needed in the prism.js API: Prism.highlightAll () invokes the processing I need. I can programmatically call that when I need. Haven’t looked for the highlight.js equivalent…

    Plugin Author Jeff Starr

    (@specialk)

    Ah, interesting. I had not thought of that, thank you for sharing the infos. It may be useful to other users.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.