# 字节跳动小程序towxml使用说明 **Repository Path**: kevincwj/howtoTowxmlForByteDanceMini ## Basic Information - **Project Name**: 字节跳动小程序towxml使用说明 - **Description**: No description available - **Primary Language**: 微信 - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-08-22 - **Last Updated**: 2025-08-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 字节跳动小程序towxml使用说明 `2021-04-13` ## 首先感谢 sbfkcel 大佬的微信/QQ小程序HTML、Markdown渲染库-[towxml](https://github.com/sbfkcel/towxml "towxml github")。 - ### 本文主要介绍将towxml应用到字节跳动小程序(以下简称字节小程序)的方法。 1. 按需构建towxml,重点步骤是编辑配置文件`towxml/config.js`,参考https://github.com/sbfkcel/towxml/wiki/3.0-%E6%9E%84%E5%BB%BATowxml 2. 完成上一步操作后,你将得到\dist文件夹,请将\dist 目录复制到小程序项目目录下 3. 修改\dist文件夹中内容 - 修改文件后缀:wxml-->ttml, wxss-->ttss - 将代码中的wxss替换为ttss(**无需替换代码中的wxml**) - 将代码中的wx:和wx.替换为tt:和tt. - 将dist重命名为towxml 4. app.ttss中添加`@import './towxml/towxml.ttss';` 6. 开始使用,参考https://github.com/sbfkcel/towxml/wiki/3.0-%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8 - ### [DEMO工程](https://gitee.com/yikaaa/howtoTowxmlForByteDanceMini/blob/master/towxml-3.x_demo%20-%20ByteDanceRun.zip),可直接在字节跳动开发者工具中运行,请开启"不检验合法域名" - ### 现存问题: 1. echarts、代码高亮和视频播放无效 2. 报错(不影响使用) ```javascript D:\Software\Coding\字节跳动小程序开发者工具\bytedanceide\resources\app.asar.unpacked\simulator-sdk\dist\preload\bgPreload.be61f13eeb4ac7987156.js:277 Failed setting prop "children" on : value null is invalid. {} ``` - ### 效果图: ![效果图1](效果图/效果1.JPG) ![效果图2](效果图/效果2.JPG) ![效果图3](效果图/效果3.JPG) ![效果图4](效果图/效果4.JPG) ![效果图5](效果图/效果5.JPG)