0.0.5 • Published 6 years ago

wc-wysiwyg v0.0.5

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

ALPHA: WC-WYSIWYG

WYSIWYG Text editor built with a Custom Element

This package is still in alpha.


Installation

Using npm:

$ npm install wc-wysiwyg

Then with a module bundler like webpack, use as you would anything else:

// using ES6 modules
import 'wc-wysiwyg';

This will automatically register the custom element <wc-wysiwyg> ready for you to use.

Usage

In your HTML, add the element <wc-wysiwyg>, and you’re good to go

<!DOCTYPE html>
<html lang="en">
<body>
    <wc-wysiwyg>
    <script type="text/javascript" src="wc-wysiwyg.min.js"></script>
</body>
</html>

Shortcuts

CommandKeys
BoldCmd + b
ItalicCmd + i
UnderlineCmd + u
Align LeftCmd + Shift + l
Align CenterCmd + Shift + c
Align RightCmd + Shift + r
IndentTab
OutdentShift + Tab

Simple mode

This mode only shows Bold, Italic and Underline controls.

<wc-wysiwyg simple>

Issues

If you find a bug, please file an issue on the issue tracker on GitHub.

Credits

Web Components Text WYSIWYG is built and maintained by Tristan Matthias.