Copy as HTML

Hopefully this is an easy one.

In the latest windows version, copy as html and copy as basic html do not create a blank line as it appears in the binder. Could you add a
tag inside and at the end of your

tag in the HTML code that’s pasted?

For example, this is how it looks in Scrivener:

[code]I want to hop on the bus.

I just missed my bus.[/code]

When I copy as html, the resulting code is this:

<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:36px; font-family:'Times New Roman'; font-size:12pt;"></p>

Which displays in a browser like this:

I want to hop on the bus. I just missed my bus.

Could you add the BR tag like in the box below:

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:36px;"><span style=" font-family:'Courier New'; font-size:12pt;">
</span></p>

So it displays like this?

[code]I want to hop on the bus.

I just missed my bus.[/code]

Thanks for your time, Chris

Actually that would not be good and proper usage of the HTML specification. The br element is intended to be used to break a line within a paragraph block, and so is mostly analogous to the line feed or break, which in Scrivener can inserted with Edit/Insert/Line Break. With invisible characters turned on, you will see that these produce a different symbol than a paragraph break. It is not intended to space things apart artificially, just as hitting the enter key repeatedly in a word processor to space one block out from another is not considered to be good usage. The spacing should be specified with formatting rules.

Spacing between paragraphs in HTML should be accomplished with CSS styling, much in the same way that they are done in a word processor, by adding a buffer zone to the formatting in the paragraph itself, as can be done in the line spacing drop-down in the Format bar, within the “More…” section.

If your paragraphs are spaced apart with a visible line using paragraph spacing in Scrivener, then when you copy as HTML it will translate that into CSS (margin-bottom or margin-top, depending on where you put the spacing in Scrivener), creating a similar appearance in a browser to your editor.

You could use line breaks, to be clear, that just know that will reduce the flexibility of the output later on, which would be important if the text is meant to be slotted into a blog layout or something. Though, granted, our “Basic HTML” right now appears to be identical to the styled HTML, and stripping that back to something easily externally styled would be difficult. I’ll make sure that is on the list.

I will throw out here too though that currently the styling for blank paragraphs in the Copy as HTML options smashes them flat, where it should specify the height, so that is on the list already. You can add a min-height to the attributes to get that in.

Sounds good to me MimeticMouton. I see the BR when I compile to a web page (.html) so that’s why I thought of putting it here too.

I also agree that CSS is the better way to go to handle this issue and glad it’s on the list.

Thanks, Chris

I want to apologize too, I know better than to tell someone how to code their program. A little over zealous I guess… won’t happen again. :smiley: