Force Paste as Plain Text

forcePasteAsPlainText

ArgumentTypeRequiredDefault

status

bool

true

In some cases, you might want to paste content from your clipboard as plain text, removing any HTML tags.

By default, CKEditor preserves the structure of the original content and ensures HTML is safely maintained. However, if you’d prefer to paste content without any formatting, as plain text, you can use the forcePasteAsPlainText function.

use Mostafaznv\NovaCkEditor\CkEditor;

class Article extends Resource
{
    public function fields(Request $request): array
    {
        return [
            CkEditor::make(trans('Content'), 'content')
                ->forcePasteAsPlainText()
        ];
    }
}

This feature has been available since v7.5.0

Last updated