Git Product home page Git Product logo

Comments (6)

hassankhan avatar hassankhan commented on June 22, 2024

I think this example is related, the following lines:

Test line 1

Test line 2

Become:

<p>Test line 1</p><p><br></p><p>Test line 2</p>

from scribe.

OliverJAsh avatar OliverJAsh commented on June 22, 2024

@hassankhan Can you elaborate? I don’t see this happening when I paste (from a plain text editor).

from scribe.

hassankhan avatar hassankhan commented on June 22, 2024

I typed it in (don't know if that makes a difference?) on the demo page and that was the generated markup.

Shouldn't the correct markup be:

<p>Test line 1</p><br><p>Test line 2</p>

from scribe.

OliverJAsh avatar OliverJAsh commented on June 22, 2024

@hassankhan The sample text you included has two new line characters in it — by this I’m assuming you’re sending the ENTER key twice. If this is the case, your output HTML is correct. We create a new paragraph (P element) each time the ENTER key is sent. The correct HTML in this case:

<p>Test line 1</p><p><br></p><p>Test line 2</p>

Alternatively you can send the SHIFT+ENTER keys which will create a BR element instead of a P.

<p>Test line 1<br>Test line 2</p>

Does this help?

from scribe.

hassankhan avatar hassankhan commented on June 22, 2024

Ahh right, thanks, that was exactly what I was looking for. Sorry to clog up the issue, I read the title and thought it was related.

from scribe.

icodeforyou avatar icodeforyou commented on June 22, 2024

Is there any progress update on this issue? We are finding the bogus <br> very annoying in our project.

if (! this.allowsBlockElements()) {
    // Set bogus BR element for Firefox — see explanation in BR mode files.
    content = content + '<br>';
}

from scribe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.