mildberry / jms-format
JSON markup structure format
v0.0.11
2016-10-24 06:23 UTC
Requires
- php: >=5.5
Requires (Dev)
- phpunit/phpunit: ^4.7
This package is not auto-updated.
Last update: 2024-12-21 20:52:22 UTC
README
Custom format for generation block structure on the different front-end system
Require
- php >= 5.4
Install
Install via composer
$ composer require mldberry/jms-format
Usage
Loading JMS format from HTML
<?php $jsmFormat = new Mildberry\JMSFormat\JMSFormat(); print $jmsFormat->convert('html', 'jms', '<h1>Header</h1><p>text</p>');
Output:
{"version":"v1","content":[{"block":"headline","modifiers":{"weight":"lg"},"content":[{"block":"text","modifiers":[],"content":"Header"}]},{"block":"paragraph","modifiers":[],"content":[{"block":"text","modifiers":[],"content":"text"}]}]}
License
This library is under the MIT license. See the complete license in here