rcasto / adaptive-html Goto Github PK
View Code? Open in Web Editor NEWHTML to Adaptive Card JSON converter library
Home Page: https://rcasto.github.io/adaptive-editor/
License: MIT License
HTML to Adaptive Card JSON converter library
Home Page: https://rcasto.github.io/adaptive-editor/
License: MIT License
Requires better documentation around process loop and replacement structure(s) for rules. May want to revisit this in general and come up with a better data model that in turn aids the process loop due to uniformity of data it deals with.
Hi!
We are starting to use the library but encountered an issue.
Our users create/edit text using TipTap. It is a simple editor that allows them to create text with some easy HTML tags just by typing/selecting/formatting it.
Now, they might create text like:
"... that shows our <strong>company </strong>values."
Please notice the whitespace between "company" and the closing </strong>
tag. That can easily happen in the TipTap editor and it's not obvious.
The AdaptiveHtml.toJSON() method converts this into:
"... that shows our **company**values."
because the whitespace is dropped. But should it be dropped?
I am trying to convert html to adaptive json with as but getting error.
var json = adpativeHtml.toJSON("<p>Turn me into an Adaptive Card</p>");
Error: ReferenceError: DOMParser
@rcasto Any help on this?
May be able to take advantage of tree shaking utilized by rollup. Only import what is needed utilizing ES6 module syntax.
Current unminified size on disk: 30kb
Current minified size on disk: 14kb
npm install adaptivehtml
Currently line breaks or
tags are replaced with a '\n\n'
This seems to render as a larger spacing between text elements than there should be in some channels/cases.
Would be better to leverage the spacing property of the Adaptive Card JSON schema between separate TextBlock card elements to represent a line break instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.