2017 © Pedro Peláez
 

library xetaravel-editor-md

A wrapper to use Editor.md with Laravel.

image

xetaio/xetaravel-editor-md

A wrapper to use Editor.md with Laravel.

  • Sunday, March 11, 2018
  • by Xety
  • Repository
  • 2 Watchers
  • 6 Stars
  • 662 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 16 Forks
  • 1 Open issues
  • 6 Versions
  • 6 % Grown

The README.md

Xetaravel Editor.md

>, (*1)

Stable Version Downloads Laravel License
Latest Stable Version Total Downloads Laravel 5.6 License

A wrapper to use Editor.md with Laravel., (*2)

Requirement

PHP, (*3)

Installation

composer require xetaio/xetaravel-editor-md

ServiceProviders

Import the EditorServiceProvider in your config/app.php:, (*4)

'providers' => [
      //...
      Xetaio\Editor\EditorServiceProvider::class,
      //...
  ]
  

Vendor Publish

Publish the vendor files to your application (included the config file config/editor.php and the public/vendor/editor.md directory) :, (*5)

php artisan vendor:publish --provider="Xetaio\Editor\EditorServiceProvider"
  

Configuration

All configuration options can be found in your config/editor.php file. For a full configuration options, read the documentation on the Editor.md site., (*6)

Usage

To use it with the basic options, just use the helpers included with the plugin:, (*7)

<!DOCTYPE html>
  <html lang="en">
  <head>
     <meta charset="UTF-8">
     <title>Editor.md example</title>
     {!! editor_css() !!}
  </head>
  <body>
      <h2>Editor.md example</h2>
  
      <div id="editormd">
          <!-- You must hide it with `display:none;` -->
          <textarea class="form-control" name="content" style="display:none;">
              # Editor.md for Laravel
          </textarea>
      </div>
  
      {!! editor_js() !!}
      {!! editor_config(['id' => 'editormd']) !!}
  </body>
  </html>
  

Advanced usage

If you want to use your custom options or options that are not in the config file, one of the best way, it to setup your Editor like that :, (*8)


  <!DOCTYPE html>
  <html lang="en">
  <head>
     <meta charset="UTF-8">
     <title>Editor.md example</title>
  
     
     @stack('styles')
  </head>
  <body>
     
     @yield('content')
  
     
     @stack('scripts')
  </body>
  </html>
  

```html @extends('layouts.app'), (*9)

@push('styles') {!! editor_css() !!} @endpush, (*10)

@push('scripts') {!! editor_js() !!}, (*11)

@php $config = [ 'id' => 'commentEditor', 'height' => '350', // Others settings here... ]; @endphp, (*12)

@include('editor/partials/_comment', $config) @endpush, (*13)

@section('content') //..., (*14)

//... @endsection, (*15)

```html






Upload File

This package come with a build-in upload feature. You don't have to do anything to get it work.. expect to upload an image. :stuck_out_tongue_winking_eye: If you want to do your own uploader, just register a new route and set it to imageUploadURL configuration option. (Of course you will need to create your own Controller and action, take a look here for an exemple), (*16)

Contribute

If you want to contribute to the project by adding new features or just fix a bug, feel free to do a PR., (*17)

The Versions

11/03 2018

dev-master

9999999-dev https://github.com/XetaIO/Xetaravel-Editor-md

A wrapper to use Editor.md with Laravel.

  Sources   Download

MIT

The Requires

 

laravel markdown wysiwyg editor.md laravel-5-package

11/03 2018

dev-readme

dev-readme https://github.com/XetaIO/Xetaravel-Editor-md

A wrapper to use Editor.md with Laravel.

  Sources   Download

MIT

The Requires

 

laravel markdown wysiwyg editor.md laravel-5-package

11/03 2018

v1.0.0

1.0.0.0 https://github.com/XetaIO/Xetaravel-Editor-md

A wrapper to use Editor.md with Laravel.

  Sources   Download

MIT

The Requires

 

laravel markdown wysiwyg editor.md laravel-5-package

11/03 2018

dev-L5-6

dev-L5-6 https://github.com/XetaIO/Xetaravel-Editor-md

A wrapper to use Editor.md with Laravel.

  Sources   Download

MIT

The Requires

 

laravel markdown wysiwyg editor.md laravel-5-package

11/03 2018

dev-L56

dev-L56 https://github.com/XetaIO/Xetaravel-Editor-md

A wrapper to use Editor.md with Laravel.

  Sources   Download

MIT

The Requires

 

laravel markdown wysiwyg editor.md laravel-5-package

26/05 2017

v0.0.1

0.0.1.0 https://github.com/XetaIO/Xetaravel-Editor-md

A wrapper to use Editor.md with Laravel.

  Sources   Download

MIT

The Requires

 

laravel markdown wysiwyg editor.md laravel-5-package