clean

Type: Boolean

Default: true

This setting allows you to turn off all the cleaning rules for pasted content.

RedactorX('#entry', {
    paste: {
        clean: false
    }
});

autoparse

Type: Boolean

Default: true

This setting turns off the default conversion of text URLs into clickable links and image URLs to the image block.

RedactorX('#entry', {
    paste: {
        autoparse: false
    }
});

plaintext

Type: Boolean

Default: false

Sometimes you just need to restrict content that can be pasted into Redactor X. When turned on, this setting will remove all tags and formatting from pasted text, excluding links and images.

RedactorX('#entry', {
    paste: {
        plaintext: true
    }
});

images

Type: Boolean

Default: true

Whenever you need to exclude images from the content that users can paste, this setting is here for you, just set it to false.

RedactorX('#entry', {
    paste: {
        images: false
    }
});

links

Type: Boolean

Default: true

If you need to restrict the content that users can paste into Redactor X, but only need to exclude links, set it to false, and all links will be pasted as plain text.

RedactorX('#entry', {
    paste: {
        links: false
    }
});

blockTags

Type: Array

Default: array

Whenever you need to control which block tags your users can paste, use this setting. Tweak this default list to better fit your needs, but keep in mind, you can only remove block tags from the list, not add them.

RedactorX('#entry', {
    paste: {
        blockTags:  ['blockquote', 'p']
    }
});

If you'd like to completely restrict any block tags from being pasted, just use this setting with an empty array of tags.

RedactorX('#entry', {
    paste: {
        blockTags:  []
    }
});

inlineTags

Type: Array

Default: array

Whenever you need to control which inline tags your users can paste, use this setting. Tweak this default list to better fit your needs, but keep in mind, you can only remove inline tags from the list, not add them.

RedactorX('#entry', {
    paste: {
        inlineTags:  ['a', 'br', 'strong', 'ins', 'code', 'del']
    }
});

If you'd like to completely restrict any inline tags from being pasted, just use this setting with an empty array of tags.

RedactorX('#entry', {
    paste: {
        inlineTags:  []
    }
});

formTags

Type: Array

Default: array

Whenever you need to control which form tags your users can paste, use this setting. Tweak this default list to better fit your needs, but keep in mind, you can only remove form tags from the list, not add them.

RedactorX('#entry', {
    paste: {
        formTags:  ['button', 'input']
    }
});

If you'd like to completely restrict any form tags from being pasted, just use this setting with an empty array of tags.

RedactorX('#entry', {
    paste: {
        formTags:  []
    }
});

keepClass

Type: Array

Default: []

This setting allows you to set an array of tags for which the class attribute will not be deleted on pasting.

RedactorX('#entry', {
    paste: {
        keepClass: ['p', 'td']
    }
});

keepAttrs

Type: Array

Default: ['td', 'th']

This setting allows you to set an array of tags for which attributes (excluding class and style) will not be deleted on pasting.

RedactorX('#entry', {
    paste: {
        keepAttrs: ['td', 'th', 'p']
    }
});