
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
@edx/tinymce-language-selector
Advanced tools
A plugin for TinyMCE 5 that allows the user to specify if text is written in a foreign language and in which language.
This is a plugin for TinyMCE 5 that allows users to specify what language their text is written in. The plugin wraps
the desired text in span
tags with a lang
attribute for the specified language. Unspecified text is assumed to be
written in the page's language. This helps the resulting text comply with WCAG 2.0 3.1.2 Language of Parts: "The
human language of each passage or phrase in the content can be programmatically determined..."
The plugin is intended for use as you are creating a new passage. It also works when you need to change the language of an existing passage, but not as well (see below Caveats section for details). For best results, don’t select any text and just change in and out of different language modes while typing.
This is published as an NPM package.
npm install @edx/tinymce-language-selector
Import the plugin to add it to TinyMCE's plugin manager:
import '@edx/tinymce-language-selector'
Make sure TinyMCE has already been imported since the plugin needs access to the global tinymce
variable.
Then you can use the plugin just like one of TinyMCE's builtin plugins. When configuring TinyMCE, make sure to modify
extended_valid_elements
to allow span
tags with the lang
attribute or the id
attribute and to strip empty span
tags:
extended_valid_elements: 'span[lang|id] -span'
We are leveraging the semantic release workflow to create new versions and release packages to npm.
innerText
of the button
node. I’m not sure how well this will work with internationalization and non-default styling.FAQs
A plugin for TinyMCE 5 that allows the user to specify if text is written in a foreign language and in which language.
The npm package @edx/tinymce-language-selector receives a total of 823 weekly downloads. As such, @edx/tinymce-language-selector popularity was classified as not popular.
We found that @edx/tinymce-language-selector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.