Download the PHP package dyusha/laravel-html-editor without Composer

On this page you can find all versions of the php package dyusha/laravel-html-editor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-html-editor

Inline edit HTML blocks directly on a page

This package adds an ability to inline edit any defined HTML block in your Laravel app. It uses awesome MediumEditor wrapped into Vue.js components.

Installation

Install this package via composer:

composer require dyusha/laravel-html-editor

Install required npm packages:

npm install vue vue-resource medium-editor --save

Add service provider to your config file:

After that you will be able to publish config, migrations, views and needed assets.

By default js and sass assets will be published to /resources/assets/js/components and /resources/assets/sass/plugins directories respectively. In order to override these settings you need to publish config file.

php artisan vendor:publish --provider="Dyusha\HtmlEditor\HtmlBlocksProvider" --tag=config

and change following paths

Publish remaining assets and migrations:

php artisan vendor:publish --provider="Dyusha\HtmlEditor\HtmlBlocksProvider"

Apply migrations:

php artisan migrate

Usage

This package provides custom Blade directives @block and @endblock which can be used to wrap blocks of HTML that should be editable. For example if somewhere in your template you will have the following code

the first time it's being rendered directive will try to find HTML block with slug hero-text in the database. If it is present then its content will be rendered on the page. Otherwise new HTML block will be created with slug hero-text, optional description Homepage hero text and content Lorem ipsum dolor sit amet. You can put any HTML markup between @block and @endblock directives.

In order to edit such blocks you need to follow few steps:

  1. Somewhere in your layout add partial that will render required controls

    @include('html-editor::html-manager')

  2. By default editing is allowed only for users who have edit-html-blocks ability so you should add it in your AuthServiceProvider

  3. Include provided scss and js files on the page using your preferred build tools
  4. Include Vue.js components in your root instance or another component:

You can learn more about Vue.js components here.

At this point all HTML blocks wrapped in @block directive should be rendered on a page as <html-block> component and be editable:

Updating blocks

When you press Accept changes button <html-manager> component will send POST request to /admin/blocks with blocks param that will contain all changed HTML blocks.

License

This library is licensed under the MIT license. Please see LICENSE for more details.


All versions of laravel-html-editor with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
illuminate/support Version ^5.2
illuminate/database Version ^5.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dyusha/laravel-html-editor contains the following files

Loading the files please wait ....