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

@sunsetlearn/sunset-editor

v0.2.15

Published

An expressive Markdown editor with flexible HTML capabilities. The Sunset editor can be included in any project that needs an easy to use, capable text editor with Markdown syntax parsing.

Downloads

287

Readme

Sunset Editor

An expressive Markdown editor with flexible HTML capabilities. The Sunset editor can be included in any project that needs an easy to use, capable text editor with Markdown syntax parsing.

Check it out on Github!

Installation

The Sunset Editor is currently only available for Vue.js projects as a Vue component. To get started, install the Sunset editor package with npm.

npm install --save @sunsetlearn/sunset-editor

Usage

You can use the SunsetEditor component within any other Vue component in your project. Custom element is coming soon in order to support any framework (or simple vanilla JS).

<script setup lang="ts">
import { SunsetEditor } from 'sunset-editor'
</script>

<template>
  <div class="top">
    <SunsetEditor :start_with_editing_enabled="true"
    />
  </div>
</template>

<style scoped>
</style>

API

Take a look at the sunset-editor-test project to see how most of these properties and functions come together when hooking up the Sunset editor into your Vue application.

Component Properties

  • asset_endpoint: A string with the base path for assets referenced by asset-based components, such as the adjustable image and adjustable video components.
  • start_with_editing_enabled: Whether the Sunset editor should start in edit mode on startup.
  • stylesheet_string: A string with stylesheet overrides for any elements within the Sunset editor.

Component Events

  • componentmodified: Fired whenever the content is modified, either through the component palette or regular keystrokes.

Component Methods

  • export_document_string(): Exports all contents of the Sunset editor as a single string, to be saved to a file or processed externally.
  • import_document_string(doc: string): Imports the contents of an exported Markdown document into the Sunset editor and applies all formatting and transformations.

Free Functions

  • register_editor_components(app): For Vue.js applications, this function must be called with the app instance as a parameter before mounting the app. This will register all internal Sunset editor components with your Vue application.
  • start_editing(): Puts the Sunset editor into editing mode.
  • stop_editing(): Puts the Sunset editor into read-only mode.