Hi, I've been trying to add Codemirror to the widget by implementing the instruction provided both on Imperavi website and Redactor Manual v10 but to no avail.
/**
* Codemirror asset bundle.
*
* @author NickGoodwind <nickgoodwind@gmail.com>
*/
class CodemirrorAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $js = [
'js/codemirror/codemirror.js',
'js/codemirror/mode/htmlmixed/htmlmixed.js',
];
public $css = [
'css/codemirror.css'
];
public $depends = [
'app\modules\admin\assets\AdminAppAsset'
];
}
By reviewing further into the extension code, it seems that no new CodeMirror editor instance is created anywhere inside the redactor.js file. Are there some missing steps I am not looking?
Hi, I've been trying to add Codemirror to the widget by implementing the instruction provided both on Imperavi website and Redactor Manual v10 but to no avail.
This is the code included in the widget:
<?= $form->field($model, 'description')->widget(Widget::class, [ 'settings' => [ 'codemirror' => true ] ])
This is the result obtained:
https://user-images.githubusercontent.com/87220094/170595898-2418a439-bb82-4fdb-9c1b-21aee69a9636.mov
No changes to the editor at all, not even a new textArea or similar.
This are my files View:
CodemirrorAsset:
By reviewing further into the extension code, it seems that no new CodeMirror editor instance is created anywhere inside the
redactor.js
file. Are there some missing steps I am not looking?