Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laravel-admin-extensions/simplemde
Simplemde markdown editor extension for laravel-admin
https://github.com/laravel-admin-extensions/simplemde
editor laravel laravel-admin markdown
Last synced: 6 days ago
JSON representation
Simplemde markdown editor extension for laravel-admin
- Host: GitHub
- URL: https://github.com/laravel-admin-extensions/simplemde
- Owner: laravel-admin-extensions
- License: mit
- Created: 2018-09-06T05:03:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T02:52:36.000Z (almost 6 years ago)
- Last Synced: 2024-04-30T00:02:57.691Z (6 months ago)
- Topics: editor, laravel, laravel-admin, markdown
- Language: PHP
- Size: 93.8 KB
- Stars: 32
- Watchers: 3
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-laravel-admin - simplemde - SimpleMDE Markdown 编辑器 (扩展包 / 字段类扩展包)
README
Simplemde editor extension for laravel-admin
======[Simplemde](https://github.com/sparksuite/simplemde-markdown-editor) is a great markdown editor, this extension is used to integrate `Simplemde` into the `laravel-admin` form.
## Screenshot
![wx20180906-130207](https://user-images.githubusercontent.com/1479100/45136112-3deea300-b1d5-11e8-984d-9d1c8d53c97d.png)
## Installation
```bash
composer require laravel-admin-ext/simplemde
```Then
```bash
php artisan vendor:publish --tag=laravel-admin-simplemde
```## Configuration
In the `extensions` section of the `config/admin.php` file, add some configuration that belongs to this extension.
```php'extensions' => [
'simplemde' => [
// Set to false if you want to disable this extension
'enable' => true,
// If you want to set an alias for the calling method
//'alias' => 'markdown',
// Editor configuration
'config' => [
]
]
]```
The configuration of the editor can be found in [Simplemde Documentation](https://github.com/sparksuite/simplemde-markdown-editor#configuration)
```php
'config' => [
'autofocus' => true,
'placeholder' => 'xxxx',
....
]
```## Usage
Use it in the form:
```php
$form->simplemde('content');
```Set height
```php
$form->simplemde('content')->height(500);
```If the method alias is specified in the configuration as `markdown`
```php
$form->markdown('content');
```## Donate
> Help keeping the project development going, by donating a little. Thanks in advance.
[![PayPal Me](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/zousong)
![-1](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)
License
------------
Licensed under [The MIT License (MIT)](LICENSE).