Download the PHP package schumacherfm/mage2-markdown without Composer

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

Magento2 Markdown Template Engine

Markdown template engine for Magento2.

This template engine is meant to be used additionally to the .phtml files and does not provide any .md template file.

A use case would be to replace some simple .phtml files with Markdown or uses the Markdown template files as some kind of CMS.

You can write any PHP in the Markdown files. After PHP has been executed the template will be transformed from Markdown to HTML.

Events & Configuration

The Markdown template engine class dispatches one event which lets you modify the current parser.

Event name: markdown_init with event object: engine.

Configuration options can be found Stores -> Settings -> Configuration -> Advanced -> Developer -> Markdown.

You can choose from one of the three engines:

Default engine is the first one.

Frontend Integration

Example use case: Disable WYSIWYG editor and switch the content from the product tables to full Markdown support.

We're deactivating the WYSIWYG editor completely in the backend via the option

Stores -> Configuration -> General -> Content Management -> WYSIWYG Options with value Disable completely. As a side effect you backend loads much faster ;-(

Your template files must have the file extension .md to get automatically recognized.

In your theme change catalog_product_view.xml to

Note: We are only changing the template extension.

@todo figure out best method to easily change the template name for those blocks.

These changes mean that product short description and long description will now be parsed with Markdown!

Example attribute.phtml converted to attribute.md

Click here to view the original attribute.phtml

The next excerpt is from attribute.md which only shows the last six lines:

Note that we add here markdown="1" into the div and we must change the parser to michelfextra.

That's it! All our product descriptions will now be outputted with Markdown formatting!

A hackathon project could be to replace the WYSIWYG editor with a Markdown editor in the backend.

Developers

If you wish to add any other Markdown engine simply create your own module and add a di.xml:

This entry will also appear in the backend configuration section.

Your MyAwesomeMarkdownParser must implement: MarkdownEngineInterface.

Tests

@todo

Installation via Composer

Add the following to the require section of your Magento 2 composer.json file

"schumacherfm/mage2-markdown": "dev-master"

additionally add the following in the repository section

    "repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/SchumacherFM/Magento2-Markdown.git"
    }
]

run composer update

add the following to app/etc/config.php

'SchumacherFM_Markdown'=>1

Compatibility

Support / Contribution

Report a bug using the issue tracker or send us a pull request.

Instead of forking I can add you as a Collaborator IF you really intend to develop on this module. Just ask :-)

I am using that model: A successful Git branching model

For versioning have a look at Semantic Versioning 2.0.0

History

0.1.0

License

OSL-30

Author

Cyrill Schumacher

My pgp public key


All versions of mage2-markdown with dependencies

PHP Build Version
Package Version
Requires magento/framework Version *
erusev/parsedown Version ~1.4.5
michelf/php-markdown Version ~1.4.1
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 schumacherfm/mage2-markdown contains the following files

Loading the files please wait ....