Skip to content

Commit b3462f6

Browse files
author
Bizley
committed
Quill 1.1.8
Highlight.js 9.9.0 Additional JS for click focusing bizley/yii2-podium#79
1 parent 7d52bb4 commit b3462f6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Quill.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* See the documentation for more details.
2121
*
2222
* @author Paweł Bizley Brzozowski
23-
* @version 2.0.1
23+
* @version 2.1
2424
* @license Apache 2.0
2525
* https://github.com/bizley/yii2-quill
2626
*
@@ -118,7 +118,7 @@ class Quill extends InputWidget
118118
* Version different from default for this release might not work correctly.
119119
* @since 2.0
120120
*/
121-
public $quillVersion = '1.1.5';
121+
public $quillVersion = '1.1.8';
122122

123123
/**
124124
* @var array Quill options.
@@ -140,7 +140,7 @@ class Quill extends InputWidget
140140
* Used when Syntax module is added.
141141
* @since 2.0
142142
*/
143-
public $highlightVersion = '9.8.0';
143+
public $highlightVersion = '9.9.0';
144144

145145
/**
146146
* @var string Highlight.js stylesheet to fetch from https://cdnjs.cloudflare.com
@@ -306,6 +306,7 @@ public function registerClientScript()
306306
$editor = 'q_' . preg_replace('~[^0-9_\p{L}]~u', '_', $this->id);
307307

308308
$js = "var $editor=new Quill(\"#editor-{$this->id}\",$configs);";
309+
$js .= "document.getElementById(\"editor-{$this->id}\").onclick=function(e){document.querySelector(\"#editor-{$this->id} .ql-editor\").focus();};";
309310
$js .= "$editor.on('text-change',function(){document.getElementById(\"{$this->_fieldId}\").value=$editor.root.innerHTML;});";
310311
if (!empty($this->js)) {
311312
$js .= str_replace('{quill}', $editor, $this->js);

0 commit comments

Comments
 (0)