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

@zym-com/text-rich

v0.0.3

Published

富文本

Downloads

0

Readme

Install

npm install @zym-com/text-rich

or

yarn add @zym-com/text-rich

Import

import TextRich from "@zym-com/text-rich";
import "@zym-com/text-rich/dist/style.css";

Usage

import TextRich from "@zym-com/text-rich";
import "@zym-com/text-rich/dist/style.css";

function App() {
  const options ={
    "configuration": {
        "dataSourceType": "data",
        "dataContent": "",
        "domToCanvans": false,
        "boxFillStyle": "color",
        "boxColor": {
            "startVal": "rgba(0,0,0,1)",
            "endVal": "rgba(0,0,0,1)",
            "direction": 50
        },
        "boxImage": "",
        "boxImageSize": "cover",
        "boxBorderGroup": {
            "shadowOffsetX": "right",
            "shadowOffsetY": "bottom",
            "shadowBlur": "left",
            "shadowColor": "top"
        },
        "boxBorderStyle": "solid",
        "boxBorderWidth": 1,
        "boxBorderColor": "rgba(24, 144, 255,0)",
        "boxBorderRadius": 0,
        "marqueeOpen": true,
        "duration": 30,
        "axisType": "Y",
        "reverseType": true,
        "pauseOnHover": true,
        "overflowType": "scroll",
        "scrollbarWidth": 4,
        "scrollbarColor": "rgba(255,255,255,0)",
        "scrollbarRadius": 10,
        "scrollbarThumbColor": "rgba(76,76,76,1)",
        "scrollbarThumbRadius": 10,
        "dataSeries": [
            {
                "originalContent": "",
                "newContent": ""
            }
        ],
        "boxBackground": false,
        "boxBorderConfig": false,
        "scrollbarStyle": true
    },
    "base": {
        "width": 500,
        "height": 200
    },
    "dataSource": [
        {
            "value": "<div class='content_18313' data-spm-anchor-id='C73544894212.P59511941341.0.i1'><div class='title_area' id='title_area'><h1>可视化|“十四五”科技创新开局良好,这些数据很亮眼!</h1><h2 id='subtitle' style='display: none;'><i></i></h2><div class='info'>来源:<a data-spm-protocol='i' href='https://kepu.gmw.cn/2022-02/26/content_35547232.htm ' target='_blank'>光明网</a>  |  2022年02月27日 10:34:53</div><div class='info1'>光明网 | 2022年02月27日 10:34:53</div><h6 id='sourcetitle'>原标题:可视化|“十四五”科技创新开局良好,这些数据很亮眼!</h6><script type='text/javascript'>var sourcetitle = '可视化|“十四五”科技创新开局良好,这些数据很亮眼!';if (sourcetitle==''){document.getElementById('sourcetitle').style.display='none';}</script></div><div class='text_area' id='text_area' style='display: block;'></div><div class='more_btnbox' id='j_pullLoader' style='display: none;'><div class='more_btn_loading ' id='j_loading'><span class='loadingbtn'></span><span class='more_btn'>正在加载</span></div></div><div class='content_area' id='content_area' style='display: block;'><!--repaste.body.begin--><p data-spm-anchor-id='C73544894212.P59511941341.0.i0'>  2月25日,国新办就科技创新有关进展情况举行发布会,科学技术部部长王志刚表示,2021年是党和国家历史上具有重要意义的一年,也是“十四五”开局之年。过去一年,全社会研发投入达到2.79万亿元,同比增长14.2%,研发投入强度达到了2.44%,国家创新能力综合排名上升至世界第12位,成功实现“十四五”良好开局。</p><p class='photo_img_20190808' style='text-align: center;'><img src='//p4.img.cctvpic.com/photoworkspace/contentimg/2022/02/27/2022022710331520371.jpg' alt='可视化|“十四五”科技创新开局良好,这些数据很亮眼!'></p><p class='photo_alt_20190808' style='text-align: center;'>  </p><p class='photo_img_20190808' style='text-align: center;'><img src='//p5.img.cctvpic.com/photoworkspace/contentimg/2022/02/27/2022022710331546882.jpg' alt='可视化|“十四五”科技创新开局良好,这些数据很亮眼!'></p><p class='photo_alt_20190808' style='text-align: center;'>  </p><p class='photo_img_20190808' style='text-align: center;'><img src='//p2.img.cctvpic.com/photoworkspace/contentimg/2022/02/27/2022022710331560346.jpg' alt='可视化|“十四五”科技创新开局良好,这些数据很亮眼!'></p><p class='photo_alt_20190808' style='text-align: center;'>  </p><p class='photo_img_20190808' style='text-align: center;'><img src='//p4.img.cctvpic.com/photoworkspace/contentimg/2022/02/27/2022022710331568955.jpg' alt='可视化|“十四五”科技创新开局良好,这些数据很亮眼!'></p><p class='photo_alt_20190808' style='text-align: center;'>  </p><p class='photo_img_20190808' style='text-align: center;'><img src='//p1.img.cctvpic.com/photoworkspace/contentimg/2022/02/27/2022022710331597570.jpg' alt='可视化|“十四五”科技创新开局良好,这些数据很亮眼!'></p><!--repaste.body.end--></div></div>"
        }
    ],
    bindCallbackParams:(evenName: string, data: Record<string, any>) => void;
  }
  return (
    <>
      <TextRich {...options} />
    </>
  );
}

export default App;