Skip to content

A parser utility for converting JSON to HTML and HTML to JSON specifically designed for use with Camunda 7 forms.

License

Notifications You must be signed in to change notification settings

pitanglabs/camunda-json-html-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

camunda-json-html-parser

A parser utility for converting JSON to HTML and HTML to JSON specifically designed for use with Camunda 7 forms.

Table of Contents

Usage

To use this library in your project, follow these steps:

  1. Add the library as a dependency in your package.json file using the git format.

    "dependencies": {
      "camunda-json-html-parser": "git+https://github.com/pitanglabs/camunda-json-html-parser.git"
    }
  2. Run npm install to install the library and its dependencies.

  3. Now you can import and use the functions exported by the library in your project:

    import {
      convertHtmlToJson,
      convertJsonToHtml,
    } from "camunda-json-html-parser";
    
    // Provide the browser DOM Document (window.document)
    const convertedHtml = convertJsonToHtml(document, jsonContent);

Test

  1. Clone the repository to your local machine.

  2. Navigate into the project directory:

    $ cd camunda-json-html-parser
  3. Install dependencies:

    $ npm install
  4. Run the test application:

    $ npm run test
  5. Follow the Prompts:

    • Choose the conversion type (JSON to HTML or HTML to JSON).
    • Enter the input and output file paths.
    • Note: Ensure the input file is located in the directory.
  6. Optional: Format HTML File: If converting from JSON to HTML, you can run the following command after conversion to format the HTML file for readability:

    $ npm run prettier
    

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License.

About

A parser utility for converting JSON to HTML and HTML to JSON specifically designed for use with Camunda 7 forms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •