GithubHelp home page GithubHelp logo

benwinding / quill-html-edit-button Goto Github PK

View Code? Open in Web Editor NEW
147.0 7.0 42.0 9.63 MB

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

Home Page: https://benwinding.github.io/quill-html-edit-button/script-tags/demo-quill-1.x.html

License: MIT License

JavaScript 12.17% CSS 5.77% TypeScript 82.06%
quill html javascript

quill-html-edit-button's Introduction

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 (Javascript)

import Quill from 'quill/core';
import Toolbar from 'quill/modules/toolbar';
import Snow from 'quill/themes/snow';

import htmlEditButton from "quill-html-edit-button";

Quill.register({
  'modules/toolbar': Toolbar,
  'themes/snow': Snow,
  "modules/htmlEditButton": htmlEditButton
})

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

Quickstart (typescript)

Due to Quill's implementation, typescript integration is not trivial:

  • Follow the demo example here demos/typescript/src/index.ts
  • The file setup.js is to use the library without types (as they aren't implemented with quill modules).
  • Your tsconfig.json needs the following properties, to prevent errors:
  "compilerOptions": {
    "allowJs": true,
    "checkJs": false
  }

Quickstart (script tag)

<script src="https://unpkg.com/[email protected]/dist/quill.js"></script>
<script src="https://unpkg.com/[email protected]/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
    syntax: false, // Show the HTML with syntax highlighting. Requires highlightjs on window.hljs (similar to Quill itself), default: false
    prependSelector: 'div#myelement', // a string used to select where you want to insert the overlayContainer, default: null (appends to body),
    editorModules: {} // The default mod
  }
}

Syntax Highlighting

By default syntax highlighting is off, if you want to enable it use syntax: true in the options (as shown above) and make sure you add the following script tags:

<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/github.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
<script
  charset="UTF-8"
  src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/xml.min.js"
></script>

Alternatively, include these scripts in your package bundler, as long as highlightjs is available in the global space at window.hljs.

Customising The HTML Editor

The editor itself is actually a Quill Editor instance too! So you can pass in custom modules like this:

  // options
  htmlEditButton: {
    // Flags
    debug?: boolean;              // default:  false 
    syntax?: boolean;             // default:  false  
    // Overlay
    closeOnClickOverlay: boolean; // default:  true                       
    prependSelector: string;      // default:  null                       
    // Labels
    buttonHTML?: string;          // default:  "&lt;&gt;"
    buttonTitle?: string;         // default:  "Show HTML source"
    msg: string;                  // default:  'Edit HTML here, when you click "OK" the quill editor\'s contents will be replaced'     
    okText: string;               // default:  "Ok"
    cancelText: string;           // default:  "Cancel"            
    // Quill Modules (for the HTML editor)
    editorModules?: {             // default:  null
      // Any modules here will be declared in HTML quill editor instance
      keyboard: {
        bindings: {
          custom: {
            key: 'a',
            handler: function(range, context) {
              console.log('A KEY PRESSED!');
            }
          },
        },
      },
    },
  },

Thanks

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

quill-html-edit-button's People

Contributors

antonio-apt avatar benwinding avatar drsugiaichigo00781vn avatar hdasdoria avatar johankrijt avatar juancrg90 avatar leixuesong avatar markgoncalves avatar onmotion avatar sonsoleslp avatar thesharpieone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

quill-html-edit-button's Issues

<br> tags are replaced incorrectly

In default case

Default Block tag is "P" tag. ✅

quill-html-edit-button replaces <br> tag with <p> </p>
ie;

<p><strong>Test1</strong></p><p><br></p><p>Test2</p>

replaced with

<p><strong>Test1</strong></p><p> </p><p>Test2</p>   ✅ works ok (🤔)

(⚠️ notice how <br> is removed)


In case when default Block tag is changed ❌

Default Block tag is "SPAN" tag.

const Block = Quill.import('blots/block')
Block.tagName = 'SPAN'
Quill.register(Block, true)
<span><strong>Test1</strong></span><span><br></span><span>Test2</span>

replaced with

<span><strong>Test1</strong></span><span> </span><span>Test2</span> ❌ not ok

Result of hmtl editor changes not apply all styles

Hi, can you answer, why if add html -
h1 style="font-family: Arial; font-size: 32px;>Sed ut perspiciatis unde omnis iste sit voluptatem accusantium</h1 to html-editor, and saving.

Tags removed...
My font-family not saving in quill-editor. But size is saving.
Can it posssible to save inline styles to p tags or h1?

CSS into separate file, not into JS

In JS there is: popupContainer.setAttribute("style", "background: #ddd; position: absolute; ...

This should go into a separate file. Please use CSS classes and IDs. Thanks.

Update on the html editor does not trigger any quill output event

I'm trying to use the package on an Angular 10 app, implementing it via Typescript.

After you open the pop up for the html editing, do some html changes and click Ok. That model update does not trigger any output event on the quill editor.

Tried catching the model update using the following methods:
(onEditorChanged)="onEditorChanged($event)" (onContentChanged)="onContentChanged($event)" (onBlur)="onBlur($event)" (onTextChanged)="onTextChanged($event)"

Also tried with:
(ngModelChange)="onModelChanged($event)" but it is inconsistent, sometimes the update triggers this onModelChanged, but not all the time.

What would be the right way to capture that model update after you change the html and click Ok? What I need is to capture that new value that the quill editor has now.

Thanks.

Title on links are missing

Hi there,

First, thanks for this plugin. Its very helpful.

One thing i have noticed is that it doesnt allow me to add some particular html. It just ommit it.

Example:

<a href="#"> and i need to turn it into <a href="#" title="link">

after i click on Ok. The title is missing.

Can somebody helps me with this problem?

Table support

Hi everyone,

So the issue is when i paste a table with :
image

the result is :
image

File not found:'quill.js'

hello,

First of all, thank you for making a nice library ^^

An error occurs like the following text.

./node_modules/quill-html-edit-button/dist/quill.htmlEditButton.min.js
File not found:'quill.js' does not match its name on disk:'./node_modules/Quill/dist/quill'.

My development environment is using ReactJS + react-quill + quill.

Looking at my node module folder structure, it has a structure in the form of'./node_modules/quill/dist/quill', is there any solution?

Tags eliminated

i have this link and want to add the i tag, but output is without
<a href="#" class="stretched-link btn p-0 fw-semibold"><u>View Details</u> <i class="icon-line-arrow-right position-relative ms-1" style="top: 2px"></i></a>

Question about use with Bootstrap/custom classes

Hi,

I have successfully set up your plugin for use and I was wondering if you, or someone else, has any idea on how to make this work.
I want to use the HTML editor to insert bootstrap cards and so on into the content, yet when I click on 'OK' it converts it into something else.

For example this entered into the HTML box:

<div class="card w-50 text-center">
    <div class="card-body">
        <div class="card-title">This is a title</div>
        <p class="card-text"><strong>Emphasis</strong> with some text</p>
        <hr>
        <a href="https://google.com"><img src="https://via.placeholder.com/350x300"><p></p></a><hr>
        
        <a href="https://google.com" style="text-decoration:none!important" class="btn btn-success" role="button"><i class="fas fa-network-wired pr-2"></i> Go to google</a>
    </div>
</div>

This should end up looking like:
image

But instead the submitted HTML turns into:

<p>
  <a href="https://google.com" target="_blank">
    <img src="https://via.placeholder.com/350x300">
    </a>
  </p>
  <p>
    <a href="https://google.com" target="_blank">
       Go to google
    </a>
  </p>

Which looks nothing like it, any idea on how to resolve this?
Thanks in advance!

Clicking OK removes spaces

29 04 2021_18 46 53_REC

Version:
"quill-html-edit-button": "^2.2.4",
"vue2-editor": "^2.6.6",

usage:

//scripts

import htmlEditButton from "quill-html-edit-button";
Quill.register("modules/htmlEditButton", htmlEditButton);
...

 editor_settings: {
                    modules: {
                        htmlEditButton,
                    }
 }

//vue template

<vue-editor v-model="form.human_body" :editor-toolbar="custom_toolbar"  :editor-options="editor_settings" ></vue-editor>

Enhancement: Line breaks after each closing tag

Obivously, quill puts all HTML into one line, which makes it hard to read.

As an idea: The html-edit-plugin could add line breaks after each closing HTML tag, such as </p>.

This would increase the readability a lot.

How to use in Vue3 Component?

i`m use this plugin in Vue3 Component.but, it does not work.

docs: https://vueup.github.io/vue-quill/guide/modules.html

<template>
  <quill-editor class="mail-editor" theme="snow" :modules="modules" toolbar="full"></quill-editor>
</template>

<script>
import { reactive } from 'vue'
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'

import htmlEditButton from "quill-html-edit-button"

export default {
  name: 'App',
  components: {
    QuillEditor
  },
  setup() {
    const modules = {
      name: 'htmlEditButton',
      module: htmlEditButton,
      options: {
        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
        syntax: false, // Show the HTML with syntax highlighting. Requires highlightjs on window.hljs (similar to Quill itself), default: false
        prependSelector: 'div#myelement', // a string used to select where you want to insert the overlayContainer, default: null (appends to body),
        editorModules: {} // The default mod
      }
    }
    const state = reactive({
    
    })

    return { state }
  }
}
</script>

<style lang="less" scoped>
.mail-editor {
  width: 1000px;
  height: 100px;
}
</style>

Use icon for Button instead of label "HTML"

This is just a suggestion, because all quill buttons seem to be with icons.

Instead of "HTML" you might want to use:

button.innerHTML = "&lt;&gt;";

Resulting in:

image

You also might want to add a tooltip:

button.title = "Show HTML source";

image

Not working with vue.js

I have imported it and used it as follows in my vue.js code which already uses vue-quill-editor

import htmlEditButton from "quill-html-edit-button";
Quill.register("modules/htmlEditButton", htmlEditButton);

and in modules i have pasted folowing code

 htmlEditButton: {
              debug: true,
              msg: 'Edit the content in HTML format',
              okText: 'Ok',
              cancelText: 'Cancel',
              buttonHTML: '&lt;&gt;',
              buttonTitle: 'Show HTML source',
              syntax: false,
            },

But is not showing <> in the output. Output is as follows
image

@benwinding sir Please help me as soon as you can

Modified style does not take effect

Hello,First of all, thank you very much for having such a good work,I have a little problem,I modified the source code after editing, and the effect of adding styles to the text does not take effect. Do you know how to solve it?
Looking forward to your reply,Thank you very much

Doesn't work on IE 11 (Nuxt.js)

Hello, im using your plugin on Nuxt(vue), if you know theres 2 tasks (dev and build). When u run nuxt dev it throws error "IE11: Object doesn't support property or method 'forEach'"

import htmlEditButton from "quill-html-edit-button";
Quill.register("modules/htmlEditButton", htmlEditButton);

On build it's working ok, the nuxt can transpile your plugin, seems like the problem is with 'dist/quill.htmlEditButton.min.js'.

Error in html edit button import

I work on an Angular project and I used the package, but recently the import into the component displays an error.
image
please anyone have any idea about this

Thanks,

I can't write anything inside the html box

I'm using quill-html-edit-button version 1.0.12
The issue is that I can't write anything inside the box,

I tried to use the version 1.0.13 upto the latest one, but it keep on throwing
ReferenceError: Quill is not defined

I tried window.Quill = Quill;
but that say's
Property Quill doesn't exist on type window

I'm integrating it inside Angular app.
image

Disabling tab key

Hi, there is no provision to add tab key event. The main Quill editor has this;
keyboard: { bindings: { tab: { key: 9, handler: function() { return true; } } } },
is there a way we can implement in HTML editor as well.

how to insert <script> tag?

hi
would you know how to set up quill or your module to be able to insert <script> tag? It is removed now.
Thank you
Radek

quill-html-edit-button Super expression must either be null or a function, not undefined

Hi! I have nuxt project where i use "Quill editor", and I'm trying to add quill-html-edit-button like in example https://github.com/benwinding/quill-html-edit-button, but after rebuilding my app i've got "Super expression must either be null or a function, not undefined". Can you help me, please?

My code:

"quillEditor.js" imported like plugin in "nuxt.config"

    import Vue from 'vue';
    import VueQuillEditor from 'vue-quill-editor';
    import Quill from 'quill'
    import ImageResize from 'quill-image-resize-vue'
    import VideoResize from 'quill-video-resize-module';
    import {ImageUpload} from 'quill-image-upload';
    
    import htmlEditButton from "quill-html-edit-button";
    
    Quill.register('modules/ImageResize', ImageResize);
    Quill.register('modules/VideoResize', VideoResize);
    Quill.register('modules/imageUpload', ImageUpload);
    Quill.register('modules/htmlEditButton', htmlEditButton);
    
    Vue.use(VueQuillEditor);

component

    <quill-editor
                        ref="editor"
                        :content="formInitialData.content"
                        :options="editorOption"
                      />

    editorOption: {
          theme: 'snow',
          modules: {
            toolbar: [
              ['bold', 'italic', 'underline', 'strike'],
              ['blockquote', 'code-block'],
              [{ 'header': 1 }, { 'header': 2 }],
              [{ 'list': 'ordered' }, { 'list': 'bullet' }],
              [{ 'script': 'sub' }, { 'script': 'super' }],
              [{ 'indent': '-1' }, { 'indent': '+1' }],
              [{ 'direction': 'rtl' }],
              [{ 'size': ['small', false, 'large', 'huge'] }],
              [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
              [{ 'color': [] }, { 'background': [] }],
              [{ 'font': [] }],
              [{ 'align': [] }],
              ['clean'],
              ['link', 'image', 'video']
            ],
            ImageResize: {},
            VideoResize: {},
            htmlEditButton: {
              debug: true,
              msg: "Edit the content in HTML format",
              okText: "Ok",
              cancelText: "Cancel",
              buttonHTML: "HTML",
              buttonTitle: "Show HTML source",
              syntax: false,
              prependSelector: 'div#myelement',
              editorModules: {}
            },
            imageUpload: {
              url: process.env.apiUrl + '/push-s3',
              method: 'POST',
              name: 'file',
              withCredentials: false,
              headers: {},
              csrf: { token: 'token', hash: '' },
              callbackOK: (serverResponse, next) => {
                if(serverResponse.success){
                  next(serverResponse.data);
                }
              },
              callbackKO: serverError => {
                console.log(serverError);
              },
              checkBeforeSend: (file, next) => {
                console.log(this.apiUrl);
                next(file);
              }
            },
          },
          placeholder: 'Insert text here ...',
        },

packege.json

 `"quill-html-edit-button": "^2.2.7",`

No way to include a script tag?

i wanted to use this on an admin backend edit function but i cant seem to include script tags..

is there a way to allow everything i could paste in there?

CSS position and button triggers form submit

1. CSS Bug

textarea is positioned absolutely and results in:

image

Fix: left:15px;

Additionally, please add CSS classes to the divs of the plugin to be targetted!

2. JS Bug

When I hit the "HTML" button, the form that holds the editor gets submitted. Please change the code:

button.onclick = function (e) {\n e.preventDefault(); launchPopupEditor(quill);

Thanks!

Auto closing br (<br />) seems not recognized

Hello,

I have the following value:

<p> Avec la crise sanitaire du COVID-19, les personnes fragilisées sont de plus en plus nombreuses en France. On l’observe notamment dans les grandes villes comme Paris, Lille, Bordeaux, Marseille, Nantes, ou encore Strasbourg. </p> <br /> <p> Les équipes de l’Ordre de Malte France sont présentes quotidiennement dans des actions de terrain par le biais de maraudes alimentaires et médicales, p’tits déjeuners solidaires ou via des actions de secours pour aider concrètement les personnes les plus fragiles. Vous souhaitez financer des projets près de chez vous ? Découvrez les initiatives Les Défis Malte. </p> <br />

When passed to quill-html-edit-button lib I got the following:

<p>
  Avec la crise sanitaire du COVID-19, les personnes fragilisées sont de plus en plus nombreuses en France. On l’observe notamment dans les grandes villes comme Paris, Lille, Bordeaux, Marseille, Nantes, ou encore Strasbourg.
</p>
<p>
</p>
<p>
  Les équipes de l’Ordre de Malte France sont présentes quotidiennement dans des actions de terrain par le biais de maraudes alimentaires et médicales, p’tits déjeuners solidaires ou via des actions de secours pour aider concrètement les personnes les plus fragiles. Vous souhaitez financer des projets près de chez vous ? Découvrez les initiatives Les Défis Malte.
</p>

The <br /> in the middle has been transformed to <p></p> and the last one did disappear.

Do you have any idea ? Is it possible to be a bug ?

Thanks :)

How to work with ReactQuill?

I am using ReactQuill and need an html module. Installed this using npm install quill-html-edit-button. The went into component and tried different ways to get it imported into the component for use.

i tried import {htmlEditButton} from 'quill-html-edit-button' and import HtmlEditButton from 'quill-html-edit-button'

I updated the module property for ReactQuill component, like this

modules = {
    toolbar: [
      [{ header: [1, 2, 3, 4, false] }],
      ['bold', 'italic', 'underline', 'strike'],
      [{ list: 'ordered' }, { list: 'bullet' }, { align: [] }],
      ['link', 'image'],
      [{ color: [] }],
      [{htmlEditButton: {}}]
    ]
  }

But when i load the page, there is no button and a warning saying quill:toolbar ignoring attaching to disabled format htmlEditButton

does some kind of custom handler need to be created to make this button appear/work?

is this package still supported , getting errors using on vue 3

``icon wont show or work

vue: 3
vscode
js

Screenshot (29)
Screenshot (30)

<script> import { QuillEditor, Quill } from "@vueup/vue-quill"; import BlotFormatter from "quill-blot-formatter"; import "@vueup/vue-quill/dist/vue-quill.snow.css"; import htmlEditButton from "quill-html-edit-button"; Quill.register("modules/htmlEditButton", htmlEditButton); export default { components: { QuillEditor, }, editorOption: { theme: "snow", modules: { toolbar: [ ["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ header: 1 }, { header: 2 }], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: ["small", false, "large", "huge"] }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: [] }], [{ align: [] }], ["clean"], ["link", "image", "video"], ["htmlEditButton"], ], ImageResize: {}, VideoResize: {}, htmlEditButton: { debug: true, msg: "Edit the content in HTML format", okText: "Ok", cancelText: "Cancel", buttonHTML: "HTML", buttonTitle: "Show HTML source", syntax: false, prependSelector: "div#myelement", editorModules: {}, }, }, }, setup: () => { const modules = { name: "blotFormatter", module: BlotFormatter, options: { /* options */ }, }; return { modules }; }, }; </script>

``

List elements deleted if lines of HTML have leading whitespace

The formatHTML function in quill.htmlEditButton.js is doing a good job of beautifying the raw HTML.
However for me when there is a list in the editor contents the leading whitespace before the <li> tag is causing the editor to lose the list when the OK button is clicked.

A solution that works for me is to remove newlines and trim each of the lines before joining them back together.
So I changed this
const noNewlines = textArea.value.replace(/\r?\n/g, ''); quill.container.querySelector(".ql-editor").innerHTML = noNewlines;

with this

const output = textArea.value.split(/\r?\n/g).map(el => el.trim()); quill.container.querySelector(".ql-editor").innerHTML = output.join('');

disable console.log

Hi @benwinding !
Is it possible to disable console.log 'before' and 'after' state of HTML?
I can't find any option for this. Or I miss something...
Thanks!

Doesn't render tables

Hi, this plugin doesn't render tables if I placed something like below.

It just disappears as soon as I hit "OK" and the code is gone.

<table>
  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
  </tr>
  <tr>
    <td>Ernst Handel</td>
    <td>Roland Mendel</td>
    <td>Austria</td>
  </tr>
  <tr>
    <td>Island Trading</td>
    <td>Helen Bennett</td>
    <td>UK</td>
  </tr>
  <tr>
    <td>Laughing Bacchus Winecellars</td>
    <td>Yoshi Tannamuri</td>
    <td>Canada</td>
  </tr>
  <tr>
    <td>Magazzini Alimentari Riuniti</td>
    <td>Giovanni Rovelli</td>
    <td>Italy</td>
  </tr>
</table>

Some suggestion for ui and lib function……

Sorry, I would like to make a personal suggestion (my English is not very good, forgive me);
this code is very good, but whether to consider not integrated into the button, pop-up editing this form is relatively rare, and the style of this pop-up box and quill is not very compatible, can you consider a separate dependency version, through the registration, can be called through the api to get the current html data and write a new html data, so as to avoid a little confusion in the ui style.

Then, if it's not good to pull away, I feel that clicking the button to switch directly in the quill editor area to display html is more common, sorry to say too much, thanks again!

[Enhancement] Syntax highlighting

First, thanks for this library it was exactly what I needed.

Since the user is always editing HTML in the modal, it would be nice to have syntax highlighting enable for that editor.
I would imagine since quill is already being used and since it can support syntax highlighting, that it might be possible to just use another quill instance as the HTML editor with syntax highlighting enabled. Of course this would be an option exposed so that developers who do not want to include highlight.js to not have syntax highlighting.

Can not insert 'div' tag

Using the demo link:
https://benwinding.github.io/quill-html-edit-button/src/demo.html

Paste the html to update the content

<div class="boxed" style="color:#ff0000;"><strong>Translations:</strong> Can you help translate this site into a foreign language ? Please email us with details if you can help.</div>

The actual result: The editor's content is blank and the console show the error

Uncaught TypeError: Cannot read property 'emit' of undefined
    at e.value (scroll.js:158)
    at MutationObserver.<anonymous> (scroll.ts:29)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.