2017 © Pedro Peláez
 

yii2-extension yii2-mdash

E. Muravjov's typographer for Yii2

image

mrssoft/yii2-mdash

E. Muravjov's typographer for Yii2

  • Tuesday, May 8, 2018
  • by mrs2000
  • Repository
  • 1 Watchers
  • 0 Stars
  • 89 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 35 % Grown

The README.md

yii2-mdash

E. Muravjov's typographer for Yii2, (*1)

Installation

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)

Usage

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]
        ],
    ]
}

The Versions

08/05 2018

dev-master

9999999-dev

E. Muravjov's typographer for Yii2

  Sources   Download

MIT

The Requires

 

by Melnikov Ruslan

extension yii2 typograph mdash

05/03 2018

1.0.2

1.0.2.0

E. Muravjov's typographer for Yii2

  Sources   Download

MIT

The Requires

 

by Melnikov Ruslan

extension yii2 typograph mdash