Live data from Hacker News

Show HN: A WYSIWYG word processor in Python

codeberg.org

21–30 of 41 posts

Re: Show HN: A WYSIWYG word processor in Python

#21
post #19

Earlier quoted context omitted.

It’s also not nice to write longer text in monospace. Or to have long URLs interrupt the text just because you want a hyperlink on some word. Or having to lay out tables by hand like ASCII art. Seeing *this* isn’t the same as seeing this . And you need custom editor software anyway to have affordances like TOC navigation.

> long URLs interrupt the text just because you want a hyperlink This annoyed me until I realized pandoc supports separating [the link text] from the link location. [the link text]: "`title` parameter of the tag, if converted to HTML"

Yep, but (a) that isn’t portable Markdown, (b) your editor probably doesn’t support opening the link from the link text in that case, and (c) whenever you want to modify the link text you have to modify all occurrences. A word processor can handle that automatically for you. It can also offer completion (like tab completion) for references that you use repeatedly. It can show as a tooltip what a given link text links to. Conveniences like that is what computers are for, let’s not relapse to the stone age here.

Re: Show HN: A WYSIWYG word processor in Python

#23

at this point, a WYSIWYG just seems like a huge step backwards from just using markdown. I love having access to my files in a standard text format this is super easy to parse, and not being locked into whatever weird format that WYSIWYG decides to store it in. I still don't understand why people still use ~~Microsoft Word~~Copilot document writer , I think they have gotten into some weird mindset that their document…

My prolific Typst use, along with quickly improving side-by-side editors like Typesetter, are rapidly diminishing (in my eyes) the reasons for WYSIWYG to be. Sure, normies need it, yadda yadda. Is it worth the staggering cost? The file format and GUI complexity?

Re: Show HN: A WYSIWYG word processor in Python

#24
post #3

On MacOS, I'm seeing `ModuleNotFoundError: No module named 'miniword.core.utils'` whether I run `python3 -m miniword` from src/miniword/ or from src/miniword/miniword/.

My mistake. Now it works (on linux).

Thanks, and I got the main window open now, but I'm getting a second error that doesn't look OS related. `Plugin error (txtfilter.py): No module named 'miniword.importexport'`

Re: Show HN: A WYSIWYG word processor in Python

#25
> - Real WYSIWYG editing (no HTML layer, no embedded browser) with styles, images and tables. > - Clean, simple file format (human-readable, diff-friendly, git-friendly, AI-friendly)

Very nice! Unfortunately, the UI menus seem to be broken when using a dark-mode GTK theme (e.g. Adwaita Dark).

Re: Show HN: A WYSIWYG word processor in Python

#27

One feature missing from almost every mainstream word processor: REVEAL CODES! ( https://kb.corel.com/en/127364 ) This is a famous "killer" feature from WordPerfect: the ability to view and edit the low-level formatting for a document. It's invaluable for fixing weird bugs. However, it works only because WP uses the "text-stream" paradigm, where a document comprises a linear stream of text with formatting codes (Bold…

I don't see why the "nested containers" model would prevent this feature to be replicated, it's just a tree of nodes. Not edit-this-as-plain-text-simple but almost.

Re: Show HN: A WYSIWYG word processor in Python

#28
post #19

Earlier quoted context omitted.

Markdown without formatting isn't usually the nicest to read imo. I actually appreciate a well laid out and formatted document myself. Also wysiwyg doesn't mean it can't be back and forwards compatible with markdown, it might just mean that it's a markdown editor gui with a preview.

It’s also not nice to write longer text in monospace. Or to have long URLs interrupt the text just because you want a hyperlink on some word. Or having to lay out tables by hand like ASCII art. Seeing *this* isn’t the same as seeing this . And you need custom editor software anyway to have affordances like TOC navigation.

Tables by hand, I hate. But I don't quite agree with the first sentiment. For longform prose, it isn't that unusual for people to work with all editing marks visible. Writing novels, I absolutely write using monospace, because it allows you to more concisely control large amounts of formatting easily.

Re: Show HN: A WYSIWYG word processor in Python

#29

at this point, a WYSIWYG just seems like a huge step backwards from just using markdown. I love having access to my files in a standard text format this is super easy to parse, and not being locked into whatever weird format that WYSIWYG decides to store it in. I still don't understand why people still use ~~Microsoft Word~~Copilot document writer , I think they have gotten into some weird mindset that their document…

> at this point, a WYSIWYG just seems like a huge step backwards from just using markdown.

Not for a layperson. There’s a reason WYSIWYG word processors completely obliterated the previous “needs an explicit preview mode” generation ones.

Re: Show HN: A WYSIWYG word processor in Python

#30

[dead]

Cursor positioning is simple. The layout is a tree of nested box. Each box knows the x,y-position of its children. There is also an index dimension which numbers possible cursor positions. A box lies from i1 to i2 in index space. You just iterate over all boxes holding cursor position i to find the cursor coordinate x,y. Selection is simple as well. It is defined by a start index s1 and end index s2. Some objects have a special selection, e.g. tables where you select a rectangular range of table cells.
Post reply on HN