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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@qlteacher/ng-ueditor

v1.0.2

Published

Angular Ueditor Directive

Readme

@qlteacher/ng-ueditor

Angular 4+下用的UEditor directive。

除非有特殊的要求,否则不建议使用此类富文本,功能过于冗余,请寻找其它轻量浏览器解决方案进行替换。此外本插件内部重度集成,ueditor中设置了cookie,如想在自建项目中使用,请注意进行修改,关于ueditor的问题请移植官方进行提问(该项目已经于2016年基本停止维护)

使用方法:

复制ueditor至项目相关目录,并在页面上引入./ueditor/dist下的ueditor.all.min.js, ueditor.config.js

<!-- 配置文件 -->
<script type="text/javascript" src="ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="ueditor.all.min.js"></script>

项目引用后,在页面上使用ueditor属性对标签进行修饰,并且通过[(content)]进行双向绑定

import { UEditorModule } from '@qlteacher/ng-ueditor';

@NgModule({
    imports: [
        UEditorModule
    ]
})

编辑器工具栏的配置

通过对type进行赋值来进行变更

<textarea ueditor [(content)]="content" type="common"></textarea>

common: 默认选项

common: [[
            'fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'paragraph', 'fontfamily', 'fontsize', '|',
            'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
            'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'link', 'unlink', 'insertimage', 'insertvideo', '|',
            'horizontal', 'date', 'time', 'spechars', 'wordimage', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', '|',
            'print', 'preview', 'searchreplace'
        ]]

simple

simple: [[
            'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder',
            'strikethrough', 'blockquote', 'pasteplain', '|',
            'forecolor', 'backcolor', 'insertorderedlist',
            'insertunorderedlist', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'paragraph', 'fontfamily', 'fontsize', '|',
            'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
            '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow',
            'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells',
            'splittorows', 'splittocols'
        ]]

如传入了未知的选项将按照common选项执行,如果希望执行ueditor.config.js中的配置节属性,请传入”config“属性

z-index

设置zIndex属性,请直接通过zindex属性进行赋值,默认为1040

1.0.1版本中,zIndexzindex均可以设置zIndex属性,但仅为了兼容老项目,请使用全部小写的zindex进行属性设置

开发环境与生产环境需要加载不同的配置节

可以通过htmlWebpackPlugin.options.metadata.isDevServer属性在页面上直接判断:

<% if (htmlWebpackPlugin.options.metadata.isDevServer) { %>
<!-- 这里的代码只在开发环境中运行 -->
<style>
    body {
        color: red;
    }
</style>
<% } else { %>
<!-- 这里的代码在非开发环境中运行 -->
<style>
    body {
        color: red;
    }
</style>
<% } %>