0.1.3 • Published 8 years ago

material-ui-html-field v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

#material-ui-html-field

Html WYSIWYG editor based on react & material-ui & simditor.

Installation

material-ui-html-field is available as an npm package.

npm i material-ui-html-field
import React from 'react';
import HtmlField from 'material-ui-html-field';

export default class MyAwesomeReactComponent extends React.Component  {
  constructor(props) {
    super(props);
    this.state={
      html:'',
      htmlError:''
    };
  }
  render(){
    let editorConfig={
		//simditor configure
    }
    return (
      <HtmlField
        floatingLabelText="Html Editor"
        value={this.state.html}
        errorText={this.state.htmlError}
        {...editorConfig}
      />
    )
  }
}

Example

git clone https://github.com/maichong/material-ui-html-field.git

cd material-ui-html-field/example

npm install

npm start

// see http://localhost:3000

Props

className

errorStyle

errorText

floatingLabelStyle

floatingLabelText

ref

style

value

hintText

locale en-US or zh-CN

Simditor Config

toolbar

toolbarFloat

toolbarFloatOffset

toolbarHidden

defaultImage

tabIndent

params

upload

pasteImage

cleanPaste

imageButton

allowedTags

allowedAttributes

allowedStyles

codeLanguages

Methods

getValue()

focus()

blur()

Events

onBlur

onChange

onFocus

Contribute

Maichong Software

Liang Xingchen

License

This project is licensed under the terms of the MIT license

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago