npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

quill-rich-voice-editor

v0.4.0

Published

<img src="docs/rich_voice_editor.png?raw=true" align="right" width="150" height="150">

Downloads

839

Readme

rich-voice-editor

Rich Voice Editor: Quill Rich Text Editor Enhancements to support SSML

With this module you can enhance the Quill Rich Text Editor https://quilljs.com/ to support SSML tags.

rich-voice-editor-screenshot

The following SSML tags / functions are supported: SSML Tags and Functions The current functionality is optimized for AWS Polly with special Amazon SSML Tags

Live Demo: https://fabiancelik.github.io/rich-voice-editor/

Try on jsfiddle: https://jsfiddle.net/fabiancelik/opa6cbj4/16/

Installation

Use the CDN link https://cdn.jsdelivr.net/npm/[email protected]/dist/richVoiceEditor.min.js

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/richVoiceEditor.min.js"></script>

Or use the package manager npm to install rich-voice-editor.

npm install quill-rich-voice-editor
<script src="./node_modules/quill-rich-voice-editor/dist/richVoiceEditor.min.js"></script>

URL to npm package: https://www.npmjs.com/package/quill-rich-voice-editor

Usage

  1. Please check the official Quill documentation for the basics first: https://quilljs.com/docs/quickstart/

  2. Include the richVoiceEditor.min.js via CDN or NPM in a script-tag.

  3. Add containters and handlers for every tag/function you want to use.

  4. Register the module to the Quill Editor.

  5. Set 'rich-voice-editor' in modules to true.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="UTF-8">
    <title>Rich Voice Editor - Example</title>

    <link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
</head>

<body>
    <div id="editor" class="center"></div>
    <script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/richVoiceEditor.min.js"></script>
    <script>
        var ssmlToolbarOptions = {
            container: [
                ['ssml_speak'], // Add this.
                [{ 'ssml_break': ['weak', 'strong', 'x-strong'] }], // Add this.
                ['ssml_emphasis'], // Add this.
                ['ssml_whispering'], // Add this.
                [{ 'ssml_language': ['en-US', 'en-GB', 'de-DE', 'es-ES', 'fr-FR', 'it-IT', 'nl-NL', 'ru-RU', 'tr-TR'] }], // Add this.
                ['ssml_paragraph'], // Add this.
                [{ 'ssml_sayas': ['spell-out', 'number', 'ordinal', 'digits', 'fraction', 'expletive'] }], // Add this.
                [{ 'ssml_date': ['mdy', 'dmy', 'ymd', 'md', 'dm', 'ym', 'my', 'd', 'm', 'y'] }], // Add this.
                ['ssml_substitute'], // Add this.
                ['ssml_breaths'], // Add this.
                ['ssml_phoneme'], // Add this.
                ['ssml_parse'], // Add this.
                ['ssml_validate'] // Add this.
            ],
            handlers: {
                'ssml_speak': function () { }, // Add this.
                'ssml_break': function () { }, // Add this.
                'ssml_emphasis': function () { }, // Add this.
                'ssml_language': function () { }, // Add this.
                'ssml_paragraph': function () { }, // Add this.
                'ssml_sayas': function () { }, // Add this.
                'ssml_date': function () { }, // Add this.
                'ssml_substitute': function () { }, // Add this.
                'ssml_breaths': function () { }, // Add this.
                'ssml_phoneme': function () { }, // Add this.
                'ssml_whispering': function () { }, // Add this.
                'ssml_parse': function () { }, // Add this.
                'ssml_validate': function () { }// Add this.
            }
        }

        Quill.register({
            'modules/rich-voice-editor': RichVoiceEditor // Add this.
        })

        var quill = new Quill('#editor', {
            theme: 'snow',
            modules: {
                toolbar: ssmlToolbarOptions,
                'rich-voice-editor': true // Add this.
            },
            placeholder: '<speak>Your text here</speak>'
        });
    </script>
</body>

</html>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

To create the production build after changes in /src/index.js please use the following commands:

npm i 
npm run-script build

Please see the Wiki to learn more how to add more SSML Tags. I would especially appreciate a better Amazon Alexa support.

License

MIT