How to use the quill/core.register function in quill

To help you get started, we’ve selected a few quill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vanilla / vanilla / plugins / rich-editor / src / scripts / quill / registerQuill.ts View on Github external
export default function registerQuill() {
    if (wasRegistered) {
        return;
    }
    wasRegistered = true;
    Quill.register(
        {
            // Block formats
            "formats/blockquote/line": BlockquoteLineBlot,
            "formats/blockquote/content": BlockquoteContentBlot,
            "formats/blockquote/wrapper": BlockquoteWrapperBlot,
            "formats/spoiler/line": SpoilerLineBlot,
            "formats/spoiler/content": SpoilerContentBlot,
            "formats/spoiler/wrapper": SpoilerWrapperBlot,
            "formats/codeBlock": CodeBlockBlot,
            "formats/header": HeaderBlot,
            "formats/list/unordedGroup": UnorderedListGroup,
            "formats/list/orderedGroup": OrderedListGroup,
            "formats/list/item": ListItem,
            "formats/list/wrapper": ListItemWrapper,
            "formats/embed-error": EmbedErrorBlot,
            "formats/embed-loading": LoadingBlot,
github vanilla / vanilla / plugins / rich-editor / src / scripts / Quill / RegisteredQuill.js View on Github external
import ImageBlot from "./Blots/Embeds/ImageBlot";
import VideoBlot from "./Blots/Embeds/VideoBlot";
import LinkEmbedBlot from "./Blots/Embeds/RichLinkBlot";
import EmbedLoadingBlot from "./Blots/Embeds/LoadingBlot";
import EmbedErrorBlot from "./Blots/Embeds/ErrorBlot";

// Custom Block Blots
import SpoilerLineBlot, { SpoilerWrapperBlot, SpoilerContentBlot } from "./Blots/Blocks/SpoilerBlot";
import BlockquoteLineBlot, { BlockquoteWrapperBlot, BlockquoteContentBlot } from "./Blots/Blocks/BlockquoteBlot";
import CodeBlockBlot from "./Blots/Blocks/CodeBlockBlot";

// Custom Modules/Themes
import VanillaTheme from "./VanillaTheme";
import EmbedModule from "./EmbedModule";

Quill.register({
    // Block formats
    'formats/blockquote/line': BlockquoteLineBlot,
    'formats/blockquote/content': BlockquoteContentBlot,
    'formats/blockquote/wrapper': BlockquoteWrapperBlot,
    'formats/spoiler/line': SpoilerLineBlot,
    'formats/spoiler/content': SpoilerContentBlot,
    'formats/spoiler/wrapper': SpoilerWrapperBlot,
    'formats/code-block': CodeBlockBlot,
    'formats/header': Header,
    'formats/list': List,
    'formats/list/item': ListItem,
    'formats/image-embed': ImageBlot,
    'formats/video-placeholder': VideoBlot,
    'formats/loading-embed': EmbedLoadingBlot,
    'formats/link-embed': LinkEmbedBlot,
    'formats/error-embed': EmbedErrorBlot,
github vanilla / vanilla / plugins / rich-editor / src / scripts / quill / SyntaxModule.ts View on Github external
public static register() {
        Quill.register(CodeToken, true);
        Quill.register(CodeBlockBlot, true);
    }
github ethanryan / textedit-app / src / components / YjsQuillSnow.js View on Github external
}).then(function (y) {
        window.yquill = y

        Quill.register({
          'modules/toolbar': Toolbar,
          'themes/snow': Snow,
          'formats/bold': Bold,
          'formats/italic': Italic,
          'formats/header': Header,
          'formats/underline': Underline,
          'formats/link': Link,
          'formats/list': List,
          'formats/list/item': ListItem,
          'ui/icons': Icons
        });

        var icons = Quill.import('ui/icons');
        icons['bold'] = '<i aria-hidden="true" class="fa fa-bold"></i>';
        icons['italic'] = '<i aria-hidden="true" class="fa fa-italic"></i>';
        icons['underline'] = '<i aria-hidden="true" class="fa fa-underline"></i>';
github vanilla / vanilla / plugins / rich-editor / src / scripts / quill / SyntaxModule.ts View on Github external
public static register() {
        Quill.register(CodeToken, true);
        Quill.register(CodeBlockBlot, true);
    }