Skip to content

charafau/htmltojaspr

Repository files navigation

The htmltojaspr project is a tool designed to convert HTML code into Dart code compatible with the Jaspr framework, enabling developers to seamlessly integrate HTML structures into their Jaspr applications.

Features

  • HTML to Jaspr Conversion: Transforms standard HTML elements into their corresponding Jaspr components.

Getting Started

Prerequisites

  • Ensure you have Dart SDK installed on your system.

Usage

To convert an HTML string to a Jaspr component:

import 'package:htmltojaspr/htmltojaspr.dart';

void main() {
  String htmlContent = '''
  <div>
    <h1>Hello, World!</h1>
    <p>This is a sample HTML content.</p>
  </div>
  ''';

  final jasprComponent = HtmlConverter().covert(htmlContent);
  print(jasprComponent);
}

This will output Dart code that represents the provided HTML structure as Jaspr components.

Additional Information

  • Contributing: Contributions are welcome! Please submit issues and pull requests on the GitHub repository.

  • License: This project is licensed under the BSD-3-Clause License. See the LICENSE file for details.

For more details and updates, visit the GitHub repository.

About

html to dart jaspr converter

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •