Download the PHP package k-community/markdown-field without Composer

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

Markdown Field for Kirby

Enhanced, extensible Markdown field for Kirby CMS. Now available in version 2 4!

Features:

💡 TL;DR: The Markdown field/editor/suite, you all have been waiting for!

Screenshot of the editor field

[!NOTE] This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, please consider to ❤️ sponsor me for securing the continued development of the plugin.

Table of Contents


Installation

This version of the plugin requires PHP 8.4+, Kirby 5 and your Kirby installation must have UUIDs enabled. The recommended way of installing is by using Composer:

Alternatively, download and copy this repository to /site/plugins/markdown-field

Setup

This field can replace any textarea field you have set up and works out of the box with as little config as:

Options

Global options

Option Type Default Description
fabianmichael.markdown-field.convertPermalinks bool false Replaces all permalinks in href/src attributes in Kirbytext with the regular URL, similar to what https://getkirby.com/docs/reference/templates/field-methods/permalinks-to-urls does but also works for absolute URLs.

Field options

You have access to the very same options as the textarea field, and a few more:

Option Type Required Default Description
font string false monospace Sets the font family (sans-serif or monospace)
size String false small Sets the empty height of the Markdown field
kirbytext bool false true Use Kirbytext syntax for links, images etc.

Font settings

You can choose between monospace (monospace) and sans-serif (sans) font. The monospace font offers a more sophisticated layout with indentation for multiline list elements, headings, and blockquote – things, which would be much harder to implement (and slower to calculate) for a proportional font.

While the sans-serif might be more appealing to non-technical writers at first, the monospace should be the preferred version in most cases.

Buttons

This field is packing the usual textarea buttons and many more.

If you don't want to show any buttons, you can hide the toolbar. This will also disable the keyboard shortcuts for all formats.

Simple configuration

If you just want to add the buttons without further configuration, just provide a YAML array, e.g.:

Advanced configuration

Some buttons may be configures with advanced options. To ensure compatibility with the Symfony YAML parser, you should only use named buttons in this case:

Keyboard Shortcuts

ℹ️ Keyboard shortcuts are only available for those buttons/heading levels enabled in the toolbar.

Block Formats

Format Mac/iOS Linux/Windows
Heading 1 ⌥⌃1 Alt+Shift+1
Heading 2 ⌥⌃2 Alt+Shift+2
Heading 3 ⌥⌃3 Alt+Shift+3
Heading 4 ⌥⌃4 Alt+Shift+4
Heading 5 ⌥⌃5 Alt+Shift+5
Heading 6 ⌥⌃6 Alt+Shift+6
Quote ⌥⌃q Alt+Shift+q
Bullet List ⌥⌃U Alt+Shift+u
Ordered List ⌥⌃O Alt+Shift+o

Inline Formats

Format Mac/iOS Linux/Windows
Bold ⌘B Ctrl+b
Italic ⌘I Ctrl+i
Link ⌘K Ctrl+k
Strikethrough ⌥⌃D Alt+Shift+d
Code ⌥⌃X Alt+Shift+x
Footnote ⌥⌃F Alt+Shift+f

Other

Format Mac/iOS Linux/Windows
Show Whitespace ⌥⌃I Alt+Shift+i
Open clicked URL in new tab ⌘+Click Ctrl+Click

URLs

Size

You can define the height of the field when empty. The default is two-lines, which mimics the textarea's default empty height.

If you want the field to mimic a text field but with some markdown highlighting on top of it, set the size to one-line and buttons: false.

All predefined sizes are:

Note that you can make the default height any height you want with some custom panel CSS. First, set the size option to any string you'd like:

Then in your panel.css:

Extension API

The API has changed from version 1, old plugins are not compatible anymore and require a few adjustments. See extension-examples folder.

There are two types of extensions, which allow you to extend the editor to adjust it better to your specific needs:

Custom options for files, and uploads

Your extension can use a special endpoint to extend the base options for pages, files, and uploads with parameters set in the button configuration. See an example in the extension-examples/custom-pagelink folder.

The end user can configure options for your extension as part of the button configuration:

Development

You must run the build process before pushing the repo, or else the hot-reload code will prevent it from working in any install.

Migration Guide

From version 2/3 to 4

From version 1 to 2

Known Issues

What’s not supported (and never will be)

The way Markdown is used nowadays has changed since its inception, especially since GFM ("GitHub-Flavored Markdown") became popular and added some elements to the language.

License

MIT (but you are highly encouraged to ❤️ sponsor me if this piece of software helps you to pay your bills).

Credits

Text editor:

Contributors:

@fabianmichael, @sylvainjule, @medienbaecker, @mtsknn, @nsteiner, @rasteiner, @thomasfahrland, @johannschopplich

Inspired by:


All versions of markdown-field with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3.0
getkirby/composer-installer Version ^1.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 k-community/markdown-field contains the following files

Loading the files please wait ...