nocms-editor

1.6.2 • Public • Published

NoCMS Editor (Work in progress)

Editor for NoCMS. Used by publishers. Features editors of different complexity and options.

semantic-release Dependency Status devDependencies

Installation

Install nocms-editor from NPM and include it in your own React build process (using Browserify, Webpack, etc).

npm install nocms-editor

Usage

import { Simple } from 'nocms-editor';

<Simple text={text} placeholder={placeholder} scope={scope} />

Commit message format and publishing

This repository is published using semantic-release, with the default AngularJS Commit Message Conventions.

API

Simple

This is the simple version of the text editor and is based on an ordinary input field.

text PropTypes.string

Text to display in the input field

placeholder PropTypes.string

Placeholder string. Typically used to indicate which content the publisher should add. Default 'Add text...'

scope PropTypes.string

The full path to this key in pageData. E.g. 'components.2.header'

LinkEditor

A slightly more advanced editor. Features bold, italic, underline, lists and link option.

text PropTypes.string

Text to display in the input field

placeholder PropTypes.string

Placeholder string. Typically used to indicate which content the publisher should add.

scope PropTypes.string

The full path to this key in pageData. E.g. 'components.2.header'

PlainTextEditor

Text editor without any formatting options. Intended for use where you normally would use textarea, but without e.g. resizing limitations of native text areas.

text PropTypes.string

Text to display in the input field

placeholder PropTypes.string

Placeholder string. Typically used to indicate which content the publisher should add.

scope PropTypes.string

The full path to this key in pageData. E.g. 'components.2.header'

SimpleMultiline deprecated

Was intended to use as a simpler editor without formatting options. Based on text area. We don't recommand the use of it, as it lacks a proper auto resize option and does not save markup like the rest of the editors. Will be removed in a later release.

text PropTypes.string

Text to display in the input field.

placeholder PropTypes.string

Placeholder string

scope PropTypes.string

The full path to this key in pageData. E.g. 'components.2.header'

center PropTypes.bool

Adds a center class for styling

autoresize PropTypes.bool

Buggy. If the text area should auto resize with height or not.

Readme

Keywords

none

Package Sidebar

Install

npm i nocms-editor

Weekly Downloads

2

Version

1.6.2

License

ISC

Unpacked Size

76.2 kB

Total Files

27

Last publish

Collaborators

  • nocms