PHPackages                             vinelab/laravel-editor - 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. vinelab/laravel-editor

ActiveLibrary

vinelab/laravel-editor
======================

Markdown Text Editor (WYSIWYG) with social network embeds support and a nifty json output.

v1.0.3(11y ago)557.8k15[6 issues](https://github.com/Vinelab/laravel-editor/issues)[1 PRs](https://github.com/Vinelab/laravel-editor/pulls)PHPPHP &gt;=5.4.0

Since Jan 23Pushed 8y ago12 watchersCompare

[ Source](https://github.com/Vinelab/laravel-editor)[ Packagist](https://packagist.org/packages/vinelab/laravel-editor)[ RSS](/packages/vinelab-laravel-editor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (7)Used By (0)

Markdown Editor
===============

[](#markdown-editor)

A sophisticated markdown editor supporting different kinds of embeds (Facebook, Twitter, Youtube, Images, Links) and transforms content into a clean JSON to be delivered to mobile devices or custom front-end UI.

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

[](#installation)

- Add the package to your `composer.json` and run `composer update`.

```
{
    "require": {
        "vinelab/laravel-editor": "*"
    }
}
```

- Add the service provider to the `providers` array in `app/config/app.php`

```
'Vinelab\Editor\EditorServiceProvider',
```

- Publish the assets by running `php artisan asset:publish vinelab/laravel-editor` at the root of your project.
- Access the editor with the `Editor` facade

Dependencies
------------

[](#dependencies)

- [jQuery](http://jquery.com)

    - ``
- [Bootstrap](http://getbootstrap.com)

    - ``
    - ``
- [Mr.Uploader](http://github.com/vinelab/mr-uploader): To have the photo cropping and upload working you need to add

### Social Media Embeds

[](#social-media-embeds)

To have all the embeds working in the preview you will need to add the social media scripts to your HTML.

#### Facebook

[](#facebook)

```

    window.fbAsyncInit = function() {
        FB.init({
          appId      : '[YOU APP ID HERE]',
          xfbml      : true,
          version    : 'v2.1'
        });
    };

    (function(d, s, id){
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) {return;}
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/sdk.js";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));

```

#### Twitter

[](#twitter)

```

```

#### Instagram

[](#instagram)

```

```

Usage
-----

[](#usage)

### Displaying the Editor

[](#displaying-the-editor)

To display the editor you simply need to call

```
Editor::view()
```

You may also call it passing existing content

```
Editor::view($text);
```

#### Example with a Form

[](#example-with-a-form)

```
{{ Form::open(['url' => 'handle', 'method' => 'POST']) }}
    {{ Editor::view() }}
    {{ Form::submit() }}
{{ Form::close() }}
```

### Retrieving Content

[](#retrieving-content)

To get the content from the input use `Editor::input()` to get the editor's input name and use it with `Input`as such

```
$input = Input::get(Editor::input());
```

Then pass it to `Editor::content($input)` for the raw content or `Editor::json($input)` for the *JSON* representation of the output.

### Raw Content

[](#raw-content)

```
$content = Editor::content($input);
// $content is an instance of Vinelab\Editor\Content
```

The text used in the editor for this example is the following:

```
[Oxford Town](http://dylan.town)

Sunsets don&#39;t get much better than this one over @GrandTetonNPS. #nature #sunset pic.twitter.com/YuKy2rcjyU&mdash; US Dept of Interior (@Interior) May 5, 2014

```

#### JSON

[](#json)

> Lines are all 0 indexed

```
$json = $content->toJson();
```

```
{
    "text": "The text in here",
    "html": "The text in here",
    "embeds": {
        "facebook": [
            {
                "url": "https://www.facebook.com/FacebookDevelopers/posts/10151471074398553",
                "html": "",
                "line": 1
            },
            {
                "url": "https://www.facebook.com/FacebookDevelopers/posts/212625821854109664",
                "html": "",
                "line": 3
            }
        ],
        "twitter": [
            {
                "tweet": "Sunsets don't get much better than this one over @GrandTetonNPS. #nature #sunset pic.twitter.com/YuKy2rcjyU— US Dept of Interior (@Interior) May 5, 2014",
                "lang": "en",
                "html": "Sunsets don&#39;t get much better than this one over @GrandTetonNPS. #nature #sunset pic.twitter.com/YuKy2rcjyU&mdash; US Dept of Interior (@Interior) May 5, 2014",
                "line": 5
            }
        ],
        "youtube": [
            {
                "id": "sOOebk_dKFo",
                "url": "https://www.youtube.com/embed/sOOebk_dKFo",
                "html": "",
                "line": 7
            }
        ],
        "links": [
            {
                "url": "http://dylan.town",
                "text": "Oxford Town",
                "html": "Oxford Town",
                "indices": [0, 11]
            }
        ]
    }
}
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 86.4% 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 ~14 days

Total

5

Last Release

4071d ago

Major Versions

v0.1.0 → v1.0.02015-03-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4564469?v=4)[Sociata](/maintainers/Vinelab)[@Vinelab](https://github.com/Vinelab)

---

Top Contributors

[![Mulkave](https://avatars.githubusercontent.com/u/2647333?v=4)](https://github.com/Mulkave "Mulkave (38 commits)")[![Mahmoudz](https://avatars.githubusercontent.com/u/1983984?v=4)](https://github.com/Mahmoudz "Mahmoudz (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vinelab-laravel-editor/health.svg)

```
[![Health](https://phpackages.com/badges/vinelab-laravel-editor/health.svg)](https://phpackages.com/packages/vinelab-laravel-editor)
```

###  Alternatives

[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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