modify chosen and ckeditor

1

Chosen

How to modify the data-placeholder value: using javascript ex:

<select data-placeholder="Para:" name="cd_aluno[]"id="cd_aluno"  multiple class="chosen-select">

change the date-placeholder with js

CKEditor

How to disable ckeditor (disabled) textarea Ex:

<textarea id="editor1" class="form-control" name="email" rows="15"style="margin-top: 2px;"></textarea>

document.getElementById("editor1").disabled = true;
    
asked by anonymous 06.09.2016 / 19:34

1 answer

1

To change data-placeholder , use .data() of JQuery :

$('#cd_aluno').data('placeholder', 'novo valor');

To disable CKEditor (make it read-only), you can configure it at startup by setting the CKEDITOR.config.readOnly setting to true. For example:

config.readOnly = true;

Another way is to set the disabled attribute to the <textarea> element that CKEditor replaces. View this example , which allows you to enable and disable CKEditor's read-only mode.

    
06.09.2016 / 19:49