title: Diisplay Rich text in ASP.NET Core (Razor)
body: <p>I have played around creating a restaurant site. I finally got tinyMCE to work, so that i can write text to my database using bold, italic etc.</p>
  
  <p>However when i try to show the text, its not showing up in rich format, neither are images showing.</p>
  
  <p>My code looks like this when i write it down:</p>
  
  <pre><code>&lt;div class="form-group row"&gt;
              &lt;div class="col-2"&gt;
                  &lt;label asp-for="MenuItem.Description" class="custom-label"&gt;&lt;/label&gt;
              &lt;/div&gt;
              &lt;div class="col-5"&gt;
                  &lt;input id="mytextarea" asp-for="MenuItem.Description" class="form-control" /&gt;
              &lt;/div&gt;
              &lt;span asp-validation-for="MenuItem.Description" class="text-danger"&gt;&lt;/span&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>However, when i want to see the text, it returns like this:</p>
  
  <p><a href="https://i.stack.imgur.com/L295a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L295a.png" alt="enter image description here"></a></p>
  
  <p>This is the code for showing it:</p>
  
  <pre><code>&lt;div class="form-border row"&gt;
      &lt;div class="col-8"&gt;
          &lt;fieldset disabled&gt;
              &lt;div class="form-group row"&gt;
                  &lt;div class="col-4"&gt;
                      &lt;label asp-for="MenuItem.Name" class="custom-label"&gt;&lt;/label&gt;
                  &lt;/div&gt;
                  &lt;div class="col-8"&gt;
                      &lt;input asp-for="MenuItem.Name" class="form-control" /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group row"&gt;
                  &lt;div class="col-4"&gt;
                      &lt;label asp-for="MenuItem.Description" class="custom-label"&gt;&lt;/label&gt;
                  &lt;/div&gt;
                  &lt;div class="col-8"&gt;
                      &lt;textarea asp-for="MenuItem.Description" class="form-control"&gt;&lt;/textarea&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>Is it my forms that somehow prevents me from showing the text in Rich format?</p>
  
  <p>Edit: 
  I've initialized my tinyMCE like this </p>
  
  <pre><code>&lt;script&gt;
  
      tinymce.init({
          selector: '#mytextarea',
          theme: 'modern',
          plugins: ['advlist autolink lists link image charmap print preview hr anchor pagebreak',
              'searchreplace wordcount visualblocks visualchars code fullscreen',
              'insertdatetime media nonbreaking save table contextmenu directionality',
              'emoticons paste textcolor colorpicker textpattern imagetools'
          ],
          toolbar1: 'insertfile undo redo | styleselect fontselect fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
          toolbar2: 'print preview media | forecolor backcolor emoticons',
          image_advtab: true,
          height: "700",
          file_picker_callback: function (callback, value, meta) {
              if (meta.filetype === 'image') {
                  $('#upload').trigger('click');
                  $('#upload').on('change', function () {
                      var file = this.files[0];
                      var reader = new FileReader();
                      reader.onload = function (e) {
                          callback(e.target.result, {
                              alt: ''
                          });
                      };
                      reader.readAsDataURL(file);
                  });
              }
          }
  
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>As said, i can write it down just fine, and i have this bar when doing so:</p>
  
  <p><a href="https://i.stack.imgur.com/dHunm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dHunm.png" alt="enter image description here"></a></p>