View Single Post
Old 12-10-2024, 12:55 PM   #1
jwes
Connoisseur
jwes began at the beginning.
 
Posts: 77
Karma: 10
Join Date: Jul 2023
Device: none
Syncing codeview and preview windows

I am trying to write a plugin to fix typos found on an e-reader. I am using PySide6 and have a QPlainTextEdit widget for the source and a QWebEngineView widget for a preview. The input is a list of phrases around the typo from the e-reader. The first problem is finding the phrase in the html source (there may be invisible html). My thought is using bs4.get_text() but then I have to find the equivalent source location. Any suggestions?

The second problem is syncing the preview window to the code window. I tried reading the Sigil source, but it is not clear to me how it works. Can someone explain it?
jwes is offline   Reply With Quote