File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 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 );
You can’t perform that action at this time.
0 commit comments