[WordPress] 外掛分享: Create with Code

WordPress 外掛 Create with Code 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Create with Code」是 2017-09-07 上架。
  • 目前有 500 個安裝啟用數。
  • 上一次更新是 2024-12-19,距離現在已有 136 天。
  • 外掛最低要求 WordPress 3.2 以上版本才可以安裝。
  • 有 4 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

pddring |

外掛標籤

cs | code | python | computing | createwithcode |

內容簡介

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 語言的受封閉保護的子集。
此功能的設計目的是作為教學和學習輔助工具,而不是一個完全成熟的專業開發工具。

原文外掛簡介

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.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Create with Code」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.1 | 1.2 | 1.4 |

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon