Documentation
Paste
clean #
Type: Boolean
Default: true
This setting allows you to turn off all the cleaning rules for pasted content.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
paste: {
clean: false
}
});
autoparse #
Type: Boolean
Default: true
This setting turns off the default conversion of text URLs into clickable links.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
paste: {
autoparse: false
}
});
plaintext #
Type: Boolean
Default: false
Sometimes you just need to restrict content that can be pasted into Article. When turned on, this setting will remove all tags and formatting from pasted text, excluding links and images.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
paste: {
images: false
}
});
links #
Type: Boolean
Default: true
If you need to restrict the content that users can paste into Article, but only need to exclude links, set it to false
, and all links will be pasted as plain text.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
paste: {
links: false
}
});
keepStyle #
Type: Array
Default: []
This setting allows you to set an array of tags for which the style attribute will not be deleted on pasting.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
paste: {
keepStyle: ['p', 'td']
}
});
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
paste: {
keepStyle: ['p', 'blockquote']
}
});
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
paste: {
keepAttrs: ['td', 'th', 'p']
}
});
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
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.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
paste: {
formTags: []
}
});