Introducing HtmlToComposeWebConverter
Posted on December 23, 2021 • 2 minutes • 263 words
Table of contents
I released a first version of HtmlToComposeWebConverter: A IntelliJ Idea Plugin that can convert HTML to Compose for Web code. IntelliJ Marketplace . Find more details here
Turn this:
Into this:
Introduction / How to use
- Put your cursor to the place where you want to insert the Compose code.
- Open the Plugin under Tools> HTML to Compose Web
3) Add your HTML to press "Generate"
4) Your code is now inserted at your cursor.
What this plugin can’t do:
- Convert JavaScript:
The < script> tag will be ignored, but inlined Javascript will be set without changes to the corresponding property. See the “button” code example above.
How to install?
You can install plugin directly from IntelliJ IDEA or Android Studio:
- Open Preferences
- Choose Plugins
- Select the Marketplace tab
- Search for HtmlToComposeWebConverter
- Click on install
Alternatively you can download the plugin from the release archive https://github.com/Foso/HtmlToComposeWebConverter/releases . To learn how to install it, read the Install plugin from disk section in the IntelliJ docs.
How can I contribute to this plugin?
- Create a bug report when accounting a bug
- Create a feature request
- Open up a pull request
What’s new?
1.0.5
- KeyFrame rules in < style> tag will now be converted to Compose for Web StyleSheets
- font-face rules will be converted to KotlinJS code
๐ Architecture
๐ ๏ธ Built With
Kotlin
<img src="https://img.shields.io/badge/Kotlin-1.6.10-green.svg" alt="jCenter">
โ๏ธ Feedback
Feel free to send feedback on Twitter or file an issue . Feature requests are always welcome.
๐ License
This project is licensed under the Apache License, Version 2.0 - see the LICENSE.md file for details