Full changelog for PHP Quill Renderer
- Added GitHub actions.
- Documentation improvements, thank you Theo W.
- Fixed an issue rendering single item lists, they don't get closed if they are the first delta, thank you hybridvision.
- Minor code style fixes.
- Corrections to README.
- Update requirements to PHP 8 or PHP 7.4.
- Update tests to run on latest version of PHP Unit.
- Removed Travis config, will switch to GitHub actions at some point soon.
- Videos with custom attributes supported, thank you Nicholas Humphries.
- Custom attributes values which aren't strings are ignored.
- Custom attributes which the parser should ignore can now be defined.
- Allow decoded json to be passed in rather than the library decode it, thank you Lode Claassen.
- Validation code DRY, thank you Lode Claassen.
- Missing supported format in exception methods, thank you Lode Claassen.
- Additional work to fix #117, allow through any empty insert, some are valid so for now just render what quill wants, I'll add strict mode later to remove what I consider to be the redundant inserts.
- Fixed #117, compound deltas not aware of the fact that they can also be links.
- Fixed #109 again as it appears I did not fix it correctly before.
- Handle custom color attribute in a better way, assign to style attribute if sensible, thank you Alex. Accepted PR as is, only handles colour, will extend feature in v3.18.0.
- Fixed #108, links within headers not correctly rendering, headers now support child deltas.
- Fixed #109, not correctly closing paragraphs or detecting list type change.
- Removed the
ParserSplitInterface
interface, no use anymore. - Changed which class implements
ParserAttributeInterface
interface. - Removed redundant methods from parsers.
- Code formatting and comment corrections.
- Reworked the parser, split deltas much sooner to try and simplify some of the later logic.
- Return deltas pretty much exactly as defined, most of the new lines intact, I'm thinking about
adding a
strict
mode that will generate what I consider to be better HTML. - Update to the README explaining my plans for v4.
- Reworked a couple of tests and removed one or two that I did not consider to be useful.
- Coding standard correction thanks to Lode Claassen
- Added support for
Color
delta type, it creates a span with a style="color: #xxx" definition, thank you (https://github.com/on2)
Notes
The implementation works and does not break anything, however, I will extend the feature in the future.
It should really be handled in the same way unknown attributes are handled in the plain Insert delta
.
The Insert delta only deals with a simple key and value, it needs to be extended to allow complex values,
that way an attribute like {"attributes":{"style":{"color": #e60000"}}
could generate the same output
and allow much more flexibility. I'm happy to leave the Color
delta in until the next major version as I
believe it is a feature other people may use.
- New paragraph not correctly being created for final sub insert when insert split on multiple newlines.
- New line only inserts no longer ignored by parser, updated a couple of tests because of logic update.
- Updated README, added new credit.
- Multiple attributes ignored by the Markdown and the GitHub Markdown parsers, added two tests to catch regressions.
- Minor changes to README and composer.json.
- Initial support for GitHub flavoured Markdown, extends Markdown and adds support for strike through text.
- Added basic escaping for HTML and Markdown.
- Reorganised the tests ready for additional file support and features.
- Removed duplication in HTMl and Markdown parser, moved similar logic to the base parser class.
- Updated composer dependencies.
- Added additional Quill info to README.
- The Markdown list parsing now correctly using child deltas and matches the HTML parser.
- Added additional list tests, Markdown versions of the HTML list tests.
- List parsing code was ignoring previous items that were closed, incorrectly adding them as children.
- Single item lists not correctly ending.
- Lists where the last character or the entire list item was a non insert delta type rendered incorrectly.
- Deltas can now return their assigned attributes.
- Pass attributes into each HTML delta.
- A slew of tests to test lists.
- Lists no longer break if a list item contains formatted text, closes #89.
- Initial support for child deltas.
- Added video support to HTML and Markdown parsers.
- Newlines before inserts were being ignore, closes #87.
- Minor corrections to README.
- Added test coverage.
- Added new Interfaces, will simplify additional of new parsers.
- Initial Markdown development, not complete, no escaping yet and not fully tested.
- Reverted requirements to 7.1, turns out there isn't currently a hard requirement for 7.2.
- General refactoring, also, improved list handling.
load()
andloadMultple()
now support method chaining, closes #72, required a minor change to throw exceptions.- Generated HTML now has newlines where expected, closes #69
- Updated one test, expected and actual the wrong way around.
- Added a
Options
class. - Added two tests to catch exceptions.
- Added a trim option to
render
, strips any extra whitespace.
- Line breaks missing, added where expected, a couple of tests where updated
to include the
<br />
where it should have been in the expected output, closes #67.
- Fixed bugs #64 and #65, empty deltas being created by the preg_match on \n
- Added support for passing multiple deltas into the API/parser, limited to multiple of the same type.
- Added support for reusing the renderer, added
load()
method to enable this. - README updated to show new usage.
- Minor comment and variable corrections.
- Added tests to cover new feature.
- Add initial support for loading multiple deltas, very basic and not yet supported through the API, next version.
- Custom attributes can be added to base insert and compound delta. The base insert adds a span around the insert text; the compound delta adds the attributes to the outer HTML tag.
- Added code coverage reporting via coveralls.io.
- Increased test coverage, test for thrown exceptions and removed redundant method in Delta class.
Parser::load()
wasn't resetting the deltas array, thanks tominventisbe.- Added
CompoundImage
delta,Compound
delta was incorrectly trying to handle images, thanks tominventisbe. - The
CompoundImage
delta now assigns all defined attributes to theimg
tag. - Renamed the
CompositeTest
, nowCompoundTest
, new name more closely matches what I am testing. - Added credit to Mark Davison - Missing in the v3.00.0 release.
v3.00.0 is an almost complete rewrite of v2.03.1, the new design is flexible and supports all the features of the previous versions without any blatant hacks, no more methods named checkLastItemClosed() or removeRedundantParentTags(), the renderer is simpler because it just needs to iterate over a Deltas array.
There was no change to the API. However, if you use it by calling the parser and renderer classes directly I renamed
one method, \DBlackborough\Quill\Parser\HTML::content()
is now \DBlackborough\Quill\Parser\HTML::deltas()
.
- Minor bug fix and test thanks to pdiveris (https://github.com/pdiveris), deals with null inserts.
- Updated README, feature list incorrect, added v3.0 and also added a message on v1/v2 development.
- Updated composer.json, added suggest for PHP7.2.
- Removed /example folder and updated .gitignore.
- Added deltas() method to Parser/HTML.php.
- Added parserLoaded() method to Render.php
- Reworked tests.
- Added additional paragraph tests.
Note: The CompositeTest::testMultipleParagraphsWithAttributes test fails, this will pass in version 3.0.
- Updated attribute support table in README.
- Removed redundant settings method.
- Removed redundant construct params.
- Removed commented out code
- Removed settings code, new parser/renderer should be created to change options.
- Refactoring, updated method names to better match the containing logic.
- Updated README, Quill attribute support.
- Organised tests by renderer type prior to markdown development.
- Removed settings tests, settings are being stripped, don't make any sense, better option is to create a new renderer.
- Removed ./idea/ from .gitignore, should be ignored globally, not locally.
- Switched to PHP 7.1 only.
- Updated library code, strict types etc.
- If a list follows text the generated HTML is invalid. [Bugfix] (Credit: Carlos https://github.com/sald19 for finding bug)
- Switched to preg_split, code was looking for two or more newlines but ever only splitting on two.
- Moved newline replacement to last possible step.
- Attribute incorrect for bullet list (Credit: Carlos https://github.com/sald19) [Bugfix]
- Only testing against 7.1 going forward.
- Added credits section to README.
- Added support for ordered and unordered lists.
- Updated README, notes on version 2.00.0
- Added support for paragraph breaks, converts double newlines from quill insert into a new p tag, the feature is not yet bulletproof, I need to take another look at my parser.
- Composer autoload definition updated.
- Added warnings to readme.
- I'm now only testing against PHP 7+. [Tests]
- Added tests for setting attributes. [Tests]
- Switched to PSR4
- Minor change to API if using Quill (Render) class, after the PSR4 change I didn't like Quill/Quill.
- Basic support for images (outputting the base64 directly via src="")
- Added the ability to set the HTML tag for the following Quill attributes, bold, italic, script, strike and underline. [Feature]
- Minor rework to Quill class to allow options to be set, parse() was being called before the new option value was being set.
- Updated readme, now shows direct usage example.
- HTML parser no longer checks against HTML tags directly (h1, h2 etc), uses tag type. [Bugfix]
- Added
assign
index to options array, no longer need to check HTML tag directly. [Bugfix] - Removed redundant code.
- I simplified the usage of renderer ready for additional output formats, instantiate Quill class to use renderer and then simply call render().
- I have finally moved to PHPUnit 6.
Note: The Quill class does not expose the ability to override options, that will be added in the future.
- I added support for headings. [Feature]
- I have had to remove all newline support, I need to rework my logic. [Regression]
- I have added support for sub and super script. [Feature]
- I have added support for links. [Feature]
- I have been busy refactoring, I have simplified how attributes are replaced.
- I have added additional tests.
- I have updated the README, example incorrect.
- I have updated all method documentation.
I got most of the way through adding basic support for lists and then stumbled on a problem, I need to rework how newlines are handled and tidy up the code, the code needs to become aware of block elements.
- Reworked rendering code.
- Added base class so additional rendering class can be developed, for example a markdown renderer.
- Newline correctly trimmed from final insert. [Bugfix]
- Initial release, converts delta inserts into HTML, support four attributes,
bold
,strike
,italic
andunderline
. The HTML tag to be used for each attribute can be set along with the attributes to use for newlines and paragraphs, defaults tobr
andp
.