amidesfahani / filament-tinyeditor

a TineMce editor for Laravel Filament Forms
MIT License
46 stars 16 forks source link

Html view code missing #42

Closed Dinesh-loma closed 3 months ago

Dinesh-loma commented 3 months ago

Please add button to view html source code.

ntsbstn commented 3 months ago

Go to config/filament-tinyeditor.php then add "code" in any profile you are using for your application.

'profiles' => [
    'default' => [
        'plugins' => '...',
        'toolbar' => '... code ...',
        'upload_directory' => null,
     ],
],
Dinesh-loma commented 3 months ago

https://github.com/amidesfahani/filament-tinyeditor/assets/148322249/7fd6b677-0709-4389-96d6-cae2ab16bb7e

@ntsbstn check the video link. Like that feature needed in tinyeditor.

"code" you suggest is for adding code block, "code" print the html tag.

ntsbstn commented 3 months ago

Did you also add "code" in "plugins" ?


'profiles' => [
    'default' => [
        'plugins' => '... code ...'',
        'toolbar' => '... code ...',
        'upload_directory' => null,
     ],
],```
Dinesh-loma commented 3 months ago

Yes, I did also that. That thing is not working.

amidesfahani commented 3 months ago

Please share you config file

Dinesh-loma commented 3 months ago

return [
    'provider' => 'cloud', // cloud|vendor
    // 'direction' => 'rtl',
    /**
     * change darkMode: 'auto'|'force'|'class'|'media'|false|'custom'
     */
    'darkMode' => 'auto',

    /** cutsom */
    'skins' => [
        // oxide, oxide-dark, tinymce-5, tinymce-5-dark
        'ui' => 'oxide',

        // dark, default, document, tinymce-5, tinymce-5-dark, writer
        'content' => 'default'
    ],

    'profiles' => [
        'default' => [
            'plugins' => 'accordion autoresize codesample directionality advlist link image lists preview pagebreak searchreplace wordcount code fullscreen insertdatetime media table emoticons code',
            'toolbar' => 'undo redo removeformat | styles |code|bold italic | rtl ltr | alignjustify alignleft aligncenter alignright | numlist bullist outdent indent | forecolor backcolor | blockquote table toc hr | image link media codesample emoticons | wordcount fullscreen',
            'upload_directory' => null,
        ],

        'simple' => [
            'plugins' => 'autoresize directionality emoticons link wordcount',
            'toolbar' => 'removeformat | bold italic | rtl ltr | numlist bullist | link emoticons',
            'upload_directory' => null,
        ],

        'minimal' => [
            'plugins' => 'link wordcount',
            'toolbar' => 'bold italic link numlist bullist',
            'upload_directory' => null,
        ],

        'full' => [
            'plugins' => 'accordion autoresize codesample directionality advlist autolink link image lists charmap preview anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media table emoticons template help',
            'toolbar' => 'undo redo removeformat | styles | bold italic | rtl ltr | alignjustify alignright aligncenter alignleft | numlist bullist outdent indent accordion | forecolor backcolor | blockquote table toc hr | image link anchor media codesample emoticons | visualblocks print preview wordcount fullscreen help',
            'upload_directory' => null,
        ],
    ],

    /**
     * this option will load optional language file based on you app locale
     * example:
     * languages => [
     *      'fa' => 'https://cdn.jsdelivr.net/npm/tinymce-i18n@23.10.9/langs6/fa.min.js',
     *      'es' => 'https://cdn.jsdelivr.net/npm/tinymce-i18n@23.10.9/langs6/es.min.js',
     *      'ja' => asset('assets/ja.min.js')
     * ]
     */
    'languages' => [],
];
amidesfahani commented 3 months ago

@Dinesh-loma html source editor is a paid plugin please read this article: advcode

Dinesh-loma commented 3 months ago

okay.