Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 2, 2024 02:14 am GMT

Embed Codes on Dev.to Using Liquid Syntax with Runner

Instead of images from carbon or using code highlighting there is one more interactive way to show the code with preview and code runner. So that people can also edit and see the results for satisfaction and clarity.

See Markdown behind this Post :-

{% embed https://... %}

Embed JavaScript

runkit

// hidden setup JavaScript code goes in this preamble areaconst hiddenVar = 42 // visible, reader-editable JavaScript code goes herelet i = 23;console.log(hiddenVar,i)

Embed Python

Stackblitz

Embed HTML

Glitch

Codepen

Alternatives - JSFiddle, JSitor...

Php/Typescript

Replit

Gist


Many of the services are allrounder like stackblitz, CodeSandbox and replit . So you can edit many programming languages

You can embed Python code or use it as a Python runner in the following platforms:

  • CodePen
  • CodeSandbox
  • GitHub Gist, Issue or Repository
  • Glitch
  • JSFiddle
  • JSitor
  • Kotlin (as a language, can be used for Python)
  • Medium (in articles or stories)
  • Next Tech
  • Reddit (in code blocks or posts)
  • Replit
  • StackBlitz
  • Stackery
  • Stack Exchange or Stack Overflow (for sharing code snippets)
  • Twitch (for live coding)
  • Twitter (in code blocks or tweets)
  • Wikipedia (in code examples or articles, although not a typical use case)

These platforms either support embedding Python code directly or can be used for running Python code in various contexts.

For more you can refer to Editor Guide

Follow me on GitHub :- https://github.com/SH20RAJ?tab=repositories


Original Link: https://dev.to/sh20raj/embed-codes-on-devto-using-liquid-syntax-with-runner-3hl4

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To