PHPackages                             evanshunt/carbon-fields-rich-text-no-media - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. evanshunt/carbon-fields-rich-text-no-media

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

evanshunt/carbon-fields-rich-text-no-media
==========================================

Carbon Fields extension, that adds a Rich Text field type with no media.

v1.2.0(5mo ago)01.7k[2 issues](https://github.com/evanshunt/carbon-fields-rich-text-no-media/issues)[6 PRs](https://github.com/evanshunt/carbon-fields-rich-text-no-media/pulls)GPL-2.0+JavaScriptCI failing

Since Mar 25Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/evanshunt/carbon-fields-rich-text-no-media)[ Packagist](https://packagist.org/packages/evanshunt/carbon-fields-rich-text-no-media)[ Docs](https://github.com/evanshunt/carbon-fields-rich-text-no-media)[ RSS](/packages/evanshunt-carbon-fields-rich-text-no-media/feed)WikiDiscussions master Synced yesterday

READMEChangelog (9)Dependencies (1)Versions (16)Used By (0)

Creating a new Carbon Field
===========================

[](#creating-a-new-carbon-field)

Step-by-step guide on how to create a new Carbon Field.

Introduction
------------

[](#introduction)

The [Carbon Fields](https://github.com/htmlburger/carbon-fields) library has many built-in fields, but you may find it necessary to define a new type of field for your specific project needs.

The following tutorial will explain how to create a custom Carbon Field.

### Step 1: Download the template

[](#step-1-download-the-template)

To make it as easy as possible, we have prepared a Carbon Field template that contains a frame for the PHP Carbon Field class and a webpack build process.

You can download the template from here:

Template Structure

- `/assets/css` - css folder
- `/assets/js` - JavaScript files folder
- `/languages` - folder for .po, .mo and .pot files
- `/core` - folder for all of your .php files
- `/field.php` - bootstrapping php code

### Step 2: Name your field

[](#step-2-name-your-field)

Replace the `YOURFIELDNAME` and `yourfieldname` (case sensitive) placeholders in all files. Also rename the files that contain the placeholders.

**NB!** If your field name contains multiple words, for example Image Gallery, your class names should look like this:

- **PHP class:** `Image_Gallery_Field`
- **React Component Registration:** `image_gallery` (refer to `registerFieldComponent`@`/assets/js/bootstrap.js`)

### Step 3: Build assets

[](#step-3-build-assets)

1. Edit `webpack.config.js` and make sure `const root` points to the directory where Carbon Fields are installed (e.g. `const root = path.resolve(__dirname, '../vendor/includes/htmlburger/carbon-fields');` )
2. Execute `npm install` in the root directory to install all build process requirements.
3. Execute `npm run build` to build the final minimized assets

##### Optional

[](#optional)

Execute `npm run dev` to continuously build assets during development. Note that you should add `define( 'SCRIPT_DEBUG', true );` to your `wp-config.php` file in order to load the files generated by the dev build process.

### Step 4: Customize

[](#step-4-customize)

Here is a quick overview of some of the methods you can customize:

#### PHP

[](#php)

`to_json()`

You can use this method to modify the field properties that are passed to the React component which represents the field.

`field_type_activated`

Used for initialization processes that are called once per field type (e.g. setup localization files).

`admin_enqueue_scripts()`

Used to enqueue CSS/JavaScript files.

`admin_init()`

Called for each field instance when the field is initialized. (back-end)

`init()`

Called for each field instance when the field is initialized. (back-end, front-end)

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance83

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~350 days

Recently: every ~612 days

Total

8

Last Release

151d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a53b5128191a72d106ed446d8c361ff66f163f564037a3adc05d126745a75289?d=identicon)[davejtoews](/maintainers/davejtoews)

![](https://www.gravatar.com/avatar/9771410446b7f3ffa84e9fa87891cb20828430853ef6cc74063a460a475be27b?d=identicon)[ehdeveloped](/maintainers/ehdeveloped)

---

Top Contributors

[![davejtoews](https://avatars.githubusercontent.com/u/9664035?v=4)](https://github.com/davejtoews "davejtoews (46 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (33 commits)")[![atanas-dev](https://avatars.githubusercontent.com/u/22746396?v=4)](https://github.com/atanas-dev "atanas-dev (9 commits)")[![tyxla](https://avatars.githubusercontent.com/u/8436925?v=4)](https://github.com/tyxla "tyxla (4 commits)")[![htmlburger-git](https://avatars.githubusercontent.com/u/1150772?v=4)](https://github.com/htmlburger-git "htmlburger-git (1 commits)")[![m1r0](https://avatars.githubusercontent.com/u/1612178?v=4)](https://github.com/m1r0 "m1r0 (1 commits)")

---

Tags

wordpresscarbon-fieldcarbon-fields-rich-text-no-media

### Embed Badge

![Health badge](/badges/evanshunt-carbon-fields-rich-text-no-media/health.svg)

```
[![Health](https://phpackages.com/badges/evanshunt-carbon-fields-rich-text-no-media/health.svg)](https://phpackages.com/packages/evanshunt-carbon-fields-rich-text-no-media)
```

###  Alternatives

[htmlburger/carbon-field-icon

Carbon Fields extension, that adds a Icon field type.

198.7k](/packages/htmlburger-carbon-field-icon)[iamntz/carbon-fields-urlpicker

Carbon Fields extension that adds a URL picker field type.

1438.6k](/packages/iamntz-carbon-fields-urlpicker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
