Download the PHP package clementtalleu/easyadmin-markdown-bundle without Composer

On this page you can find all versions of the php package clementtalleu/easyadmin-markdown-bundle. 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 easyadmin-markdown-bundle

EasyAdminMarkdownBundle

A Markdown editor field for EasyAdmin, powered by the EasyMDE JavaScript editor.

It provides a MarkdownEditorField that behaves like EasyAdmin's built-in TextEditorField (which uses Trix), but lets your users write Markdown with a live preview, a toolbar and keyboard shortcuts. On the detail page the stored Markdown is rendered as sanitized HTML.

PHP >= 8.2
Symfony 7.x and 8.x
EasyAdmin 4.x and 5.x
Asset pipeline AssetMapper (no build step required)

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Step 1: Install the bundle

If your application uses Symfony Flex, the bundle is enabled automatically. Otherwise, enable it by hand in config/bundles.php:

Step 2: Install the EasyMDE assets

The bundle never ships third-party JavaScript itself, so you add EasyMDE to your application's importmap. Use the self-contained build (it bundles CodeMirror and marked), which works reliably with AssetMapper:

That's it — the field automatically loads its own JavaScript (as an ES module) and stylesheet from the bundle, and the editor resolves EasyMDE from your importmap. No importmap.php editing is required.

Step 3 (optional): Enable HTML rendering on the detail page

To render the Markdown as HTML on the detail page, install a Markdown parser:

If you skip this step, the detail page falls back to displaying the raw Markdown source as plain text.

Usage

Use the field in any EasyAdmin CRUD controller, exactly like the native fields:

Options

setNumOfRows()

Sets the initial height (in rows) of the editor when its content is empty:

setEasyMdeConfig()

Passes any EasyMDE configuration option to the editor. The array is JSON-encoded and forwarded to the EasyMDE constructor on the client side:

By default the bundle disables EasyMDE's built-in spell checker and status bar, and does not download Font Awesome (EasyAdmin already provides icons). You can re-enable any of these through setEasyMdeConfig().

renderAsHtml()

Forces (or disables) HTML rendering on the detail page, regardless of whether league/commonmark is installed:

How it works

Security

The Markdown rendered on the detail page is converted with league/commonmark configured with html_input: escape and allow_unsafe_links: false. Any HTML embedded in the Markdown source is escaped rather than executed.

Running the tests

License

This bundle is released under the MIT license.


All versions of easyadmin-markdown-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
easycorp/easyadmin-bundle Version ^4.24 || ^5.0
symfony/asset-mapper Version ^7.0 || ^8.0
symfony/form Version ^7.0 || ^8.0
symfony/framework-bundle Version ^7.0 || ^8.0
symfony/twig-bundle Version ^7.0 || ^8.0
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 clementtalleu/easyadmin-markdown-bundle contains the following files

Loading the files please wait ...