New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jodit

Package Overview
Dependencies
Maintainers
0
Versions
651
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jodit - npm Package Versions

13
65

4.4.1

Diff

xdan
published 4.3.2 •

xdan
published 4.3.1 •

Changelog

Source

4.3.1

:boom: Breaking Change
  • Added the popupRoot option for all IViewBased classes (Dialog, Jodit, FileBrowser). Allows you to specify the parental element of dialogs and popup windows.
  • If the option is not specified, then when creating a dialogue, there is a bypass of a tree, starting with the editor. If an element is found dialog or eny element with position: fixed or position: absolute, then it is used as a parent.
  • Also, shadowRoot can be used as a popupRoot

Those. Parent search priorities:

  1. popupRoot option
  2. shadowRoot option
  3. The closest element dialog or with style position: fixed or position: absolute
  4. document.body

This is necessary in cases where Jodit is displayed inside the dialog windows with a focus interception. For example, when inserting in [mui dialog] (https://mui.com/material-ui/react-dialog/)

If this is your situation, then in most cases you won't need to do anything, as Jodit will find the correct parent element on its own. But if your code logic was configured specifically to insert into document.body, then you will need to explicitly specify popupRoot: document.body

const editor = Jodit.make('#editor', {
	popupRoot: document.body
});
xdan
published 4.2.50 •

xdan
published 4.2.49 •

xdan
published 4.2.47 •

xdan
published 4.2.46 •

xdan
published 4.2.45 •

Changelog

Source

4.2.45

  • Fixed bug with RTL mode when all dialogs were opened without RTL mode
xdan
published 4.2.43 •

xdan
published 4.2.41 •

Changelog

Source

4.2.41

:rocket: New Feature

  • Related issue: The video plugin only support content from youtube and vimeo #1170 Added options video.defaultWidth, video.defaultHeight, and video.parseUrlToVideoEmbed to the video plugin. The parseUrlToVideoEmbed option allows you to add your own video parser.

    Jodit.make('#editor', {
    	buttons: 'video',
    	video: {
    		defaultWidth: 560, // Default: 400
    		defaultHeight: 315, // Default: 345
    		parseUrlToVideoEmbed: (url, size) => {
    			// Add your own video provider
    			if (/https:\/\/sitename\.com/.test(url)) {
    				return `<iframe width="${size.width}" height="${size.height}" src="${url}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`;
    			}
    
    			return Jodit.modules.Helpers.convertMediaUrlToVideoEmbed(
    				url,
    				size
    			);
    		}
    	},
    	controls: {
    		video: {
    			tooltip: 'Insert video'
    		}
    	}
    });
    
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc