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

react-simple-wysiwyg

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-wysiwyg - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

lib/index.cjs.js

97

lib/index.d.ts

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

export * from './editor';
export * from './toolbar';
/// <reference types="react" />
/* eslint-disable react/prop-types */
import * as React from "react";
import { HTMLAttributes, SyntheticEvent, ReactNode } from "react";
/**
* Based on https://github.com/lovasoa/react-contenteditable
* A simple component for an html element with editable contents.
*/
declare const ContentEditable: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ContentEditableProps & import("react").RefAttributes<HTMLElement>>>;
type ContentEditableEvent = SyntheticEvent<any, Event> & {
target: {
name?: string;
value: string;
};
};
interface ContentEditableProps extends HTMLAttributes<HTMLElement> {
disabled?: boolean;
contentEditableRef?: (el: HTMLElement) => void;
name?: string;
onChange?: (event: ContentEditableEvent) => void;
tagName?: string;
value?: string;
}
declare function Editor({ children, onSelect, ...rest }: EditorProps): JSX.Element;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface EditorProps extends ContentEditableProps {
}
declare function DefaultEditor(props: EditorProps): JSX.Element;
declare const EditorContext: React.Context<EditorState>;
declare function EditorProvider({ children }: {
children: ReactNode;
}): JSX.Element;
declare function useEditorState(): EditorState;
interface EditorState {
update(attrs: Partial<EditorState>): void;
$el?: HTMLElement;
$selection?: Node;
htmlMode: boolean;
}
declare function HtmlEditor({ ...rest }: {
[x: string]: any;
}): JSX.Element;
declare const BtnBold: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnBulletList: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnClearFormatting: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnItalic: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnLink: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnNumberedList: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnRedo: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnUnderline: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnUndo: {
(props: HTMLAttributes<HTMLButtonElement>): JSX.Element;
displayName: string;
};
declare const BtnStyles: typeof Dropdown;
declare function Dropdown({ items, selected, ...inputProps }: DropdownProps): JSX.Element;
type DropDownItem = [
string,
string | ((editorState: EditorState) => void),
string
];
interface DropdownProps extends HTMLAttributes<HTMLSelectElement> {
selected?: number;
items?: DropDownItem[];
}
declare function HtmlButton({ ...rest }: {
[x: string]: any;
}): JSX.Element;
declare function Separator(): JSX.Element;
declare function Toolbar(props: HTMLAttributes<HTMLDivElement>): JSX.Element;
export { ContentEditable, ContentEditableEvent, ContentEditableProps, DefaultEditor, Editor, EditorProps, EditorContext, EditorProvider, useEditorState, EditorState, HtmlEditor, BtnBold, BtnBulletList, BtnClearFormatting, BtnItalic, BtnLink, BtnNumberedList, BtnRedo, BtnUnderline, BtnUndo, BtnStyles, Dropdown, DropDownItem, DropdownProps, HtmlButton, Separator, Toolbar };

59

package.json
{
"name": "react-simple-wysiwyg",
"version": "2.0.2",
"version": "2.1.0",
"description": "Simple and lightweight React WYSIWYG editor",
"main": "lib/umd/index.js",
"module": "lib/index.js",
"unpkg": "lib/umd/index.min.js",
"main": "lib/index.cjs.js",
"module": "lib/index.es.js",
"unpkg": "lib/index.umd.min.js",
"typings": "lib/index.d.ts",

@@ -14,3 +14,3 @@ "type": "module",

"pages": "gh-pages -d examples/github.io",
"lint": "eslint src examples",
"lint": "tsc --noEmit && eslint src examples",
"postversion": "git push && git push --tags",

@@ -36,26 +36,24 @@ "prepare": "npm install --prefix examples/typescript",

"devDependencies": {
"@types/react": "^17.0.39",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"eslint": "^8.8.0",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"@types/react": "^18.0.17",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"eslint": "^8.22.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tsc": "^2.0.0",
"gh-pages": "^3.2.3",
"husky": "4",
"lint-staged": "^12.3.3",
"prettier": "^2.5.1",
"react": "^17.0.1",
"react-dom": "^17.0.2",
"rollup": "^2.67.2",
"gh-pages": "^4.0.0",
"prettier": "^2.7.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^2.78.0",
"rollup-plugin-filesize": "^9.1.2",
"rollup-plugin-styles": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.31.2",
"rollup-plugin-ts": "^3.0.2",
"spech": "^0.2.1",
"typescript": "^4.5.5"
"typescript": "^4.7.4"
},

@@ -65,15 +63,2 @@ "peerDependencies": {

},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.+(js|jsx|ts|tsx)": [
"eslint --fix --plugin tsc --rule 'tsc/config: [2, {configFile: \"./tsconfig.json\"}]' --ignore-pattern examples --ignore-pattern rollup.config.js"
],
"*.+(json|css)": [
"prettier --write"
]
},
"prettier": {

@@ -80,0 +65,0 @@ "printWidth": 80,

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