• Resolved Matteo

    (@matteofeduzi)


    Hi, I would like to use your plugin within an AJAX request.

    Practically I recall the article in a request AJAX proposes it according to the link (title of the article) selected in the bar on the left.

    https://monosnap.com/file/2p9RnzuIA6ww9lVeRy15c11z8Wt7zA

    I add the following code to make a test block work outside AJAX:

    <script type='text/javascript' src='https://areamembri.matteofeduzi.com/wp-content/cache/busting/1/wp-content/plugins/wp-codemirror-block/vendor/codemirror/lib/codemirror.min-5.40.2.js'></script>
    <script type='text/javascript'>var wpcm = {"plugin_url":"https://areamembri.matteofeduzi.com/wp-content/plugins/wp-codemirror-block","assets":[{"dir":"https://areamembri.matteofeduzi.com/wp-content/plugins/wp-codemirror-block/vendor/codemirror/lib/","css":"codemirror.min.css","async":true},{"dir":"https://areamembri.matteofeduzi.com/wp-content/plugins/wp-codemirror-block/assets/","js":"js/init.min.js?v=1579164927","css":"blocks/blocks.style.build.min.css","differ":true}],"options":{"output":{"button":false,"button_text":"Execute"}},"view":"public"}
    </script>
    <script type='text/javascript' src='https://areamembri.matteofeduzi.com/wp-content/cache/busting/1/wp-content/plugins/wp-codemirror-block/assets/js/autoLoadAssets.min-1579164927.js'></script>

    Unfortunately this does not work for the blocks contained in the articles within the AJAX request.

    How can I go about making the various scripts and css work in the AJAX request so that the blocks are read correctly?

    Thanks so much.

    • This topic was modified 4 years, 10 months ago by Matteo.
    • This topic was modified 4 years, 10 months ago by Matteo.
    • This topic was modified 4 years, 10 months ago by Jan Dembowski. Reason: Formatting

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘CodeMirror blocks in AJAX request’ is closed to new replies.