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

liuz-my-parse

v0.4.0

Published

myParse - 支付宝小程序富文本解析自定义组件,支持HTML及markdown解析

Downloads

4

Readme

myParse 是基于开源软件 wxParse 的一款富文本解析组件,适用于支付宝小程序。

具体修改内容参见蚂蚁金服开发者社区的文章:《支付宝富文本解析组件》

myParse - 支付宝小程序富文本解析组件

支持 Html 及 markdown 转 axml 可视化。作用是将 Html/Markdown 转换为支付宝小程序的可视化方案。

特性

| 支持特性 | 实验功能 | ToDo | | ------------- |-------------| -----| | - [x] HTML的大部分标签解析 | [x] 小表情emjio | [x] table标签 | | - [x] 内联style | [x] a标签跳转 | | | - [x] 标签Class | [x] 动态添加 | | | - [x] 图片自适应规则 | | | | - [x] 图片多图片预览 | | | | - [x] 模版层级可扩展性 | | | | - [x] 多数据循环方式 | | | | - [x] 内联style | | | | | | |

感谢

@icindy | @stonewen| @Daissmentii | @wuyanwen | @vcxiaohan |

基本使用方法

1. Copy文件夹 myParse

- myParse/
  -myParse.js(必须存在)
  -html2json.js(必须存在)
  -htmlparser.js(必须存在)
  -showdown.js(必须存在)
  -myDiscode.js(必须存在)
  -myParse.axml(必须存在)
  -myParse.acss(必须存在)
  -emojis(可选)

2. 引入必要文件

// 在使用的 View 中引入 myParse 模块
var MyParse = require('../../myParse/myParse.js');
// 在使用的 acss 中引入 myParse.acss,可以在app.acss
@import "/myParse/myParse.acss";

3. 数据绑定

var article = '<div>我是HTML代码</div>';
/**
* MyParse.myParse(bindName , type, data, target,imagePadding)
* 1.bindName绑定的数据名(必填)
* 2.type可以为html或者md(必填)
* 3.data为传入的具体数据(必填)
* 4.target为Page对象,一般为this(必填)
* 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选)
*/
var that = this;
MyParse.myParse('article', 'html', article, that, 5);

4. 模版引用

<!-- 引入模板 -->
<import src="你的路径/myParse/myParse.axml"/>
<!-- 这里data中article为bindName -->
<template is="myParse" data="{{ myParseData:article.nodes }}"/>

为什么叫 myParse?

因为微信小程序的命名空间是 wx(「微信」的缩写),而支付宝小程序的命名空间是 my(「蚂蚁」的缩写)。为了在支付宝小程序使用中更符合命名规范,将 wxParse 改为 myParse