Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7431007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:13:45+00:00 2026-05-29T09:13:45+00:00

I’m implementing TinyMCE in a website and I’m having issues with pasting, I wondered

  • 0

I’m implementing TinyMCE in a website and I’m having issues with pasting, I wondered if anyone has had this bug before.

The basic structure inside the textarea is like this:

<h5>I am a heading</h5>
<p>I am a paragraph</p>

So when I first start editing if I place the cursor at the beginning of the editor and hit return a couple of times, then go back to the top to paste something in above the h5, the paste wipes out the h5.

When I look in the format dropdown before I paste, it says I’m still in a heading 5 and in the status bar it says ‘Path: div » h3 » span.-span’, is there a common solution to this problem?

Thanks

Update – I’ve just noticed this happens when I insert a line break instead of pasting too.

Update 2 – It happens to the h5 if I have applied a colour to it within TinyMCE.

So I colour the heading, then put the cursor before it, press return and try to paste/line break in the new space above and that clears it out. When coloured the html of the h5 looks like this:

<h5>
    <span style="color: #0000ff;">
        I am a heading
    </span>
</h5>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:13:46+00:00Added an answer on May 29, 2026 at 9:13 am

    Ok, I revisited this problem and I figured it out.

    It seems that through either something I did or through some bug from an action on TinyMCE (perhaps paste from Word?) a clearing div got wrapped around the content (or sometimes part of the content) and saved in the database that looked like this:

    <div style="clear: both;">
        The content
    </div>
    

    Whenever a paste or a linebreak insert was done inside this div it cleared the rest of the content, and removing the div fixed the issue.

    I’m sorry I cannot uncover what caused this but I hope that at least helps anyone searching.

    *Edit*

    I think this may have to do with pasting from word and the allowed tags in tinyMCE.
    Using tinyMCE as a more fully fledged web page editor I believe it is good practice to include the following line in the initialization options:

    valid_elements : '*[*]'
    

    That will make tinyMCE allow any html tags you wish, and though I have yet to test it I believe this would also fix my pasting issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.