[WordPress] 外掛分享: Create with Code

首頁外掛目錄 › Create with Code
WordPress 外掛 Create with Code 的封面圖片
400+
安裝啟用
★★★★
4.2/5 分(5 則評價)
455 天前
最後更新
問題解決
WordPress 3.2+ v1.4 上架:2017-09-07

內容簡介

create.withcode.uk 讓您在瀏覽器中寫、運行、調試和分享 Python 代碼。此外掛可讓您快速在 WordPress 網站中嵌入您的代碼項目。

當您從 create.withcode.uk 分享項目時,您會得到像這樣的 URL:https://create.withcode.uk/embed/3C 或 https://create.withcode.uk/run/3C

複製 URL 中的最後一部分並在簡碼中使用它以在 WordPress 網站中嵌入它:

[withcode id="3C"]

您可以使用 mode 屬性自訂要顯示代碼或運行代碼的方式:

[withcode id="3C" mode="embed"]

[withcode id="3C" mode="run"]

您也可以指定代碼片段的高度/寬度:

[withcode id="3C" mode="embed" width="400px" height="600px"]

您可以透過將工具欄圖標上的所有顏色旋轉指定的色調值來自定義顏色方案:
[withcode id=”3C” hue=”45″]

或者您可以將工具欄圖標變成灰階:
[withcode id=”3C” grey=”1″]

請注意:

此外掛只能讓您在 WordPress 網站中嵌入從 create.withcode.uk 複製的 Python 代碼。
您可以通過按 Ctrl + Enter 運行整個程序,或按 Ctrl + Space 一行一行運行代碼,在 iframe 中在網站上運行 Python 代碼。
Python 代碼在客戶端瀏覽器中解釋和運行:它不在您的服務器上運行,並且只支持 Python 語言的受封閉保護的子集。
此功能的設計目的是作為教學和學習輔助工具,而不是一個完全成熟的專業開發工具。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Create with Code」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

create.withcode.uk lets you write, run, debug and share python code in your browser. This plugin lets you quickly embed your code projects in your wordpress site
When you share a project from create.withcode.uk, you get a URL like: https://create.withcode.uk/embed/3C or https://create.withcode.uk/run/3C
Take the last section of the URL and use it in the shortcode to embed it in your wordpress site:
[withcode id="3C"]

You can customise choose to display the code or run it using the mode attribute:
[withcode id="3C" mode="embed"]

or
[withcode id="3C" mode="run"]

You can also specifiy the height / width of the code snippet:
[withcode id="3C" mode="embed" width="400px" height="600px"]

You can customise the colour scheme by rotating all the colours on the toolbar icons by a hue value:
[withcode id=”3C” hue=”45″]
Or you can make the toolbar icons greyscale as follows:
[withcode id=”3C” grey=”1″]
Please note:
This plugin just lets you embed python code from create.withcode.uk in a wordpress site.
The python code can be run in an iframe in your site by pressing Ctrl + Enter to run the whole program or Ctrl + Space to run one line at a time.
Python code is interpreted and run in the client’s browser: it doesn’t run on your server and it only supports a sandboxed subset of the fully python language.
This is designed as a teaching and learning aid rather than a fully fledged professional development tool.

延伸相關外掛

文章
Filter
Mastodon