PHP code example of imatic-it / imatic-formatting

1. Go to this page and download the library: Download imatic-it/imatic-formatting 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/ */

    

imatic-it / imatic-formatting example snippets


$g_plugin_ImaticFormatting_

public function config(): array
{
    return [
        'true,
            'textAreas'=> [
                'description',
                'additional_info',
                'additional_information',
                'bugnote_text'
            ],
            'options' => [
                'initialEditType' => 'markdown', // 'markdown' or 'wysiwyg'
                'previewStyle' => 'tab', // 'tab' or 'vertical'
                'height' => false, // Use false for default height
                'useDefaultHTMLSanitizer' => true,
                'useCommandShortcut' => true,
                'useDefaultHTMLSanitizerOptions' => [
                    'allowAttributes' => ['class', 'style'],
                    'allowTags' => ['a', 'b', 'i', 'strong', 'em', 'p', 'br', 'ul', 'ol', 'li', 'code', 'pre'],
                ],
            ],
        ]
    ];
}

composer config --unset platform.php
composer