1667030040
WARNING: This bundle is abandoned in favor of markdown_to_html Twig filter. Please, consider using it instead. Migration should be easy because it also supports
michelf/php-markdown
Markdown parser that is used in this project under the hood.
Provide markdown conversion (based on Michel Fortin work) to your Symfony projects.
Add KnpMarkdownBundle to your project via Composer:
composer require knplabs/knp-markdown-bundle
If you're not using Symfony Flex, you will also need to enable the bundle in your app/AppKernel.php
file (new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle()
).
That's it! Start using it!
Once the bundle is installed, you can autowire a MarkdownParserInterface
into any service or controller:
use Knp\Bundle\MarkdownBundle\MarkdownParserInterface;
// from inside a controller
public function index(MarkdownParserInterface $parser)
{
$html = $parser->transformMarkdown($text);
}
// or from inside a service
private $parser;
public function __construct(MarkdownParserInterface $parser)
{
$this->parser = $parser;
}
public function someMethod()
{
$html = $this->parser->transformMarkdown($text);
}
There is also a public markdown.parser
service you can use.
In Twig, you can use the markdown
filter:
{# Use default parser #}
{{ my_data|markdown }}
{# If my_data is entered by a user, escape HTML tags before printing it #}
{{ my_data|escape|markdown }}
{# or strip HTML tags #}
{{ my_data|striptags|markdown }}
{# Or select specific parser #}
{{ my_data|markdown('parserName') }}
Create a service implementing Knp\Bundle\MarkdownBundle\MarkdownParserInterface
, then configure the bundle to use it:
# Symfony 3: app/config/config.yml
# Symfony 4: config/packages/knp_markdown.yaml (you'll need to create this)
knp_markdown:
parser:
service: my.markdown.parser
Alternatively if you are using the markdown.parser.sundown
there are options for enabling sundown extensions and render flags, see the default Configuration with:
php bin/console config:dump-reference knp_markdown
This bundle comes with 5 parser services, 4 based on the same algorithm but providing different levels of compliance to the markdown specification, and one which is uses the php sundown extension:
- markdown.parser.max // fully compliant = slower (default implementation)
- markdown.parser.medium // expensive and uncommon features dropped
- markdown.parser.light // expensive features dropped
- markdown.parser.min // most features dropped = faster
- markdown.parser.sundown // faster and fully compliant (recommended)
markdown.parser.sundown
requires the php sundown extension.
For more details, see the implementations in Parser/Preset.
Author: KnpLabs
Source Code: https://github.com/KnpLabs/KnpMarkdownBundle
License: MIT license
1597820991
Looking to develop a PHP based website from scratch or revamp your existing website?
HourlyDeveloper.io has always been an industry leader for companies and business owners looking to hire PHP web developer. By choosing to Hire PHP Developer from our company, you can always expect the best results. Our PHP services and solutions are always flexible which means that no matter the nature of your project, you can always count on us for getting the best PHP expertise.
Consult with our experts: https://bit.ly/3aEGxPy
#hire php developer #php developer #php development company #php development services #php development #php
1617276472
A framework that can drastically cut down the requirement to write original code to develop the web apps as per your requirement is PHP Framework. PHP frameworks offer code libraries for commonly used functions to reduce the development time.
Want to use PHP Web Frameworks for your web applications?
WebClues Infotech offers a service to hire dedicated PHP developers for all of the below-mentioned frameworks
Not sure which framework to use for your PHP web application?
Schedule Interview with PHP Developer https://bit.ly/3dsTWf0
Email: sales@webcluesinfotech.com
#hire php developer #hire php web developers #hire php developer in 2021 #hire php developers & dedicated php programmers #hire php developers india #hire and outsource freelance php developers
1613990718
ValueCoders is a leading PHP app development company that focuses on building robust, secure & scalable web applications for start-ups, enterprises, and entrepreneurs.
We have 16+ years of experience and have delivered custom PHP web development solutions to 2500+ global clients catering industry verticals, including healthcare, adtech, eLearning, data analysis, Fintech, eCommerce, etc
#hire php developer #hire a php developer in india #hire dedicated php programmers #hire php coders #php developer in india #php developers for hire
1593154878
Looking to hire affordable yet experienced PHP developers?
Hire Dedicated PHP Developer, who can convert your idea to reality, within the stipulated time frame. HourlyDeveloper.io expertise & experience as the top PHP development company put us above our competitors, in many ways. We have some of the top PHP developers in the industry, which can create anything you can imagine, that too, at the most competitive prices.
Consult with our experts:- https://bit.ly/2NpKnB8
#hire dedicated php developer #php developers #php development company #php development services #php development #php developer
1667030040
WARNING: This bundle is abandoned in favor of markdown_to_html Twig filter. Please, consider using it instead. Migration should be easy because it also supports
michelf/php-markdown
Markdown parser that is used in this project under the hood.
Provide markdown conversion (based on Michel Fortin work) to your Symfony projects.
Add KnpMarkdownBundle to your project via Composer:
composer require knplabs/knp-markdown-bundle
If you're not using Symfony Flex, you will also need to enable the bundle in your app/AppKernel.php
file (new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle()
).
That's it! Start using it!
Once the bundle is installed, you can autowire a MarkdownParserInterface
into any service or controller:
use Knp\Bundle\MarkdownBundle\MarkdownParserInterface;
// from inside a controller
public function index(MarkdownParserInterface $parser)
{
$html = $parser->transformMarkdown($text);
}
// or from inside a service
private $parser;
public function __construct(MarkdownParserInterface $parser)
{
$this->parser = $parser;
}
public function someMethod()
{
$html = $this->parser->transformMarkdown($text);
}
There is also a public markdown.parser
service you can use.
In Twig, you can use the markdown
filter:
{# Use default parser #}
{{ my_data|markdown }}
{# If my_data is entered by a user, escape HTML tags before printing it #}
{{ my_data|escape|markdown }}
{# or strip HTML tags #}
{{ my_data|striptags|markdown }}
{# Or select specific parser #}
{{ my_data|markdown('parserName') }}
Create a service implementing Knp\Bundle\MarkdownBundle\MarkdownParserInterface
, then configure the bundle to use it:
# Symfony 3: app/config/config.yml
# Symfony 4: config/packages/knp_markdown.yaml (you'll need to create this)
knp_markdown:
parser:
service: my.markdown.parser
Alternatively if you are using the markdown.parser.sundown
there are options for enabling sundown extensions and render flags, see the default Configuration with:
php bin/console config:dump-reference knp_markdown
This bundle comes with 5 parser services, 4 based on the same algorithm but providing different levels of compliance to the markdown specification, and one which is uses the php sundown extension:
- markdown.parser.max // fully compliant = slower (default implementation)
- markdown.parser.medium // expensive and uncommon features dropped
- markdown.parser.light // expensive features dropped
- markdown.parser.min // most features dropped = faster
- markdown.parser.sundown // faster and fully compliant (recommended)
markdown.parser.sundown
requires the php sundown extension.
For more details, see the implementations in Parser/Preset.
Author: KnpLabs
Source Code: https://github.com/KnpLabs/KnpMarkdownBundle
License: MIT license