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

Markdown preview for Notes #1057

Open
kainjow opened this issue Oct 10, 2017 · 25 comments
Open

Markdown preview for Notes #1057

kainjow opened this issue Oct 10, 2017 · 25 comments
Assignees
Milestone

Comments

@kainjow
Copy link

kainjow commented Oct 10, 2017

It'd be great to have support for previewing Markdown in the Notes section for added formatting. One could possibly have a UI similar to GitHub where you have "Write" and "Preview" tabs to toggle between. cmark could be used as the Markdown interpreter, and QtWebEngine could be used as the previewer (or use native Windows and macOS web controls wrapped in Qt).

@OLLI-S
Copy link

OLLI-S commented Jan 11, 2020

In KeePass I am able to add formatting in the notes with HTML Tags like <b> or <u>.
Here an example from KeePass (when I edit the entry):

image

In the "Entry View" of KeePass (that is shown below the list of password) this formatting is displayed correctly:

image

In KeePassXC the formatting is missing:

image

So for former KeePass users (that switched from KeePass to KeePassXC) it would be nice if the HTML formatting is displayed correctly.
If you decide to use markdown (what is more modern) I have no problems adjusting my password entries (105 entries use <b> but I would adjust this manually).

@droidmonkey
Copy link
Member

droidmonkey commented Jan 11, 2020

Qt 5.14 introduced native markdown support in html document fields.

https://wiki.qt.io/New_Features_in_Qt_5.14

Qt Widgets

QTextEdit and QTextBrowser now support Markdown format (CommonMark and GitHub dialects) as an alternative to HTML.

Includes the GitHub checklist extension, such that you can click to toggle checkboxes if the widget is editable.

QTextBrowser::setSource() detects Markdown based on the file extension.

@OLLI-S
Copy link

OLLI-S commented Jan 11, 2020

Thank you for planning this in 2.6.0 ;-)

@gwisp2
Copy link

gwisp2 commented Jan 21, 2020

Hi!

I decided to contribute to open source and solve this issue.
Current work can be seen in my fork.
Qt supports documents with both Markdown and HTML used together.

However there are several pitfalls.

  1. Line breaks work differently in HTML/Markdown and plain text, therefore multiline plaintext notes will break.
    One way to solve that is to replace plaintext line breaks with HTML/Markdown line breaks when displaying notes, but that makes markup a bit different from pure HTML/Markdown. In such way it is done in KeePass.
  2. Markdown support in Qt 5.14 is buggy (https://bugreports.qt.io/browse/QTBUG-81060). We need to wait until Qt 5.14.1 is released.

@OLLI-S
Copy link

OLLI-S commented Jan 31, 2020

Sorry if I ask this stupid question:
Will we have HTML (#4228) or Markdown (#1057) syntax support in the notes?

@droidmonkey
Copy link
Member

We will have both once Qt fixes their bugs. Markdown gets converted to HTML and you can add your own HTML inline with markdown.

@OLLI-S
Copy link

OLLI-S commented Jan 31, 2020

Cool, so I don't have to change my existing HTML tags in the comments.....

@droidmonkey droidmonkey modified the milestones: v2.6.0, v2.7.0 May 30, 2020
@networkException
Copy link

In this context, would it be a possible addition to allow referencing of entries / attributes using some kind of url?

<a href="keepass://group/to/entry/attribute:line">a reference to my other entry</a>

@droidmonkey
Copy link
Member

droidmonkey commented Aug 31, 2020

Possible yes, that would be handled by an internal url handler. Good idea!

@OLLI-S
Copy link

OLLI-S commented Sep 1, 2020

In this context, would it be a possible addition to allow referencing of entries / attributes using some kind of url?

<a href="keepass://group/to/entry/attribute:line">a reference to my other entry</a>

This would be a nice feature....

@networkException
Copy link

It's been floating in my head for a while, good to hear positive response! Should I make a separate issue?

@droidmonkey
Copy link
Member

Yes please

@OLLI-S
Copy link

OLLI-S commented Sep 1, 2020

@networkException And please link the new issue here, so I can subscribe it.
Thank you very much!

@networkException
Copy link

Alright I made a feature request with some examples how the sceme could look like #5369

@Anubis-105

This comment has been minimized.

@keepassxreboot keepassxreboot temporarily blocked Anubis-105 Mar 29, 2022
@vphantom
Copy link

vphantom commented Aug 20, 2022

Just curious, did Qt 5.14.1 implement the fixes we were looking for? I see the milestone's been removed from this issue last year so I suspect even the latest Qt might still not be usable. I just want to figure out if this feature is imminent or still stalled indefinitely by Qt.

@droidmonkey
Copy link
Member

They are implemented but we were waiting for most distros to get to at least 5.14. I'll mark this for 2.8.0 although my testing with it... for whatever reason clicking links still doesn't work....

@droidmonkey droidmonkey added this to the v2.8.0 milestone Aug 20, 2022
@droidmonkey droidmonkey self-assigned this Aug 20, 2022
@vphantom
Copy link

I see. I'm using your AppImage build to get your latest version these days. According to the debug info, it has Qt 5.15.2. I don't suppose you could easily enable this in the AppImage build while keeping it pending a bit longer in the binary builds then?

@DarkPark
Copy link

v2.7.4 and still no html or markdown support in Notes

@vphantom
Copy link

@DarkPark Look a few lines up: it's currently planned for v2.8.0.

@AaronKnowls
Copy link

It's great news that Markdown is going to be implemented in 2.8.0!
I'm so so looking forward to this, thank you!!!!

@ingenuity2k
Copy link

Just wanted to ask if this is still planned to be included in 2.8.0?
As I didn't see it mentioned on the Kanban board.

@droidmonkey
Copy link
Member

It'll be included when we move to qt6, so yes

@DarkPark
Copy link

@droidmonkey
Are there any estimates? Even very approximate would be interesting to know )

@arigit
Copy link

arigit commented Oct 3, 2024

Chiming in to say having this would be great, and to pair this with the request to have a simple search function that operates within the Note field of an open entry, #11314

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

Successfully merging a pull request may close this issue.