Skip to content

TheSharpieOne/quill-html-edit-button

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quill-html-edit-button

NPM Version License Downloads/week Github Issues

Quill.js Module which allows you to quickly view/edit the HTML in the editor

Demo

Install

yarn add quill-html-edit-button

Quickstart

import { htmlEditButton } from "./quill.htmlEditButton.js";

Quill.register("modules/htmlEditButton", htmlEditButton);

const quill = new Quill(editor, {
  // ...
  modules: {
    // ...
    htmlEditButton: {}
  }
});

Quickstart (script tag)

    <script src="/dist/quill.htmlEditButton.min.js"></script>
    <script>
      Quill.register("modules/htmlEditButton", htmlEditButton);
      const quill = new Quill(editor, {
        // ...
        modules: {
          // ...
          htmlEditButton: {}
        }
      });
    </script>

Options

modules: {
  // ...
  htmlEditButton: {
    debug: true, // logging, default:false
    msg: "Edit the content in HTML format", //Custom message to display in the editor, default: Edit HTML here, when you click "OK" the quill editor's contents will be replaced
    okText: "Ok", // Text to display in the OK button, default: Ok,
    cancelText: "Cancel", // Text to display in the cancel button, default: Cancel
    buttonHTML: "&lt;&gt;", // Text to display in the toolbar button, default: <>
    buttonTitle: "Show HTML source" // Text to display as the tooltip for the toolbar button, default: Show HTML source
  }
}

Thanks

This project is based on quill-image-uploader, thanks mate!

About

Quill.js Module which allows you to quickly view/edit the HTML in the editor

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 69.6%
  • HTML 23.0%
  • CSS 7.4%