simple-wysiwyg

0.5.15 • Public • Published

simple-wysiwyg

inline-only-wysiwyg

Feature

Installation

Usage

window.addEventListener('DOMContentLoaded',function(){
  new SimpleWysiwyg('.js-simple-wysiwyg',{
    mode:'direct',
    message: {
      addLinkTitle: 'リンク先URLを入力してください。',
      addLinkBtn: 'リンクの挿入',
      resetStyleBtn: 'リセット',
      sourceBtn: 'ソース'
    },
    selectOptions: [
      { 
        label: '本文', 
        value: 'p'
      },
      { 
        label: 'マークダウン', 
        value: 'markdown', 
        onSelect: function(){
          this.toMarkdown();
        }
      }
    ],
    selectedOption: 'p',
    btnOptions: [
      { label: 'リンクを挿入', tag: 'a', className: ''},
      { label: '強調1', tag: 'em', className: ''},
      { label: '強調2', tag: 'strong', className: ''},
      { label: '', tag: 'span', className: 'red'},
      { label: '', tag: 'span', className: 'blue'},
      { label: '', tag: 'span', className: 'yellow'}
    ]
  });
});

Download

Download ZIP

Github

https://github.com/appleple/simple-wysiwyg

Contributor

@steelydylan

License

Code and documentation copyright 2017 by appleple, Inc. Code released under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i simple-wysiwyg

Weekly Downloads

0

Version

0.5.15

License

MIT

Last publish

Collaborators

  • appleple