
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@openregion/tinymce-word-paste-plugin
Advanced tools
This plugin provides the capability to accept data from Microsoft Word, and clean-up the received data before pasting it into place.
Tested on TinyMCE 6/7.
Based on TinyMCE 5.10.7 paste plugin.
Install package
npm install @openregion/tinymce-word-paste-plugin
Import plugin
import '@openregion/tinymce-word-paste-plugin';
paste_enable_default_filters
This option allows you to disable TinyMCE's default paste filters when set to false.
Type: Boolean
Default Value: true
Possible Values: true
, false
paste_enable_default_filters
tinymce.init({
selector: 'textarea', // change this value according to your html
plugins: 'pasteword',
menubar: 'edit',
paste_enable_default_filters: false
});
paste_word_valid_elements
This option enables you to configure the valid_elements
specific to MS Office. Word produces a lot of junk HTML, so when users paste things from Word we do extra restrictive filtering on it to remove as much of this as possible. This option enables you to specify which elements and attributes you want to include when Word contents are intercepted.
Note: To access this feature, you need to set the value of
paste_enable_default_filters
to"false"
in your configuration.
Type: String
paste_word_valid_elements
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'pasteword',
menubar: 'edit',
paste_word_valid_elements: 'b,strong,i,em,h1,h2'
});
paste_retain_style_properties
This option allows you to specify which styles you want to retain when pasting contents from MS Word and similar Office suite products. This option can be set to a space-separated list of CSS style names, or "all"
if you want all styles to be retained.
Type: String
paste_retain_style_properties
tinymce.init({
selector: 'textarea', // change this value according to your html
plugins: 'pasteword',
menubar: 'edit',
paste_retain_style_properties: 'color font-size'
});
paste_convert_word_fake_lists
This option lets you disable the logic that converts list like paragraph structures into real semantic HTML lists.
Type: Boolean
Default Value: true
Possible Values: true
, false
paste_convert_word_fake_lists
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'pasteword',
menubar: 'edit',
paste_convert_word_fake_lists: false
});
FAQs
TinyMCE plugin to paste from Word
We found that @openregion/tinymce-word-paste-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.