dev-master
9999999-devE. Muravjov's typographer for Yii2
MIT
The Requires
by Melnikov Ruslan
extension yii2 typograph mdash
1.0.2
1.0.2.0E. Muravjov's typographer for Yii2
MIT
The Requires
by Melnikov Ruslan
extension yii2 typograph mdash
Wallogit.com
2017 © Pedro Peláez
E. Muravjov's typographer for Yii2
E. Muravjov's typographer for Yii2, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist mrssoft/yii2-mdash "*"
or add, (*4)
"mrssoft/yii2-mdash": "*"
to the require section of your composer.json file., (*5)
Configuration:, (*6)
'components' => [
...
'mdash' => [
'class' => 'mrssoft\mdash\Mdash',
'remote' => true, // Use remote API or local. Default false.
'options' => [ // Typograph options. See http://mdash.ru/rules.html
'Text.paragraphs' => 'off',
'Text.breakline' => 'off',
'OptAlign.all' => 'off',
'Etc.unicode_convert' => 'off',
'Nobr.spaces_nobr_in_surname_abbr' => 'off',
'Etc.split_number_to_triads' => 'off'
]
]
....
]
Usage:, (*7)
$mdash = new Mdash([
'remote' => false,
'options' => [
'Text.paragraphs' => 'off',
]
]);
echo $mdash->process("мой текст");
Usage as filter:, (*8)
public function rules()
{
return [
['text',
'\mrssoft\mdash\MdashFilter',
'options' => ['remove' => false]
],
]
}
E. Muravjov's typographer for Yii2
MIT
extension yii2 typograph mdash
E. Muravjov's typographer for Yii2
MIT
extension yii2 typograph mdash