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

ember-wysihtml

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-wysihtml

A component that wraps the Wysihtml library (http://wysihtml.com/)

  • 0.1.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

Ember-wysihtml

This a simple ember component that wraps Wysihtml.js library. A working demo can be found at here.

Instalation

Simply run ember install ember-wysihtml at your ember project root folder. Or npm install ember-wysihtml --save && ember g ember-wysihtml.

Example Usage

On a template:

{{wysi-editor
  content=someContent
  toolbar=myToolbar
  pasteHTML=true
  placeholder="This is a nice placeholder"
}}

On a controller/component:

  myToolbar: [
    { command: 'bold', title: 'Ctrl+B', iconClass: 'fa fa-bold', iconAlt:'Bold'},
    { command: 'italic', title: 'Ctrl+I', iconClass: 'fa fa-italic', iconAlt:'Italic' },
    { command: 'underline', title: 'Ctrl+U', iconClass: 'fa fa-underline', iconAlt:'Underline' }
  ]

Component Parameters

{{wysi-editor
  content=someContent
  toolbar=myToolbar
  customToolbarClasses="my-custom-toolbar",
  toolbarCustomBtnClass="wysi-btn"
  pasteHTML=false
  placeholder="Some nice place holder"
  ...  
}}

Toolbar setup

A toolbar is an Array of objects defined like this:

  myToolbar: [
    ...
    { 
      command: 'someValidCommand', // data-wysihtml5-command
      commandValue: someValue      // data-wysihtml5-command-value
      commandValueBlank: true      // data-wysihtml5-command-blank-value (boolean)
      action: 'someValidAction',   // data-wysihtml5-action
      title: 'A title',
      iconClass: 'my-icon-class', 
      iconAlt:'Alt if iconClass not used'
    },
    ...
  ]

Check valid command and actions at http://wysihtml.com/examples

Contributing

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Keywords

FAQs

Package last updated on 04 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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