Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
content-kit-compiler
Advanced tools
Compiler for content-kit suite: parses markup to json and renders json to markup
Parses HTML to ContentKit's JSON schema and renders back to HTML.
Parsing HTML:
<h2>My First Blog Post</h2>
<h3>The Subtitle</h3>
<p>This is a paragraph, with a <a href="http://google.com/">link</a> and some <b>formatting</b>.</p>
<img src="kittens.png" alt="Kittens"/>
<ul>
<li>Item A</li>
<li>Item B</li>
</ul>
var compiler = new ContentKit.Compiler();
var json = compiler.parse(html);
Output:
[
{
"type":2,
"value":"My First Blog Post",
"markup":[]
},
{
"type":3,
"value":"The Subtitle",
"markup":[]
},
{
"type":1,
"value":"This is a paragraph, with a link and some formatting.",
"markup":[
{
"start":28,
"end":32,
"type":4,
"attributes":{
"href":"http://google.com/"
}
},
{
"start":42,
"end":52,
"type":1
}
]
},
{
"type":4,
"value":"",
"markup":[],
"attributes":{
"src":"kittens.png",
"alt":"Kittens"
}
},
{
"type":6,
"value":"Item A Item B",
"markup":[
{
"start":0,
"end":6,
"type":6
},
{
"start":7,
"end":13,
"type":6
}
]
}
]
Rendering JSON to HTML:
var html = compiler.render(json);
Output:
<h2>My First Blog Post</h2><h3>The Subtitle</h3><p>This is a paragraph, with a <a href="http://google.com/">link</a> and some <b>formatting</b>.</p><img src="kittens.png" alt="Kittens"/><ul><li>Item A</li> <li>Item B</li></ul>
API currently in flux
npm install
gulp
FAQs
Parses and renders content to and from the JSON model that backs ContentKit's WYSIWYG Editor
The npm package content-kit-compiler receives a total of 2 weekly downloads. As such, content-kit-compiler popularity was classified as not popular.
We found that content-kit-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.