Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bringing features from QTextMarkdownWriter #181

Closed
nuttyartist opened this issue Apr 5, 2023 · 9 comments
Closed

Bringing features from QTextMarkdownWriter #181

nuttyartist opened this issue Apr 5, 2023 · 9 comments
Labels

Comments

@nuttyartist
Copy link

Hey,

I've been using the QTextEdit example that comes with Qt and saw that it supports lists withe nice rendering and handling of checkboxes and other items.

test

Do you think we can bring it into QMarkdownTextEdit?

Here's the example:

https://doc.qt.io/qt-6/qtwidgets-richtext-textedit-example.html

@pbek pbek added the question label Apr 6, 2023
@pbek
Copy link
Owner

pbek commented Apr 6, 2023

QTextEdit is a Rich Text Editor that uses HTML as "base". QMarkdownTextEdit doesn't do HTML, it does Plain Text (with QPlainTextEdit as basis).

Do you think we can bring it into QMarkdownTextEdit?

...so the simple answer is: no 😁

@pbek
Copy link
Owner

pbek commented Apr 6, 2023

But what was it you are trying to achieve?

@nuttyartist
Copy link
Author

But what was it you are trying to achieve?

Well, I mainly want to add rendered checkboxes and bullet lists.

But I also wish to support adding more active, custom widgets into QTextEdit (although that is less of a priority). See: nuttyartist/notes#560

@pbek
Copy link
Owner

pbek commented Apr 8, 2023

Hehe, please keep me posted about your progress. 😁

@nuttyartist
Copy link
Author

nuttyartist commented Nov 7, 2023

Hey there. While I didn't end up adding custom widgets to QTextEdit, I built my own block editor with the model in C++ and the view in QML. The underlying data structure is just plaintext. Here's the progress so far (near the end I show QTextMarkdown with the same underlying plaintext):

Screen.Recording.2023-11-07.at.11.32.13.AM.mov

@pbek
Copy link
Owner

pbek commented Nov 7, 2023

Wow, nice! Is there also a view where it shows the plain-text? Are you planing on implementing some syntax highlighting for such a plain-text view if there is one?

@nuttyartist
Copy link
Author

Is there also a view where it shows the plain-text?

Yes, I just implemented one at this very moment. I'm using QMarkdownTextEdit with the QML exposed by @tim-gromeyer.

@tim-gromeyer
Copy link
Contributor

Hey there. While I didn't end up adding custom widgets to QTextEdit, I built my own block editor with the model in C++ and the view in QML. The underlying data structure is just plaintext. Here's the progress so far (near the end I show QTextMarkdown with the same underlying plaintext):

Screen.Recording.2023-11-07.at.11.32.13.AM.mov

This looks really neat!!

@pbek
Copy link
Owner

pbek commented Nov 7, 2023

Is there also a view where it shows the plain-text?

Yes, I just implemented one at this very moment. I'm using QMarkdownTextEdit with the QML exposed by @tim-gromeyer.

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants