title: How can I get a CKEditor value?
body: <p>I have this input field in my view:</p>
  
  <pre><code>&lt;div class="treatment-service"&gt;
    &lt;%= f.input :service_id, as: :select, collection: current_partner.services.pluck(:name, :id), :label =&gt; "Serviciu" %&gt;
  &lt;/div&gt;
  &lt;%= f.input :description, :as =&gt; :ckeditor, :input_html =&gt; { :ckeditor =&gt; {:toolbar =&gt; 'Pure'}}%&gt;
  </code></pre>
  
  <p>and this function in my treatments.js file, where I autocomplete details based on the value selected in the dropdown select.</p>
  
  <pre><code>var serviceDetails = function (){
    $('.treatment-service').change(function(){
        var service_id = $(this).find('select').val();
        debugger
        $.ajax({
          type: 'get',
          url: "/treatment_services/"+service_id,
          dataType: 'json',
          success: function(data){
            debugger
          $('.treatment-service').closest('div').next().find('input').val(data.price)
          $('.treatment-service').closest('div').next().next().find('input').val(data.unit)
          }
        })
      });
  }
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>  def service_details
      render json: current_partner.services.find(params[:service_id])
    end
  </code></pre>
  
  <p>route:</p>
  
  <pre><code>get '/treatment_services/:service_id' =&gt; 'treatments#service_details'
  </code></pre>
  
  <p>But how can I get the instance value from inside the ckeditor field?
  Thanks!</p>