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

@mindfiredigital/canvas-editor

v1.2.0

Published

rich text editor by canvas/svg

Downloads

18

Readme

Canvas Editor project uses and extends the canvas-editor-plugin, adding useful features like as table support, font size optimization, and the export of important DOM handlers. We would like to offer our heartfelt appreciation for their substantial contributions to the open-source community.

Table of Contents

Features

  • Event Handling: DOM handlers were not exported so we helped exporting it so others can make use of it.
  • New Feature:
    • Tables: A new feature has been introduced to enable the use of tables
  • Improved Font Size: The font size has been optimized to enhance readability and user experience.

Installation

npm i @mindfiredigital/canvas-editor

Usage

import {
  DOMEventHandlers,
  ListStyle,
  ListType,
  RowFlex,
} from '@mindfiredigital/canvas-editor'

    <ButtonWrapper 
        title="bold" 
        handleClick={DOMEventHandlers.handleBold}>
            <FormatBoldIcon />
    </ButtonWrapper>
    <ButtonWrapper
        title="italic"
        handleClick={DOMEventHandlers.handleItalic}>
            <FormatItalicIcon />
    </ButtonWrapper>
    <ButtonWrapper
        title="underline"
        handleClick={DOMEventHandlers.handleUnderline}>
        <FormatUnderlinedIcon />
    </ButtonWrapper>

DOM Handlers

  • handleUndo: This handler is responsible for undoing the previous action performed in the editor.

  • handleRedo: The handleRedo handler allows you to redo an action that was previously undone.

  • handleBold: With the handleBold handler, you can apply or remove bold formatting to the selected text.

  • handleItalic: The handleItalic handler enables you to apply or remove italic formatting to the selected text.

  • handleUnderline: This handler allows you to apply or remove underline formatting to the selected text.

  • handleStrikeout: The handleStrikeout handler enables you to apply or remove strikeout formatting to the selected text.

  • handleSuperscript: With the handleSuperscript handler, you can apply or remove superscript formatting to the selected text.

  • handleSubscript: The handleSubscript handler allows you to apply or remove subscript formatting to the selected text.

  • handleFontFamily: This handler is used to change the font family of the selected text.

  • handleAlign: The handleAlign handler allows you to align the selected text to the left, center, or right.

  • handleList: With the handleList handler, you can create bulleted or numbered lists.

  • setFontColor: This handler is responsible for changing the font color of the selected text.

  • highlightText: The highlightText handler enables you to apply or remove highlighting to the selected text.

  • setFont: With the setFont handler, you can change the font of the selected text.

  • setSize: This handler allows you to set the font size of the selected text.

  • increaseFontSize: The increaseFontSize handler increases the font size of the selected text.

  • decreaseFontSize: The decreaseFontSize handler decreases the font size of the selected text.

  • getContent: This handler retrieves the content of the editor.

  • setContent: The setContent handler sets the content of the editor.

  • createTable: With the createTable handler, you can insert a table into the editor.

  • setTitle: This handler sets the title of the editor.

  • getContentStyles: The getContentStyles handler retrieves the styles applied to the content of the editor.

  • setImage: With the setImage handler, you can insert an image into the editor.

  • createHyperLink: This handler allows you to create a hyperlink in the editor.

  • setHorizontalLine: The setHorizontalLine handler inserts a horizontal line into the editor.

  • setPaperMargins: This handler sets the paper margins of the editor.

  • getSelectedText: The getSelectedText handler retrieves the currently selected text in the editor.

  • insertElement: With the insertElement handler, you can insert a custom element into the editor.

Contributing

This project welcomes contributions and suggestions.

License

Copyright (c) Mindfire Digital llp. All rights reserved.

Licensed under the MIT license.