soderlind/gf-html-area-editor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

soderlind/gf-html-area-editor

Composer 安装命令:

composer require soderlind/gf-html-area-editor

包简介

Adds a rich text editor (TinyMCE) to the Gravity Forms HTML field content setting, replacing the default plain textarea.

README 文档

README

Adds a rich text editor (TinyMCE) to the Gravity Forms HTML field content setting, replacing the default plain textarea.

gf-html-area-editor.mp4

Description

By default, Gravity Forms provides a plain textarea for entering content in HTML fields. This plugin enhances that experience by replacing the textarea with the WordPress visual editor (TinyMCE), allowing you to:

  • Use a familiar WYSIWYG interface for formatting content
  • Easily add bold, italic, lists, and other formatting
  • Insert links with the built-in link dialog
  • Add images from the WordPress Media Library
  • Switch between Visual and Text (HTML) modes

Requirements

  • WordPress 5.0 or higher
  • Gravity Forms 2.5 or higher
  • PHP 7.4 or higher

Installation

  1. Download gf-html-area-editor.zip
  2. Upload via Plugins → Add New → Upload Plugin
  3. Activate via WordPress Admin → Plugins

Plugin updates are handled automatically via GitHub. No need to manually download and install updates.

Usage

  1. Navigate to FormsEdit Form in your WordPress admin
  2. Add or select an HTML field
  3. In the field settings, you'll see a rich text editor instead of the plain textarea
  4. Use the Visual tab for WYSIWYG editing or the Text tab for raw HTML
  5. Content is automatically saved and sanitized when displayed on the frontend

Security

The plugin sanitizes all HTML field content on the frontend using WordPress's wp_kses() function. The following HTML elements are allowed:

  • Text formatting: <p>, <br>, <strong>, <b>, <em>, <i>
  • Headings: <h2>, <h3>, <h4>, <h5>, <h6>
  • Lists: <ul>, <ol>, <li>
  • Links: <a> (with href, title, target, rel attributes)
  • Images: <img> (with src, alt, title, width, height, class attributes)

Development

Running Tests

# PHP tests
composer install
composer test

# JavaScript tests
npm install
npm run test:js

Credits

Inspiered by the work of Gravity Wiz- Rich Text HTML Fields.

License

GPL-2.0-or-later

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-01-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固