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

angular-editor-component

v1.0.2

Published

The angular version of Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.

Downloads

3

Readme

angular-editor-component v1.0.1

该库是用 Angular CLI 9.1.7 生成的。依赖于tui.editor

安装

运行 npm i --save angular-editor-component 安装.

使用方法

...
import { EditorModule } from 'angular-editor-component';

@NgModule({
    ...
    imports: [
        EditorModule    // 引入模块
    ]
})
export class AppModule { }

在html文件中使用

<ng-editor></ng-editor>

属性

| 属性 | 类型 | 说明 | | --- | --- | --- | | height | string | 设置编辑器整体的高度 | | minHeight | string | 设置编辑器的最小高度 | | previewStyle | 'tab' | 'vertical' | 预览的样式 | | language | string | i18n, 设置编辑器的语言,默认中文 | | initialValue | string | 编辑器的初始内容 | | initialEditType | stirng | 初始编辑的类型 | | placeholder | string | 编辑器占位符 | | toolbarItems | string[] | 一个数组,设置需要显示的工具条中按钮的数量 |

事件

| 事件名 | 何时触发 | | --- | ---- | | onload | 当编辑器实例创建完成时触发,并返回编辑器实例 | | onchange | 当内容发生变化时触发 | | stateChange | 状态改变时触发 | | onfocus | 编辑器聚焦时触发 | | onblur | 编辑器失焦时触发 | | addImageBlobHook | 添加图片时触发 | | previewBeforeHook | 预览时触发 |

全面的API请访问这里。如有更复杂的需求,推荐直接使用tui-editor