定制 linkrobins/markdown-widget 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

linkrobins/markdown-widget

最新稳定版本:v1.0.0

Composer 安装命令:

composer require linkrobins/markdown-widget

包简介

Markdown widget for fof/forum-widgets-core

README 文档

README

A simple Markdown widget for Flarum 2.0, built as a widget for fof/forum-widgets-core. Same skeleton as linkrobins/html-widget, with a Markdown renderer in front of the body.

What it does

Adds one configurable Markdown widget to the FoF Forum Widgets placement editor. Admin sets:

  • Title — optional, shown above the body
  • Icon — FontAwesome class (e.g. fab fa-markdown)
  • Markdown body — standard GitHub-flavored Markdown, rendered to HTML on the client

Drag and place it from the FoF Forum Widgets admin page like any other widget.

Requirements

  • Flarum 2.0 or later
  • fof/forum-widgets-core installed and enabled
  • Browser must be able to load cdnjs.cloudflare.com — the Markdown renderer (marked.js) is loaded from CDN at runtime

Installation

composer require linkrobins/markdown-widget
php flarum cache:clear

In Flarum admin → Extensions, find Link Robins Markdown under the Forum Widgets category and enable it. Configure title/icon/body, then go to FoF Forum Widgets settings and place it where you want it.

Markdown features

Supports the full Markdown syntax that marked.js handles, including:

  • Headings (# H1, ## H2, ...)
  • Bold (**bold**) and italic (*italic*)
  • Lists (ordered and unordered)
  • Links and images
  • Code spans and fenced code blocks
  • Blockquotes
  • Tables (GFM)
  • Horizontal rules
  • Inline HTML (passes through unchanged)

The widget styles headings, lists, code, blockquotes, and tables to fit cleanly in any placement.

Security note

The body is rendered without sanitization — inline HTML in the Markdown source will run on the forum, including any <script> or <iframe> tags. Only enable this extension if you trust everyone with admin access.

License

MIT

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固