Rendering plain text instead of formatted data In my custom module (in Drupal 8), I am using a form field (in a custom form) to use CKEDITOR with the following code which loads the editor fine.

$form['full_detail_text'] = array(
  '#type' =&gt; 'text_format',
  '#format' =&gt; 'full_html',
  '#title' =&gt; t('Full Detail'),
  '#rows' =&gt; 5,
);


The following code saves the posted data in the database.

$query = db_insert('my_table')
  -&gt;fields(array(
    'full_detail_text' =&gt; $form_state-&gt;getValue('english_copy_text')[value],
    'date' =&gt; REQUEST_TIME,
  ))
  -&gt;execute();


I am using a view page display to render this output, but the output for this field is displaying data as plain text (no formatting) along with HTML code instead of formatted data same as in the editor.

Is there a configuration setting I need to adjust or perhaps hook_views_pre_render() to transform this field's data from plain text to HTML markup?
I believe you can use check_markup to render the text in the specified format. In your example, you'd want to also save the format, something like:

$query = db_insert('my_table')
  -&gt;fields(array(
   'full_detail_text' =&gt; $form_state-&gt;getValue('english_copy_text')[value],
   'full_detail_format' =&gt; $form_state-&gt;getValue('english_copy_text')[format],
   'date' =&gt; REQUEST_TIME,
  ))
 -&gt;execute();


Then when you go to render it in the hook_views_pre_render

$rendered_markup  = check_markup($full_detail_text, $full_detail_format),


For more info,
 see:
 https://api.drupal.org/api/drupal/core%21modules%21filter%21filter.module/function/check_markup/8.3.x