php - Codemirror not working with Yii view, bootstrap -


i trying integrate codemirror 1 of view in yii 1

but result not good.

please me.

in controller: registered

$cs->registerscriptfile($baseurl.'/js/codemirror.js', \cclientscript::pos_begin); $cs->registerscriptfile($baseurl.'/js/php.js', \cclientscript::pos_begin); 

in view.php

    <textarea id="editor" name="editor" rows="10" style="width: inherit;">     <?= htmlentities($model->diff_content); ?> </textarea> <script type="text/javascript">     var e = codemirror.fromtextarea(document.getelementbyid("editor"), {         mode: "application/x-httpd-php"         //theme: 'blackboard'     });     /*function app() {          var txt = "mytext";         $('textarea#code').text(txt);     }*/ </script> 

result: enter image description here

thank much

i found answer question

$cs->registercssfile($baseurl.'/css/codemirror.css', \cclientscript::pos_begin); 

it generate

and problem

i have change

$cs->registercssfile($baseurl.'/css/codemirror.css'); 

without \cclientscript::pos_begin

everything work.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -