Skip to content

Commit

Permalink
2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizley committed Jan 15, 2020
1 parent aae29b3 commit c7db32d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Quill.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* See the documentation for more details.
*
* @author Paweł Bizley Brzozowski
* @version 2.6.0
* @version 2.6.1
* @license Apache 2.0
* https://github.com/bizley/yii2-quill
*
Expand Down Expand Up @@ -364,7 +364,6 @@ public function registerClientScript()
$editor = 'q_' . \preg_replace('~[^0-9_\p{L}]~u', '_', $this->id);

$js = "var $editor=new Quill(\"#editor-{$this->id}\",$configs);";
$js .= "document.getElementById(\"editor-{$this->id}\").onclick=function(e){document.querySelector(\"#editor-{$this->id} .ql-editor\").focus();};";
$js .= "$editor.on('text-change',function(){document.getElementById(\"{$this->_fieldId}\").value=$editor.root.innerHTML;});";

if (!empty($this->js)) {
Expand Down

0 comments on commit c7db32d

Please sign in to comment.