Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mantine/rte

Package Overview
Dependencies
Maintainers
1
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mantine/rte - npm Package Compare versions

Comparing version 2.5.0-alpha.5 to 2.5.0

2

cjs/components/RichTextEditor/default-control.js

@@ -9,3 +9,3 @@ 'use strict';

["unorderedList", "orderedList"],
["link", "image", "video"],
["link", "image", "video", "blockquote"],
["alignLeft", "alignCenter", "alignRight"],

@@ -12,0 +12,0 @@ ["sup", "sub"]

@@ -59,2 +59,9 @@ 'use strict';

replaceIcons.replaceIcons(icons);
function defaultImageUpload(file) {
return new Promise((resolve) => {
const reader = new FileReader();
reader.onloadend = () => resolve(reader.result);
reader.readAsDataURL(file);
});
}
function RichTextEditor(_a) {

@@ -64,3 +71,3 @@ var _b = _a, {

onChange,
onImageUpload = () => Promise.resolve(null),
onImageUpload = defaultImageUpload,
sticky = true,

@@ -67,0 +74,0 @@ stickyOffset = 0,

@@ -85,2 +85,3 @@ 'use strict';

display: "inline-block",
whiteSpace: "nowrap",
textOverflow: "ellipsis",

@@ -156,2 +157,7 @@ overflow: "hidden",

},
"& ol, & ul": {
marginTop: theme.spacing.sm,
paddingLeft: theme.spacing.md * 2,
listStylePosition: "outside"
},
"& h1": {

@@ -185,2 +191,10 @@ fontSize: theme.headings.sizes.h1.fontSize,

},
"& blockquote": {
marginTop: 0,
marginLeft: 0,
marginBottom: theme.spacing.sm,
paddingLeft: theme.spacing.md,
color: theme.colorScheme === "dark" ? theme.colors.dark[2] : theme.colors.gray[7],
borderLeft: `4px solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[4]}`
},
"& img": {

@@ -187,0 +201,0 @@ display: "block",

@@ -116,2 +116,6 @@ 'use strict';

value: "sub"
},
blockquote: {
icon: radixIcons.QuoteIcon,
controls: "blockquote"
}

@@ -118,0 +122,0 @@ };

@@ -17,3 +17,4 @@ 'use strict';

"header",
"script"
"script",
"blockquote"
];

@@ -20,0 +21,0 @@ function replaceIcons(quillIconsModule) {

@@ -5,3 +5,3 @@ const DEFAULT_CONTROLS = [

["unorderedList", "orderedList"],
["link", "image", "video"],
["link", "image", "video", "blockquote"],
["alignLeft", "alignCenter", "alignRight"],

@@ -8,0 +8,0 @@ ["sup", "sub"]

@@ -51,2 +51,9 @@ import React, { useRef, useMemo, useEffect } from 'react';

replaceIcons(icons);
function defaultImageUpload(file) {
return new Promise((resolve) => {
const reader = new FileReader();
reader.onloadend = () => resolve(reader.result);
reader.readAsDataURL(file);
});
}
function RichTextEditor(_a) {

@@ -56,3 +63,3 @@ var _b = _a, {

onChange,
onImageUpload = () => Promise.resolve(null),
onImageUpload = defaultImageUpload,
sticky = true,

@@ -59,0 +66,0 @@ stickyOffset = 0,

@@ -81,2 +81,3 @@ import { createMemoStyles, getFontStyles } from '@mantine/core';

display: "inline-block",
whiteSpace: "nowrap",
textOverflow: "ellipsis",

@@ -152,2 +153,7 @@ overflow: "hidden",

},
"& ol, & ul": {
marginTop: theme.spacing.sm,
paddingLeft: theme.spacing.md * 2,
listStylePosition: "outside"
},
"& h1": {

@@ -181,2 +187,10 @@ fontSize: theme.headings.sizes.h1.fontSize,

},
"& blockquote": {
marginTop: 0,
marginLeft: 0,
marginBottom: theme.spacing.sm,
paddingLeft: theme.spacing.md,
color: theme.colorScheme === "dark" ? theme.colors.dark[2] : theme.colors.gray[7],
borderLeft: `4px solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[4]}`
},
"& img": {

@@ -183,0 +197,0 @@ display: "block",

@@ -1,2 +0,2 @@

import { FontBoldIcon, FontItalicIcon, UnderlineIcon, StrikethroughIcon, ListBulletIcon, Link1Icon, ImageIcon, TextNoneIcon, TextAlignCenterIcon, TextAlignLeftIcon, TextAlignRightIcon, VideoIcon } from '@modulz/radix-icons';
import { FontBoldIcon, FontItalicIcon, UnderlineIcon, StrikethroughIcon, ListBulletIcon, Link1Icon, ImageIcon, TextNoneIcon, TextAlignCenterIcon, TextAlignLeftIcon, TextAlignRightIcon, VideoIcon, QuoteIcon } from '@modulz/radix-icons';
import { OrderedList } from './icons/OrderedList.js';

@@ -112,2 +112,6 @@ import { H1 } from './icons/H1.js';

value: "sub"
},
blockquote: {
icon: QuoteIcon,
controls: "blockquote"
}

@@ -114,0 +118,0 @@ };

@@ -13,3 +13,4 @@ const CLEANUP = [

"header",
"script"
"script",
"blockquote"
];

@@ -16,0 +17,0 @@ function replaceIcons(quillIconsModule) {

@@ -104,4 +104,8 @@ /// <reference types="react" />

};
readonly blockquote: {
readonly icon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
readonly controls: "blockquote";
};
};
export declare type ToolbarControl = keyof typeof CONTROLS;
//# sourceMappingURL=controls.d.ts.map

@@ -1,2 +0,1 @@

import { Quill } from 'react-quill';
interface Options {

@@ -6,7 +5,7 @@ upload(file: File): Promise<string>;

export declare class ImageUploader {
quill: Quill;
quill: any;
options: Options;
range: any;
fileHolder: HTMLInputElement;
constructor(quill: Quill, options: Options);
constructor(quill: any, options: Options);
selectLocalImage(): void;

@@ -13,0 +12,0 @@ handleDrop(event: any): void;

{
"name": "@mantine/rte",
"description": "Rich text editor built with Mantine components",
"version": "2.5.0-alpha.5",
"version": "2.5.0",
"main": "cjs/index.js",

@@ -18,4 +18,4 @@ "module": "esm/index.js",

"peerDependencies": {
"@mantine/core": "2.5.0-alpha.5",
"@mantine/hooks": "2.5.0-alpha.5",
"@mantine/core": "2.5.0",
"@mantine/hooks": "2.5.0",
"react": ">=16.8.0",

@@ -28,5 +28,5 @@ "react-dom": ">=16.8.0"

"react-jss": "^10.7.1",
"react-quill": "^1.3.5"
"react-quill": "2.0.0-beta.4"
},
"devDependencies": {}
}
# Mantine Rich Text Editor
@mantine/rte is a rich text editor based on [Quill.js](https://quilljs.com/).
[Read documentation on Mantine website](https://mantine.dev/others/rte/)
![Demo](https://raw.githubusercontent.com/mantinedev/mantine/next-minor/.demo/rich-text-editor.png)
## Installation
Package depends on [react](https://www.npmjs.com/package/react), [react-dom](https://www.npmjs.com/package/react-dom), [@mantine/hooks](https://www.npmjs.com/package/@mantine/hooks), [@mantine/core](https://www.npmjs.com/package/@mantine/core).
Install with npm:
```sh
npm install @mantine/rte @mantine/core @mantine/hooks
```
Install with yarn:
```sh
yarn add @mantine/rte @mantine/core @mantine/hooks
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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