Open videosmith opened 10 months ago
The issue is likely caused by the fact that we're parsing HTML. In this language, soft carriage returns are dealt with in the same way as regular spaces and there's a special DOM object for soft carriage returns, which is <br>
. If we do a find and replace on the source, where the soft carriage returns are replaced with
, we should be able to get the desired behavior.
IDK if those are actually copied into the HTML or replaced with regular line endings, but if that's the case, which I think it's likely, this fix would work.
So I should adjust the source before copy/paste into QPrompt?
Shouldn't be needed. I tried replicating the issue with using the latest version of QPrompt and LibreOffice 7.3.7.2, but I couldn't replicate it. This version of LibreOffice is correctly adding <br/>
to the code, so no changes in QPrompt should be needed.
Which version of LibreOffice are you using?
7.4.4.2 on intel Debian 12.17.3.7.2 on Ubuntu 22.04 ARM It occurs in both systems (Qprompt 1.2 R6) Your attempts to copy /aste my attached files parsed correctly?
Your attempts to copy/paste my attached files parsed correctly?
The answer to this question would depend on how we define correctly. One of QPrompt's features is that it ignores settings like paragraph and line height, which can mess up the text being prompted when it is copied from places such as a random site on the Internet. The decision to do it this way came from the fact that a local station used copy paste from a web browser into Imaginary Teleprompter, and it would mess up the prompter in many ways.
When the HTML is processed in QPrompt, formatting is stripped so that each paragraph's lines occupy, more or less, the same height (subject to the font being used).
I'd wager this stems from a setting in Libre Office akin to Word's "add space at the end of paragraph" option. It's a hand-holding feature to reduce keystrokes so you don't have to hit Enter twice to get a gap between grafs.
As seen in the first screenshot's "heading", both the pilcrow and carriage return symbols indicate that text should start on the next line down. In the "body," the pilcrows are padded to put space between the paragraphs. There's nothing in the document to make the wanted space outside of Libre Office's own style interpretation.
What @owangutang has written goes hand in hand with what I had written before. QPrompt disregards most of the styling that comes from other editors and uses its own to guarantee line spacing is consistent. This means that while soft and hard breaks may be present, these will look the same because that's how it's stated by QPrompt's own CSS style.
Hi there, Hi Qpromt,
By a Text I made, I have a bit of a mistake version. For Example, the beginning Headline: Geschichte & Schätze it's without a Return in the Original File, below. In Qpromt I have "Geschichte "Return" & Schätze" for Example and middle of Text possible I have a Return, but the Original File doesn't have.
In an HTML File, it's works most time, only RTF I found this.
Second, LibreOffice not found, sorry I will open another case about.
Kind regards Chris
@ChrigiGee Could you provide copies of the original file in its original format and of the file produced by QPrompt? I need to look into the file's contents to figure out what's going on...
Also, what version of TextMaker / SoftMaker Office are you using?
Hi Javier,
I used SoftMaker NX, TextMaker NX Universal (rev S1214.0518) 64bit
Of course, I can send here an RTF I used. Sorry I not like to upload zip Files, but the System not accepted RTF Files.
I think it's for other Users if he works with SoftMaker in the German Part of Europe, fascinating too.
Kind regards Chris
Thank you. SoftMaker NX appears to have a free trial option, I'll get the free trial when I have the time to attend and potentially fix this issue.
I apologize for the inconvenience because this will likely take a few months. Our pipeline for making new releases is broken, and I'm building a new one while porting the software to use newer versions of the libraries it was built on.
Bug Description I do not believe this is a fault in your program, however if you have a workaround it would be helpful. Some .docx files I receive have 'soft' carriage returns to delineate paragraphs. These are ignored when pasted in to other applications like Qprompt.
Steps to Reproduce
Expected behavior Apps should recognize and honor soft carriage returns
Screenshots (optional)
![screen03](https://github.com/Cuperino/QPrompt/assets/88691671/be0b47c1-d2d9-44db-83c7-5687ecd79c35)
test.zip
Device information