Support » Plugin: CodeMirror Blocks » How to add a button for executing the code blocks for the user

  • Resolved Danstano

    (@danstano)


    How do you add a button for executing the code blocks for the user to see what happens when they change the code from the frontend? Something that just runs the changes but doesn’t save the code. Like most web-based code editors. Any ideas? Very helpful plugin!

    • This topic was modified 1 year, 2 months ago by Danstano.
    • This topic was modified 1 year, 2 months ago by Danstano.
    • This topic was modified 1 year, 2 months ago by Danstano.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Vicky Agravat

    (@vickyagravat)

    Hello @danstano

    Very good suggestion.

    Yes, it is possible to run HTML, JS, CSS type code run directly on browser.

    But, Other Languages programs such as C, C++, JAVA, Python, etc. needs compiler to execute their code. So, we need additional compiler API to execute code.

    It is not big deal to add button to execute code.
    Actually i thought about it. but some code executes and some not (just because it needs compiler), people think it is a buggy plugin.

    So, i have not implemented it.

    But, i definitely looking forward to add this functionality, with help of third party API compiler.

    But, if you want to run just html, js and css i will provide solution very soon.

    Thank you.

    Adding this functionality for HTML CSS and JavaScript alone will be a lifesaver even as we figure out about incorporating the compiler API others in the future. Please go ahead, the plugin will become essential for people like me who wish to execute code from the WordPress frontend for user tutorials/learning purposes. Thank you!

    I have seent the same functionality on your site at https://tutorialink.com. Works well. šŸ™‚

    Plugin Author Vicky Agravat

    (@vickyagravat)

    Hey @danstano

    Now Update the Plugin (1.1.0).
    It have Execute button on Front-end (having HTML, JS, or CSS) type of code block.
    Just enable it on CodeMirror Blocks settings page and Enable Execution Button
    Enjoy.

    I am glad and thankful for working on the suggestion and that you found it actually meaningful to include it in the plugin. Can’t wait! I’ll let you know ASAP. Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to add a button for executing the code blocks for the user’ is closed to new replies.