modify Chosen and ckeditor

Asked

Viewed 165 times

1

Chosen

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

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

change the data-placeholder with js

Ckeditor

How to disable the ckeditor textarea (disabled) Ex:

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

document.getElementById("editor1").disabled = true;

1 answer

2

To change the data-placeholder, use the .data() jquery:

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

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

config.readOnly = true;

Another way is to define the attribute disabled for the element <textarea> which the Ckeditor replaces. Take this example, enabling and disabling read-only mode of the Ckeditor.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.