From 945f03f725fb30dbf0be9e475b4451a40bb3b823 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Mon, 18 Sep 2017 17:41:19 +0100 Subject: [PATCH] Refactoring * Refactoring and cleanup. --- CHANGELOG.md | 6 +++ README.md | 45 ++++++++++++---------- src/Parser/Html.php | 91 +++++++++----------------------------------- src/Parser/Parse.php | 53 +++----------------------- src/Render.php | 18 --------- 5 files changed, 53 insertions(+), 160 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a744843..eedf1b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Full changelog for PHP Quill Renderer +## 2.02.0 - 2017-09-18 + +* 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. + ## 2.01.0 - 2017-09-17 * Organised tests by renderer type prior to markdown development. diff --git a/README.md b/README.md index 6c9db59..72f7c8d 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,12 @@ # PHP Quill Renderer -*Render quill insert deltas to HTML and Markdown.* +*Render quill insert deltas to HTML and soon Markdown.* ## Description -Quill deltas renderer, converts deltas to HTML, the Quill attributes supported are listed in a table below. -Version 2.00.0 is in development, I'm working on support for additional Quill attributes, markdown support and a -full rewrite of the parser, version 2.00.0 will only support PHP7.1+. +Quill deltas renderer, converts deltas to HTML, the Quill attributes supported are listed in a table below. +I'm working on support for the remaining attributes and additional parsers (markdown etc.) ## PHP 5.6 @@ -42,18 +41,29 @@ $renderer = new \DBlackborough\Quill\Renderer\Html($parser->content()); echo $renderer->render(); ``` -## Options -The HTML tag to use for Quill attributes can be set along with the HTML tags for the container. - -### Default options +## Quill attributes -Separator | HTML Tag +Attribute | Support --- | --- -Container | `

` - -#### Default attribute options - -Quill Attribute | HTML Tag +Bold | Yes +Italic | Yes +Link | Yes +Strike | Yes +Script:Sub | Yes +Script:Super | Yes +Underline | Yes +Header | Yes +Image | Yes +List | Yes +Indent/Outdent | Not yet +Text direction | Not yet +Color | Not yet +Font | Not yet +Text align | Not yet +Block quote | Not yet +Code block | Not yet + +Attribute | HTML Tag --- | --- Bold | `` Italic | `` @@ -70,13 +80,6 @@ List | `