Answers.Body: <p>Use the CKEditor method <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-setData" rel="nofollow noreferrer"><code>setData()</code></a>:</p>
  <pre><code>CKEDITOR.instances['custom_162_126'].setData('blub');
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-13T23:11:28.817Z
Answers.LastActivityDate: 2021-05-13T23:11:28.817Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Is it possible to set ckeditor text with javascript for a custom field?</p>
  <p>I want to do something similar to the mail templates selection.</p>
  <p>I try $('#custom_162_126').val('blub') but this only change the original field.</p>
  
Tags: <ckeditor><javascript>
Title: How to set ckeditor text with javascript
ThreadText: # How to set ckeditor text with javascript
  
  (Asked by: username_0 on 2021-05-13)
  
  Is it possible to set ckeditor text with javascript for a custom field?
  
  I want to do something similar to the mail templates selection.
  
  I try $('#custom\_162\_126').val('blub') but this only change the original field.
  
  **Tags:** ckeditor, javascript
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-05-13. Score: 1 | Accepted answer
  
  Use the CKEditor method setData():
  CKEDITOR.instances['custom_162_126'].setData('blub');
  
  
  ---
  
  