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

@uiw/react-textarea-code-editor

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-textarea-code-editor - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

57

cjs/index.js

@@ -23,2 +23,4 @@ "use strict";

var _jsxRuntime = require("react/jsx-runtime");
var _SelectionText = require("./SelectionText");

@@ -70,3 +72,3 @@

var preView = (0, _react.useMemo)(function () {
return /*#__PURE__*/_react.default.createElement("div", {
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
style: (0, _extends2.default)({}, styles.editor, contentStyle, {

@@ -82,29 +84,30 @@ minHeight: minHeight

[prefixCls, language, htmlStr]);
return /*#__PURE__*/_react.default.createElement("div", {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
style: (0, _extends2.default)({}, styles.container, style),
className: prefixCls + " " + (className || '')
}, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({
autoComplete: "off",
autoCorrect: "off",
spellCheck: "false",
autoCapitalize: "off"
}, other, {
placeholder: placeholder,
onKeyDown: function onKeyDown(evn) {
(0, _shortcuts.default)(evn);
other.onKeyDown && other.onKeyDown(evn);
},
style: (0, _extends2.default)({}, styles.editor, styles.textarea, contentStyle, {
minHeight: minHeight
}, placeholder && !value ? {
WebkitTextFillColor: 'inherit'
} : {}),
ref: textRef,
onChange: function onChange(evn) {
setValue(evn.target.value);
_onChange && _onChange(evn);
},
className: prefixCls + "-text",
value: value
})), preView);
className: prefixCls + " " + (className || ''),
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", (0, _extends2.default)({
autoComplete: "off",
autoCorrect: "off",
spellCheck: "false",
autoCapitalize: "off"
}, other, {
placeholder: placeholder,
onKeyDown: function onKeyDown(evn) {
(0, _shortcuts.default)(evn);
other.onKeyDown && other.onKeyDown(evn);
},
style: (0, _extends2.default)({}, styles.editor, styles.textarea, contentStyle, {
minHeight: minHeight
}, placeholder && !value ? {
WebkitTextFillColor: 'inherit'
} : {}),
ref: textRef,
onChange: function onChange(evn) {
setValue(evn.target.value);
_onChange && _onChange(evn);
},
className: prefixCls + "-text",
value: value
})), preView]
});
});

@@ -111,0 +114,0 @@

@@ -9,2 +9,4 @@ import _extends from "@babel/runtime/helpers/esm/extends";

import "./style/index.css";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
export * from './SelectionText';

@@ -47,3 +49,3 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {

var preView = useMemo(function () {
return /*#__PURE__*/React.createElement("div", {
return /*#__PURE__*/_jsx("div", {
style: _extends({}, styles.editor, contentStyle, {

@@ -59,30 +61,31 @@ minHeight: minHeight

[prefixCls, language, htmlStr]);
return /*#__PURE__*/React.createElement("div", {
return /*#__PURE__*/_jsxs("div", {
style: _extends({}, styles.container, style),
className: prefixCls + " " + (className || '')
}, /*#__PURE__*/React.createElement("textarea", _extends({
autoComplete: "off",
autoCorrect: "off",
spellCheck: "false",
autoCapitalize: "off"
}, other, {
placeholder: placeholder,
onKeyDown: function onKeyDown(evn) {
shortcuts(evn);
other.onKeyDown && other.onKeyDown(evn);
},
style: _extends({}, styles.editor, styles.textarea, contentStyle, {
minHeight: minHeight
}, placeholder && !value ? {
WebkitTextFillColor: 'inherit'
} : {}),
ref: textRef,
onChange: function onChange(evn) {
setValue(evn.target.value);
_onChange && _onChange(evn);
},
className: prefixCls + "-text",
value: value
})), preView);
className: prefixCls + " " + (className || ''),
children: [/*#__PURE__*/_jsx("textarea", _extends({
autoComplete: "off",
autoCorrect: "off",
spellCheck: "false",
autoCapitalize: "off"
}, other, {
placeholder: placeholder,
onKeyDown: function onKeyDown(evn) {
shortcuts(evn);
other.onKeyDown && other.onKeyDown(evn);
},
style: _extends({}, styles.editor, styles.textarea, contentStyle, {
minHeight: minHeight
}, placeholder && !value ? {
WebkitTextFillColor: 'inherit'
} : {}),
ref: textRef,
onChange: function onChange(evn) {
setValue(evn.target.value);
_onChange && _onChange(evn);
},
className: prefixCls + "-text",
value: value
})), preView]
});
});
//# sourceMappingURL=index.js.map
{
"name": "@uiw/react-textarea-code-editor",
"version": "1.4.2",
"version": "1.4.3",
"description": "A simple code editor with syntax highlighting.",

@@ -85,7 +85,7 @@ "homepage": "https://uiwjs.github.io/react-textarea-code-editor/",

"@types/testing-library__jest-dom": "5.14.1",
"@uiw/react-github-corners": "1.4.0",
"@uiw/react-markdown-preview": "3.2.2",
"@uiw/react-github-corners": "1.5.1",
"@uiw/react-markdown-preview": "3.3.0",
"code-example": "3.0.6",
"compile-less-cli": "1.8.1",
"husky": "7.0.1",
"compile-less-cli": "1.8.8",
"husky": "7.0.2",
"kkt": "6.11.0",

@@ -98,3 +98,3 @@ "lint-staged": "11.1.2",

"rehype-attr": "1.4.2",
"tsbb": "3.0.0-rc.7"
"tsbb": "3.0.1"
},

@@ -101,0 +101,0 @@ "eslintConfig": {

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