PHP code example of chulakov / yii2-js-typograf

1. Go to this page and download the library: Download chulakov/yii2-js-typograf library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

chulakov / yii2-js-typograf example snippets


<?= $form->field($model, "description")->widget(TypografTextWidget::class); 

<?= $form->field($model, "description")->widget(TypografTextAreaWidget::class, [
    'options' => [
        'rows' => '3'
    ]
]); 

<?= $form->field($model, "title")->widget(\chulakov\typograf\widgets\TypografTinyMceWidget::class,[
                'clientOptions' => [
                    'min_height' => 500,
                    'plugins' => [
                        'lists',
                        'visualblocks visualchars code nonbreaking',
                        'autoresize',
                        'paste',
                        'link',
                        'typograf',
                        'code'
                    ],
                    'toolbar1' => 'undo redo | formatselect | bold | bullist | nonbreaking removeformat | typograf code | link',
                    'content_css' => '',
                    'menubar' => false,
                    'branding' => false,
                    'paste_as_text' => true,
                    'formats' => [
                        'underline' => ['inline' => 'span', 'classes' => 'underline'],
                        'strikethrough' => ['inline' => 'span', 'classes' => 'strike'],
                    ],
                ]
        ]);