PHPackages                             open-php/seditor - 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. [Templating &amp; Views](/categories/templating)
4. /
5. open-php/seditor

ActiveLibrary[Templating &amp; Views](/categories/templating)

open-php/seditor
================

SEditor - A lightweight, dynamic, and dependency-free WYSIWYG editor for PHP applications.

1.0.7(3mo ago)010MITJavaScriptPHP &gt;=5.6.0

Since Feb 5Pushed 3mo agoCompare

[ Source](https://github.com/mrsandipmandal/seditor)[ Packagist](https://packagist.org/packages/open-php/seditor)[ Docs](https://github.com/mrsandipmandal/seditor.git)[ RSS](/packages/open-php-seditor/feed)WikiDiscussions master Synced 1mo ago

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

SEditor (Open PHP)
==================

[](#seditor-open-php)

[![Latest Stable Version](https://camo.githubusercontent.com/14a320479a822606a5a1a0c084bc687b7b94ff95a909cc6812aa315a98bfd26e/68747470733a2f2f706f7365722e707567782e6f72672f6f70656e2d7068702f73656469746f722f762f737461626c65)](https://packagist.org/packages/open-php/seditor)[![Total Downloads](https://camo.githubusercontent.com/f75915680a7d6c24cb277e119c893a1b523e55d7f2052f12c86a67b79fe89e8d/68747470733a2f2f706f7365722e707567782e6f72672f6f70656e2d7068702f73656469746f722f646f776e6c6f616473)](https://packagist.org/packages/open-php/seditor)[![License](https://camo.githubusercontent.com/83e9ab1cfc2d246e06a8366f7693ba36fc017173b789a890fa7c668e6f8127e3/68747470733a2f2f706f7365722e707567782e6f72672f6f70656e2d7068702f73656469746f722f6c6963656e7365)](https://packagist.org/packages/open-php/seditor)

**SEditor** is a lightweight, dependency-free WYSIWYG editor for PHP applications. It handles rich text editing, form synchronization, and asset management seamlessly.

---

Features
--------

[](#features)

✅ **Zero Dependencies** — Built with pure Vanilla JS &amp; CSS. No jQuery required.
✅ **Laravel Integration** — Includes ServiceProvider for auto-discovery and asset publishing.
✅ **Core PHP Support** — Simple command to publish assets in non-framework projects.
✅ **Form Sync** — Automatically updates hidden `` for seamless form submission.
✅ **Document Mode** — Special A4 page interface for document-style editing.
✅ **Page Breaks** — Insert print-friendly page breaks.
✅ **Rich Tools** — Tables, Images, Links, Colors, and Typography controls.

---

Installation
------------

[](#installation)

### Prerequisites

[](#prerequisites)

- PHP 5.6 or higher
- Composer

### Method 1: Composer (Recommended)

[](#method-1-composer-recommended)

1. **Install the package:**

    ```
    composer require open-php/seditor
    ```
2. **Publish Assets:**

    **For Laravel:**

    ```
    php artisan vendor:publish --tag=seditor-assets
    ```

    **For Core PHP:**

    ```
    composer run publish-assets
    ```
3. **Link Assets:**Add just the script to your HTML (it will auto-load the CSS):

    ```

    ```

### Method 2: Manual Download

[](#method-2-manual-download)

1. Download this repository.
2. Copy `assets/seditor.js` and `assets/seditor.css` to your project.
3. Include the script in your HTML.

---

Quick Start
-----------

[](#quick-start)

### 1. Create the Form

[](#1-create-the-form)

Use a standard textarea. SEditor will hide it and use it to store the final HTML.

```

    Save Content

```

### 2. Initialize SEditor

[](#2-initialize-seditor)

Add the script at the bottom of your page.

```

    // Initialize with default options
    const editor = SEditor.create('#my-editor');

    // OR Initialize with custom placeholder
    /*
    const editor = SEditor.create('#my-editor', {
        placeholder: 'Start writing your story...',
    });
    */

```

### 3. Edit Mode (Loading Content)

[](#3-edit-mode-loading-content)

To load existing data (e.g., from a database), simply put it inside the textarea.

```

    This is existing content loaded from the database.
    SEditor will automatically pick it up!

```

### 4. Setting/Getting Content Programmatically

[](#4-settinggetting-content-programmatically)

You can also control the content via JavaScript:

```
const editor = SEditor.create('#my-editor');

// Set Content
editor.setValue('Hello World!');

// Get Content
const content = editor.getValue();
console.log(content);
```

---

Configuration
-------------

[](#configuration)

You can pass an options object to `SEditor.create()`.

OptionTypeDefaultDescription`placeholder`String`''`Text to show when the editor is empty.`mode`String`'classic'``'classic'` (fluid width) or `'document'` (A4 page style).`toolbar`Array`null`Custom array of toolbar groups.### Custom Toolbar Example

[](#custom-toolbar-example)

```
SEditor.create('#my-editor', {
    mode: 'document',
    toolbar: [
        { type: 'group', items: [{ icon: 'bold', cmd: 'bold' }, { icon: 'italic', cmd: 'italic' }] },
        { type: 'group', items: [{ icon: 'image', action: () => alert('Custom Action') }] }
    ]
});
```

---

Contributing
------------

[](#contributing)

- **Source**:
- **Author**: Sandip Mandal ([mr\_sandip@zohomail.in](mailto:mr_sandip@zohomail.in))

License
-------

[](#license)

MIT License

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance82

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~1 days

Total

8

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1cfba1cdaaab95e40cfe363c3cd258c77ab78c5bf3fc26112e4b7a8d971565b5?d=identicon)[mrsandipmandal](/maintainers/mrsandipmandal)

---

Top Contributors

[![mrsandipmandal](https://avatars.githubusercontent.com/u/75414705?v=4)](https://github.com/mrsandipmandal "mrsandipmandal (30 commits)")

---

Tags

laraveluicomponentsbladeeditorbootstrapwysiwygcompactseditoropen-php

### Embed Badge

![Health badge](/badges/open-php-seditor/health.svg)

```
[![Health](https://phpackages.com/badges/open-php-seditor/health.svg)](https://phpackages.com/packages/open-php-seditor)
```

###  Alternatives

[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[area17/blast

Storybook for Laravel Blade

308664.1k](/packages/area17-blast)[mati365/ckeditor5-livewire

CKEditor 5 integration for Laravel Livewire

413.9k](/packages/mati365-ckeditor5-livewire)[electrik/slate

Slate - a Laravel Blade UI Kit is a set of anonymous blade components built using TailwindCSS v4 with built-in dark mode support for your next Laravel project

102.3k1](/packages/electrik-slate)

PHPackages © 2026

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