Answers.Body: <p>At least with the <a href="https://github.com/craftcms/ckeditor/releases/tag/1.0.0-beta.2" rel="nofollow noreferrer">1.0.0-beta2</a> release of the plugin (which is using an old  CKEditor 5 Developer Preview v0.11.0) build, an empty field will will output an <code>&lt;p&gt; &lt;/p&gt;</code> tag pair.</p>
  
  <p>This behavior might change once it gets updated to a stable release.</p>
  
  <p>Kinda lame, but for now you could do something like this:</p>
  
  <pre><code>{% set entry = craft.entries.id(2).one() %}
  
  {% set emptyCKEditor = "&lt;p&gt; &lt;/p&gt;" %}
  
  {% if entry.ckeditor == emptyCKEditor %}
      EMPTY
  {% else %}
      NOT EMPTY
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-10T17:41:37.490Z
Answers.LastActivityDate: 2018-10-10T17:41:37.490Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>Brad's answer should work - it makes perfect sense and it is technically correct - but for some reason it didn't for me.</p>
  
  <p>Given that the goal for me was to become unstuck rather than explore the reason why, I did something that is not by any means precise, but it does the job.</p>
  
  <p>I just tested against the length of the ckeditor field contents, the assumption being that, since this is a rich text field containing HTML code, it is highly unlikely (at least in my case) that the length of the string contained will be less than </p>
  
  <p><code>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</code></p>
  
  <p>(which is what my setup was spitting out). My work-around:</p>
  
  <pre><code>{% if entry.ckeditor|length &gt; 11 %}
    EMPTY
  {% else %}
    NOT EMPTY
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-07T13:37:10.203Z
Answers.LastActivityDate: 2019-11-07T13:37:10.203Z
Answers.UserDisplayName: Leonidas Kossis
Body: <p>I'm using CKEditor as one of my fields, I'm trying to detect if there is any content within them, unfortunately it's still appearing even using the below code (and the field is actually empty).</p>
  
  <pre><code>{% if entry.formal is empty %}
  
  {% else %}
  &lt;dl class="row"&gt;
    &lt;dt class="col-sm-3"&gt;Description lists&lt;/dt&gt;
    &lt;dd class="col-sm-9"&gt;{{ entry.formal }}&lt;/dd&gt;
  &lt;/dl&gt;
  {% endif %}
  </code></pre>
  
Tags: <templating><ckeditor5>
Title: CKEditor Null Value
ThreadText: # CKEditor Null Value
  
  (Asked by: username_0 on 2018-10-02)
  
  I'm using CKEditor as one of my fields, I'm trying to detect if there is any content within them, unfortunately it's still appearing even using the below code (and the field is actually empty).
  
  ```
  {% if entry.formal is empty %}
  
  {% else %}
  <dl class="row">
    <dt class="col-sm-3">Description lists</dt>
    <dd class="col-sm-9">{{ entry.formal }}</dd>
  </dl>
  {% endif %}
  
  ```
  
  **Tags:** templating, ckeditor5
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-10-10. Score: 1 | Accepted answer
  
  At least with the [1.0.0-beta2](https://github.com/craftcms/ckeditor/releases/tag/1.0.0-beta.2) release of the plugin (which is using an old CKEditor 5 Developer Preview v0.11.0) build, an empty field will will output an `<p> </p>` tag pair.
  
  This behavior might change once it gets updated to a stable release.
  
  Kinda lame, but for now you could do something like this:
  
  ```
  {% set entry = craft.entries.id(2).one() %}
  
  {% set emptyCKEditor = "<p> </p>" %}
  
  {% if entry.ckeditor == emptyCKEditor %}
      EMPTY
  {% else %}
      NOT EMPTY
  {% endif %}
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2019-11-07. Score: 1
  
  username_1's answer should work - it makes perfect sense and it is technically correct - but for some reason it didn't for me.
  
  Given that the goal for me was to become unstuck rather than explore the reason why, I did something that is not by any means precise, but it does the job.
  
  I just tested against the length of the ckeditor field contents, the assumption being that, since this is a rich text field containing HTML code, it is highly unlikely (at least in my case) that the length of the string contained will be less than
  
  `<p>&nbsp;</p>`
  
  (which is what my setup was spitting out). My work-around:
  
  ```
  {% if entry.ckeditor|length > 11 %}
    EMPTY
  {% else %}
    NOT EMPTY
  {% endif %}
  
  ```
  
  
  ---
  
  