html – Why my element is not dislaying the right format with tinyMCE editor?

I have a paragraph element to display some content description and these paragraph strings are being stored from my database after they were inputed using the tinyMCE editor. The p element on my html is not displaying the right format instead it displays including the tags from the tinyMCE editor and has no proper line spacing. Please see screenshot below.

enter image description here

Here are some details of my code.


<p class="description" ></p>


p.description {
    font-size: medium;
    font-weight: normal;
    color: black;
    font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
    display: block;
    height: auto;
    margin-bottom: 5px;
    white-space: pre-line;     

// Initialize tinyMCE...
        selector: '#mytextarea',
        mode: "textarea",
        setup: function (editor) {
            editor.on('keyup', function (e) {

I’m using jQuery on my script and tinyMCE editor to input the data. Kindly check what I’ve been missing here. Hoping for any assistance on this issue I have. Thanks

Source link

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here