javascript - How set language ckeditor by html attribute? -


i can language set javascript code

<script type="text/javascript">    ckeditor.config.language = "fr"; </script> 

i had idea set lang this?

<textarea name="name" id="name" cols="30" rows="10" data-lang="fr"></textarea> 

the following 1 should (+ fiddle):

ckeditor.on( 'instancecreated', function( evt ) {         var editor = evt.editor,         element = editor.element,         lang = element.data( 'lang' );      if ( lang )         evt.editor.config.language = lang; }); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -