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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:22:52+00:00 2026-06-05T07:22:52+00:00

Firefox breaks new lines with <br> , Chrome and Safari are breaking with <div>…</div>

  • 0

Firefox breaks new lines with <br>, Chrome and Safari are breaking with <div>...</div> and Internet Explorer and Opera are using paragraphs <p>...</p> for new lines.

I am looking for a method to force each browser to create only paragraphs, when breaking to a new line.

I know ckeditor supports this function, but how can i realize it simply in my custom editor?

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

    Try the execCommand “insertparagraph”, e.g. :

    document.execCommand('insertParagraph',false,'id for new p')
    

    Alternatively you could handle the keydown event, catch keycode 13 (without modifiers) and then do whatever you like.

    Corrected

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

Sidebar

Related Questions

On Internet Explorer, a contentEditable DIV creates a new paragraph ( <p></p> ) each
Firefox: http://example.com/about/#anchor -> http://www.example.com/about/#anchor Internet Explorer 6-8: http://example.com/about/#anchor -> http://www.example.com/about/ Why is the anchor
The following code works fine in chrome and Firefox, but breaks in IE 9.0
I have the following CSS code, works fine with Firefox, Chrome but breaks like
So loading up our new web application in Firefox and Chrome I had an
Firefox 3 came with a new allocator: jemalloc . I have heard at several
I have the following problem just in the Internet Explorer. The problem is: I
My float breaks on ONE person's Firefox (v.12) on a Windows machine (that I'm
I am using: FireFox 4.0 jquery 1.5.1 jquery UI 1.8.13 HTMLBox 4.0.3 My javascript
I'm using WebDriver and selenium-firefox-driver version 2.3.1. Now when option.setSelected(); deprecated, one must do

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.