Skip to content

Commit a39a26d

Browse files
author
Bizley
authored
Merge pull request #19 from bizley/quill-local-composer
3.0.0
2 parents c13fd0a + b499cf9 commit a39a26d

File tree

4 files changed

+28
-40
lines changed

4 files changed

+28
-40
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Tests
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
env:
66
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader"
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php: ['7.0', '7.1', '7.2', '7.3', '7.4']
15+
php: ['7.1', '7.2', '7.3', '7.4']
1616

1717
steps:
1818
- name: Checkout
@@ -34,15 +34,5 @@ jobs:
3434
restore-keys: ${{ runner.os }}-composer-
3535
- name: Install dependencies
3636
run: composer update $DEFAULT_COMPOSER_FLAGS
37-
- name: PHP Unit tests for PHP 7.4
38-
run: vendor/bin/phpunit -v --coverage-clover coverage.clover
39-
if: matrix.php == '7.4'
40-
- name: PHP Unit tests for PHP 7.0 - 7.3
41-
run: vendor/bin/phpunit -v
42-
if: matrix.php == '7.3' || matrix.php == '7.2' || matrix.php == '7.1' || matrix.php == '7.0'
43-
- name: Code coverage
44-
run: |
45-
wget https://scrutinizer-ci.com/ocular.phar
46-
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
47-
if: matrix.php == '7.4'
48-
continue-on-error: true # if is fork
37+
- name: PHP Unit tests
38+
run: vendor/bin/phpunit --verbose

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
![Latest Stable Version](https://img.shields.io/packagist/v/bizley/quill.svg)
44
[![Total Downloads](https://img.shields.io/packagist/dt/bizley/quill.svg)](https://packagist.org/packages/bizley/quill)
55
![License](https://img.shields.io/packagist/l/bizley/quill.svg)
6-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bizley/yii2-quill/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/bizley/yii2-quill/?branch=master)
7-
[![Code Coverage](https://scrutinizer-ci.com/g/bizley/yii2-quill/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/bizley/yii2-quill/?branch=master)
8-
[![Build Status](https://scrutinizer-ci.com/g/bizley/yii2-quill/badges/build.png?b=master)](https://scrutinizer-ci.com/g/bizley/yii2-quill/build-status/master)
96

107
*Yii 2 implementation of Quill, modern WYSIWYG editor.*
118

@@ -24,15 +21,15 @@ You can find Quill at https://quilljs.com/
2421
Run console command
2522

2623
```
27-
composer require bizley/quill:^2.7
24+
composer require bizley/quill:^3.0
2825
```
2926

3027
Or add the package to your `composer.json`:
3128

3229
```json
3330
{
3431
"require": {
35-
"bizley/quill": "^2.7"
32+
"bizley/quill": "^3.0"
3633
}
3734
}
3835
```
@@ -109,7 +106,7 @@ lines are added.
109106

110107
By default Quill is provided through the CDN (https://cdn.quilljs.com). You can change the Quill's version set with the
111108
current yii2-quill's release by changing `'quillVersion'` parameter but some options may not work correctly in this case.
112-
Starting from version 2.7.0 you can use local assets for Quill provided through NPM packet manager - to do
109+
Starting from version 3.0.0 you can use local assets for Quill provided through NPM packet manager - to do
113110
so run
114111

115112
```
@@ -163,7 +160,7 @@ To add this option configure widget with [Formula module](https://quilljs.com/do
163160
```
164161

165162
By default KaTeX is provided through the CDN (https://cdn.jsdelivr.net). You can change the version of KaTeX by setting
166-
the `'katexVersion'` parameter. Starting from version 2.7.0 you can use local assets for KaTeX provided through NPM
163+
the `'katexVersion'` parameter. Starting from version 3.0.0 you can use local assets for KaTeX provided through NPM
167164
packet manager - to do so run
168165

169166
```
@@ -197,7 +194,7 @@ To add this option configure widget with [Syntax Highlighter module](https://qui
197194
```
198195

199196
By default highlight.js is provided through the CDN (https://cdn.jsdelivr.net). You can change the version of
200-
highlight.js by setting the `'highlightVersion'` parameter. Starting from version 2.7.0 you can use local assets for
197+
highlight.js by setting the `'highlightVersion'` parameter. Starting from version 3.0.0 you can use local assets for
201198
highlight.js provided through NPM packet manager - to do so run
202199

203200
```

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "bizley/quill",
33
"description": "Quill editor implementation for Yii 2.",
44
"type": "yii2-extension",
5-
"keywords": ["yii2","quill","wysiwyg","widget","editor"],
5+
"keywords": ["yii2","quill","wysiwyg","widget","editor","katex","highlight.js"],
66
"license": "Apache-2.0",
77
"authors": [
88
{
@@ -14,7 +14,7 @@
1414
"source": "https://github.com/bizley/yii2-quill"
1515
},
1616
"require": {
17-
"php": "^7.0",
17+
"php": "^7.1",
1818
"yiisoft/yii2": "^2.0.0"
1919
},
2020
"require-dev": {
@@ -25,8 +25,9 @@
2525
"roave/security-advisories": "dev-master"
2626
},
2727
"suggest": {
28-
"npm-asset/highlight.js": "To use syntax highlighting",
29-
"npm-asset/katex": "To use formula module"
28+
"npm-asset/highlight.js": "For local highlight.js assets",
29+
"npm-asset/katex": "For local KaTeX assets",
30+
"npm-asset/quill": "For local Quill assets"
3031
},
3132
"autoload": {
3233
"psr-4": {

src/Quill.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* See the documentation for more details.
3030
*
3131
* @author Paweł Bizley Brzozowski
32-
* @version 2.7.0
32+
* @version 3.0.0
3333
* @license Apache 2.0
3434
* https://github.com/bizley/yii2-quill
3535
*
@@ -77,7 +77,7 @@ class Quill extends InputWidget
7777
* ['bold' => '<i class="fa fa-bold" aria-hidden="true"></i>']
7878
* will overwrite default icon for "bold" button.
7979
* @see https://github.com/quilljs/quill/issues/1099
80-
* @since 2.7.0
80+
* @since 3.0.0
8181
*/
8282
public $icons = [];
8383

@@ -174,7 +174,7 @@ class Quill extends InputWidget
174174
* See https://github.com/isagalaev/highlight.js/tree/master/src/styles
175175
* Used when Syntax module is added.
176176
* Provide just the name of stylesheet (skip ".css" or ".min.css").
177-
* Since 2.7.0 this property works also for $localAssets set to true.
177+
* Since 3.0.0 this property works also for $localAssets set to true.
178178
* @since 2.0.0
179179
*/
180180
public $highlightStyle = 'default';
@@ -254,7 +254,7 @@ public function init()
254254
/**
255255
* Returns Quill configuration.
256256
* @return array
257-
* @since 2.7.0
257+
* @since 3.0.0
258258
*/
259259
public function getConfig()
260260
{
@@ -265,7 +265,7 @@ public function getConfig()
265265
* Adds new value to Quill configuration.
266266
* @param string $name
267267
* @param mixed $value
268-
* @since 2.7.0
268+
* @since 3.0.0
269269
*/
270270
public function addConfig($name, $value)
271271
{
@@ -276,7 +276,7 @@ public function addConfig($name, $value)
276276
* Adds new module to Quill configuration.
277277
* @param string $name
278278
* @param mixed $config
279-
* @since 2.7.0
279+
* @since 3.0.0
280280
*/
281281
public function addModule($name, $config)
282282
{
@@ -298,7 +298,7 @@ public function addModule($name, $config)
298298
/**
299299
* Sets Quill configuration.
300300
* @param array $config
301-
* @since 2.7.0
301+
* @since 3.0.0
302302
*/
303303
public function setConfig($config)
304304
{
@@ -311,7 +311,7 @@ public function setConfig($config)
311311
/**
312312
* Checks whether the Katex needs to be added.
313313
* @return bool
314-
* @since 2.7.0
314+
* @since 3.0.0
315315
*/
316316
public function isKatex()
317317
{
@@ -321,11 +321,11 @@ public function isKatex()
321321
/**
322322
* Sets Katex flag.
323323
* @param bool $katex
324-
* @since 2.7.0
324+
* @since 3.0.0
325325
*/
326326
public function setKatex($katex)
327327
{
328-
$this->_katex = (bool)$katex;
328+
$this->_katex = (bool) $katex;
329329
}
330330

331331
/** @var bool */
@@ -334,7 +334,7 @@ public function setKatex($katex)
334334
/**
335335
* Checks whether the Highlight.js needs to be added.
336336
* @return bool
337-
* @since 2.7.0
337+
* @since 3.0.0
338338
*/
339339
public function isHighlightJs()
340340
{
@@ -344,11 +344,11 @@ public function isHighlightJs()
344344
/**
345345
* Sets Highlight.js flag.
346346
* @param bool $highlightJs
347-
* @since 2.7.0
347+
* @since 3.0.0
348348
*/
349349
public function setHighlightJs($highlightJs)
350350
{
351-
$this->_highlightJs = (bool)$highlightJs;
351+
$this->_highlightJs = (bool) $highlightJs;
352352
}
353353

354354
/** Prepares Quill configuration */
@@ -389,7 +389,7 @@ protected function prepareOptions()
389389
$this->addConfig('formats', $this->formats);
390390
}
391391

392-
if ($this->readOnly !== null && (bool)$this->readOnly) {
392+
if ($this->readOnly !== null && (bool) $this->readOnly) {
393393
$this->addConfig('readOnly', true);
394394
}
395395

0 commit comments

Comments
 (0)