Quill: how to convert class to inline style with blockquote

Created on 10 Jul 2018  路  1Comment  路  Source: quilljs/quill

i want to know how to convert to inline-style with blockquote锛沚ecause i should get this html to another environment which no contain quill.css

Steps for Reproduction

Expected behavior:
blockquote can convert to inline-style
Actual behavior:
blockquote just only use class to display its style
Platforms:

Include browser, operating system and respective versions

Version:
3.0.6

Most helpful comment

@WxSwen

Here's a simple implementation of a BlockquoteInlineStyle class that I wrote for a similar purpose:

import * as QuillNamespace from 'quill';
let Quill = QuillNamespace;
var Blockquote = Quill.import('formats/blockquote'); 

class BlockquoteInlineStyle extends Blockquote {
    static create(value) {
        BlockquoteInlineStyle.blotName = "blockquote";
        BlockquoteInlineStyle.tagName = "blockquote";
        let node = super.create();
        $(node).attr("style", "border-left: 4px solid #ccc;");   
        return node;
    }
}

export { BlockquoteInlineStyle }

And then you can register it like this:

Quill.register(BlockquoteInlineStyle, true);

>All comments

@WxSwen

Here's a simple implementation of a BlockquoteInlineStyle class that I wrote for a similar purpose:

import * as QuillNamespace from 'quill';
let Quill = QuillNamespace;
var Blockquote = Quill.import('formats/blockquote'); 

class BlockquoteInlineStyle extends Blockquote {
    static create(value) {
        BlockquoteInlineStyle.blotName = "blockquote";
        BlockquoteInlineStyle.tagName = "blockquote";
        let node = super.create();
        $(node).attr("style", "border-left: 4px solid #ccc;");   
        return node;
    }
}

export { BlockquoteInlineStyle }

And then you can register it like this:

Quill.register(BlockquoteInlineStyle, true);

Was this page helpful?
0 / 5 - 0 ratings