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

kattappa

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kattappa - npm Package Compare versions

Comparing version 0.6.0 to 0.7.1

lib/components/scribe-options.js

20

lib/blocks/h2.js

@@ -13,10 +13,8 @@ 'use strict';

var _medium = require('../components/medium');
var _scribe = require('../components/scribe');
var _medium2 = _interopRequireDefault(_medium);
var _scribe2 = _interopRequireDefault(_scribe);
var _editoroptions = require('../utils/editoroptions');
var _scribeOptions = require('../components/scribe-options');
var _editoroptions2 = _interopRequireDefault(_editoroptions);
var _text = require('./text');

@@ -33,3 +31,5 @@

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
// import getConfig from '../utils/editoroptions';
var BlockH2 = function (_BlockText$React) {

@@ -47,3 +47,2 @@ _inherits(BlockH2, _BlockText$React);

value: function captureReturn() {
this.options = (0, _editoroptions2.default)();
this.props.addBlock("text", this.props.position);

@@ -57,9 +56,10 @@ }

{ className: 'katap-block katap-h2' },
_react2.default.createElement(_medium2.default
_react2.default.createElement(_scribe2.default
//showToolbar={false}
, { options: this.options,
, { options: _scribeOptions.baseInlineOptions,
content: this.props.content,
captureReturn: this.captureReturn,
enterCapture: true,
onContentChanged: this.onContentChanged })
onContentChanged: this.onContentChanged,
placeholder: 'Heading',
enterCapture: true })
);

@@ -66,0 +66,0 @@ }

@@ -13,6 +13,4 @@ 'use strict';

var _editoroptions = require('../utils/editoroptions');
var _scribeOptions = require('../components/scribe-options');
var _editoroptions2 = _interopRequireDefault(_editoroptions);
var _text = require('./text');

@@ -22,5 +20,5 @@

var _medium = require('../components/medium');
var _scribe = require('../components/scribe');
var _medium2 = _interopRequireDefault(_medium);
var _scribe2 = _interopRequireDefault(_scribe);

@@ -43,3 +41,2 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

_this.options = (0, _editoroptions2.default)();
_this.onContentChanged = _this.onContentChanged.bind(_this);

@@ -78,4 +75,4 @@ _this.onCreditChange = _this.onCreditChange.bind(_this);

{ className: 'katap-block katap-text' },
_react2.default.createElement(_medium2.default, {
options: this.options,
_react2.default.createElement(_scribe2.default, {
options: _scribeOptions.baseOptions,
content: this.props.content.content,

@@ -82,0 +79,0 @@ onContentChanged: this.onContentChanged }),

@@ -13,5 +13,5 @@ 'use strict';

var _medium = require('../components/medium');
var _scribe = require('../components/scribe');
var _medium2 = _interopRequireDefault(_medium);
var _scribe2 = _interopRequireDefault(_scribe);

@@ -22,2 +22,4 @@ var _editoroptions = require('../utils/editoroptions');

var _scribeOptions = require('../components/scribe-options');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -82,5 +84,5 @@

),
_react2.default.createElement(_medium2.default, {
_react2.default.createElement(_scribe2.default, {
content: this.props.content,
options: this.options,
options: _scribeOptions.baseTextOptions,
onContentChanged: this.onContentChanged })

@@ -87,0 +89,0 @@ );

@@ -13,10 +13,8 @@ 'use strict';

var _medium = require('./medium');
var _scribe = require('./scribe');
var _medium2 = _interopRequireDefault(_medium);
var _scribe2 = _interopRequireDefault(_scribe);
var _editoroptions = require('../utils/editoroptions');
var _scribeOptions = require('./scribe-options');
var _editoroptions2 = _interopRequireDefault(_editoroptions);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -38,3 +36,2 @@

_this.options = (0, _editoroptions2.default)();
_this.captureReturn = _this.captureReturn.bind(_this);

@@ -62,8 +59,9 @@ _this.onContentChanged = _this.onContentChanged.bind(_this);

value: function render() {
return _react2.default.createElement(_medium2.default, {
return _react2.default.createElement(_scribe2.default, {
content: this.props.content,
captureReturn: this.captureReturn,
enterCapture: true,
options: this.options,
onContentChanged: this.onContentChanged });
options: _scribeOptions.baseInlineOptions,
onContentChanged: this.onContentChanged,
placeholder: 'Add list item...' });
}

@@ -70,0 +68,0 @@ }]);

@@ -77,6 +77,11 @@ 'use strict';

var currentBlock = newBlocks[position];
if (currentBlock.type !== _blocks2.default.text.Name || currentBlock.data.indexOf(splitter) < 0) {
if (currentBlock.type !== _blocks2.default.text.Name) {
return;
}
var stringsTmp = currentBlock.data.split(splitter);
var splitterRegex = /((?:\<[a-zA-Z\d]{1,}\>){1,2}\<br\>(?:\<\/[a-zA-Z\d]{1,}\>){1,2})/gi;
var stringsFix = currentBlock.data.replace(splitterRegex, splitter);
var stringsTmp = stringsFix.split(splitter);
var strings = [];

@@ -83,0 +88,0 @@ stringsTmp.forEach(function (str) {

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

var _scribe = require('./components/scribe');
var _scribe2 = _interopRequireDefault(_scribe);
var _droppable = require('./components/droppable');

@@ -35,3 +39,4 @@

DroppableComponent: _droppable2.default,
UrlRegex: _utils.UrlRegex
UrlRegex: _utils.UrlRegex,
ScribeComponent: _scribe2.default
};

@@ -6,3 +6,4 @@ "use strict";

ESC: 27,
BACKSPACE: 8
BACKSPACE: 8,
S: 83
};
{
"name": "kattappa",
"version": "0.6.0",
"version": "0.7.1",
"description": "A block based rich text editor with support of Images, embeds( Youtube, Instagram, Vine, Vimeo etc)",

@@ -34,3 +34,10 @@ "main": "./lib/index.js",

"react": "^0.14.6",
"react-dom": "^0.14.6"
"react-dom": "^0.14.6",
"scribe-editor": "^3.2.0",
"scribe-plugin-curly-quotes": "^1.0.1",
"scribe-plugin-formatter-html-ensure-semantic-elements": "^1.0.1",
"scribe-plugin-formatter-plain-text-convert-new-lines-to-html": "^0.1.1",
"scribe-plugin-heading-command": "^0.1.0",
"scribe-plugin-sanitizer": "^0.1.10",
"scribe-plugin-smart-lists": "^0.1.8"
},

@@ -37,0 +44,0 @@ "devDependencies": {

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