 core/modules/ckeditor/ckeditor.module              |    9 +-------
 .../Plugin/CKEditorPlugin/DrupalImageCaption.php   |    9 +-------
 .../ckeditor/Plugin/CKEditorPlugin/Internal.php    |    2 +-
 .../editor/lib/Drupal/editor/EditorInterface.php   |    9 +++++++-
 .../editor/lib/Drupal/editor/Entity/Editor.php     |   23 +++++++++++++++++---
 5 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module
index bf1a8ec..7000dbf 100644
--- a/core/modules/ckeditor/ckeditor.module
+++ b/core/modules/ckeditor/ckeditor.module
@@ -48,17 +48,10 @@ function ckeditor_theme() {
  * Implements hook_ckeditor_css_alter().
  */
 function ckeditor_ckeditor_css_alter(array &$css, Editor $editor) {
-    $filters = array();
-    if (!empty($editor->format)) {
-      $filters = entity_load('filter_format', $editor->format)
-        ->filters()
-        ->getAll();
-    }
-
   // Add the filter caption CSS if the text format associated with this text
   // editor uses the filter_caption filter. This is used by the included
   // CKEditor DrupalImageCaption plugin.
-  if (isset($filters['filter_caption']) && $filters['filter_caption']->status) {
+  if ($editor->getFilterFormat()->filters('filter_caption')->status) {
     $css[] = drupal_get_path('module', 'filter') . '/css/filter.caption.css';
   }
 }
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalImageCaption.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalImageCaption.php
index bdbb7bb..6c01e8e 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalImageCaption.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalImageCaption.php
@@ -64,17 +64,10 @@ public function getConfig(Editor $editor) {
    * {@inheritdoc}
    */
   function isEnabled(Editor $editor) {
-    $filters = array();
-    if (!empty($editor->format)) {
-      $filters = entity_load('filter_format', $editor->format)
-        ->filters()
-        ->getAll();
-    }
-
     // Automatically enable this plugin if the text format associated with this
     // text editor uses the filter_caption filter and the DrupalImage button is
     // enabled.
-    if (isset($filters['filter_caption']) && $filters['filter_caption']->status) {
+    if ($editor->getFilterFormat()->filters('filter_caption')->status) {
       $enabled = FALSE;
       foreach ($editor->settings['toolbar']['rows'] as $row) {
         foreach ($row as $group) {
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php
index c683e3e..1e6eb5f 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php
@@ -286,7 +286,7 @@ protected function generateFormatTagsSetting(Editor $editor) {
    */
   protected function generateAllowedContentSetting(Editor $editor) {
     // When nothing is disallowed, set allowedContent to true.
-    $format = entity_load('filter_format', $editor->format);
+    $format = $editor->getFilterFormat();
     $filter_types = $format->getFilterTypes();
     if (!in_array(FilterInterface::TYPE_HTML_RESTRICTOR, $filter_types)) {
       return TRUE;
diff --git a/core/modules/editor/lib/Drupal/editor/EditorInterface.php b/core/modules/editor/lib/Drupal/editor/EditorInterface.php
index 71897f9..2fab152 100644
--- a/core/modules/editor/lib/Drupal/editor/EditorInterface.php
+++ b/core/modules/editor/lib/Drupal/editor/EditorInterface.php
@@ -10,8 +10,15 @@
 use Drupal\Core\Config\Entity\ConfigEntityInterface;
 
 /**
- * Provides an interface defining a editor entity.
+ * Provides an interface defining a text editor entity.
  */
 interface EditorInterface extends ConfigEntityInterface {
 
+  /**
+   * Returns the filter format this text editor is associated with.
+   *
+   * @return \Drupal\filter\FilterFormatInterface
+   */
+  public function getFilterFormat();
+
 }
diff --git a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
index 0053de4..c58d2fa 100644
--- a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
+++ b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
@@ -15,7 +15,7 @@
  *
  * @ConfigEntityType(
  *   id = "editor",
- *   label = @Translation("Editor"),
+ *   label = @Translation("Text Editor"),
  *   entity_keys = {
  *     "id" = "format"
  *   }
@@ -53,14 +53,21 @@ class Editor extends ConfigEntityBase implements EditorInterface {
   public $image_upload = array();
 
   /**
-   * Overrides Drupal\Core\Entity\Entity::id().
+   * The filter format this text editor is associated with.
+   *
+   * @var \Drupal\filter\FilterFormatInterface
+   */
+  protected $filterFormat;
+
+  /**
+   * {@inheritdoc}
    */
   public function id() {
     return $this->format;
   }
 
   /**
-   * Overrides Drupal\Core\Entity\Entity::__construct()
+   * {@inheritdoc}
    */
   public function __construct(array $values, $entity_type) {
     parent::__construct($values, $entity_type);
@@ -75,4 +82,14 @@ public function __construct(array $values, $entity_type) {
     $this->settings += $default_settings;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getFilterFormat() {
+    if (!$this->filterFormat) {
+      $this->filterFormat = \Drupal::entityManager()->getStorageController('filter_format')->load($this->format);
+    }
+    return $this->filterFormat;
+  }
+
 }
