1 Star 0 Fork 0

louislivi / HtmlToJson

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

HTML转JSON

介绍

在小程序中使用富文本以前是采用直接使用富文本但是存在UI兼容问题以及效率低下,目前采用官方推荐的html json格式进行富文本渲染提高渲染速度并且兼容性更好。

小程序rich-text JAVA如何接入

所需依赖

  • jsoup
  • fastjson

使用说明

System.out.println(HtmlToJson.parse("<html><body><h1>我的第一个标题</h1><p>我的第一个段落。</p></body></html>"));
//打印 [{"name":"h1","children":[{"type":"text","text":"我的第一个标题"}]},{"name":"p","children":[{"type":"text","text":"我的第一个段落。"}]}]

详细介绍

https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html

Repository Comments ( 0 )

Sign in to post a comment

About

html转小程序rich-text组件nodes。 expand collapse
Java
Cancel

Releases

No release

HtmlToJson

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/louislivi/HtmlToJson.git
git@gitee.com:louislivi/HtmlToJson.git
louislivi
HtmlToJson
HtmlToJson
master

Search

103111 552b83b3 1850385 103110 ed87a847 1850385