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 8049859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:54:09+00:00 2026-06-05T06:54:09+00:00

I have been working on an HTML editor using an editable iframe that allows

  • 0

I have been working on an HTML editor using an editable iframe that allows users to create and edit content. I have found that the HTML generated within the iframe varies depending upon the browser being used. For example, in IE and Opera, blocks of text are surrounded by <p> tags;

<p>Hello world!</p>

In Firefox, blocks of texts end with <br> tags;

Hello world!<br>

And in Safari and Chrome, blocks of text are surrounded by <div> tags;

<div>Hello world!</div>

This can be problematic if a user creates content in one browser and tries to edit it in another and can over time lead to inconsistencies in the HTML code.

I have found that some HTML editors can produce the same format of HTML regardless of the browser being used. For example, in CKEditor, blocks of text are always surrounded by <p> tags, allowing the HTML to be cleanly created and edited in any browser.

Is there a way of forcing the iframe to use a specific set of HTML tags, mainly creating only <p> tags when someone creates a new paragraph or block of text regardless of browser? Can anyone offer me any tips, samples of code, or solutions to my problem? I know I could use an existing HTML editor, but it is only this particular aspect that I am interested in.

Any help would be appreciated. Thank you.

  • 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-06-05T06:54:11+00:00Added an answer on June 5, 2026 at 6:54 am

    There isn’t a simple way. CKEditor and the like do it by adding lots of custom event handling. I would suggest looking at their source code for inspiration.

    There is a specification for HTML Editing that has reached a reasonable level of completion but as far as I can tell there has been little effort so far by the browser developers to implement it.

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

Sidebar

Related Questions

I have been working on a project that dynamically creates a javascript file using
I have been working on on an AJAX chat application using php, mysql. It's
I have been working on a BlackBerry application that consumes web services from ColdFusion
I do html/css by trade, and I have been working on and off django
I have been working on a jquery plugin that uses a HTML5 audio player
I have been working with rails3 , here the view.html.erb form have one login
I am having problems with getting a HTML editor working. We are using contentEditable
I have been working with web workers in HTML 5 and am looking for
I have been working on a mediaplayer with playlist using flowplayer in combination with
I have been working on this tidy-up-messy-html tags with DOM, but now I realise

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.