Download the PHP package clesson-de/silverstripe-markdown without Composer

On this page you can find all versions of the php package clesson-de/silverstripe-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 silverstripe-markdown

Silverstripe Markdown Editor

A Markdown editor form field for Silverstripe CMS, powered by react-markdown-editor-lite.

Features

Requirements

Installation

After installation, expose the vendor assets:

Usage

Database field

Use the Markdown field type in your DataObject's $db array:

The Markdown type will automatically scaffold a MarkdownEditorField in the CMS.

Manual field usage

You can also use the field directly in getCMSFields():

Editor height

Control the editor height with setRows(). The default is 15 rows:

Preview-only mode

Use setPreviewOnly() to render only the HTML preview with the toolbar hidden. The editor becomes read-only:

Toolbar buttons

By default, all toolbar buttons are shown. Use setToolbarButtons() with an array of MarkdownToolbarButton constants to control which buttons appear and in which order:

Available buttons

Constant Button Description
HEADER Header Heading levels (H1–H6)
BOLD Bold Bold text
ITALIC Italic Italic text
UNDERLINE Underline Underlined text
STRIKETHROUGH Strikethrough Strikethrough text
LIST_UNORDERED Unordered list Bullet list
LIST_ORDERED Ordered list Numbered list
BLOCK_QUOTE Block quote Blockquote
BLOCK_WRAP Block wrap Line break / wrap
BLOCK_CODE_INLINE Inline code Inline code
BLOCK_CODE_BLOCK Code block Fenced code block
TABLE Table Table
IMAGE Image Image
LINK Link Hyperlink
CLEAR Clear Clear formatting
LOGGER Undo / Redo Undo and redo
MODE_TOGGLE Mode toggle Switch between edit/preview/split
FULL_SCREEN Full screen Toggle full-screen mode
TAB_INSERT Tab insert Insert tab character
DIVIDER Visual separator between buttons

Use MarkdownToolbarButton::all() to get all available buttons as an array.

Template output

In templates, the Markdown field automatically converts to HTML:

Frontend Development

For development with file watching:

Acknowledgements

This module uses react-markdown-editor-lite by HarryChen0506 to render the Markdown editor in the CMS. Thank you for the great component!

The underlying library also supports custom plugins to extend the editor with additional functionality. This has not been tested in this module yet. If you have experience with custom plugins or ideas for improvements, I'd love to hear from you — feel free to open an issue!

License

BSD-3-Clause. See LICENSE.


All versions of silverstripe-markdown with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^6.0
silverstripe/admin Version ^3.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 clesson-de/silverstripe-markdown contains the following files

Loading the files please wait ...