Commit Graph

10 Commits

Author SHA1 Message Date
Eike Ziller
c68b01c478 Markdown: Support bookmarks and jumping to search results
Redirect the currentLine/Column and gotoLine functions to the text
editor and ensure that it is visible for gotoLine.

Change-Id: I546e2cb1761363e3a75f9adeebcba195e312f00b
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-09 11:31:19 +00:00
Eike Ziller
5cb0a56296 Markdown: Delay update of preview
Delay the update: The implementation in Qt is currently very slow, and
while we don't have a fix, editing with immediate update is very
sluggish.

Also do not update the preview, if it isn't visible.

Change-Id: I35e10af232064b02a36a8be3758ea0bbc5b66f40
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-08 10:36:19 +00:00
Eike Ziller
302afcdfc7 Markdown: Fix focus handling
When the markdown editor is opened or switched to, the focus is set on
the editor widget. We don't want the focus on the splitter, but on
either the text editor or the preview, depending on what had focus
before.

Change-Id: Ib54899c6251f2c5362f95d990e7150b6fee0f1e1
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-05 12:05:42 +00:00
Eike Ziller
ec9680d42e Markdown: Add option for hiding preview
Make it possible to hide the preview, by having a toggle button for
"Show Preview" and "Show Editor", and ensure that at least one is always
on and they are in the order as the views themselves. Disable the "Swap
Views" button if only one is shown.

Change-Id: I0ec1e06c2a8ec94e34bf52eae45ba009fd8cd1b5
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-25 07:26:26 +00:00
David Schulz
8745813721 Editor: add option to switch markdown viewer panes
Task-number: QTCREATORBUG-27883
Change-Id: I18daa688ff7751f984a95132737cfcc219b92108
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-21 06:54:24 +00:00
Eike Ziller
71f9e536c5 Markdown: Fix that text editing actions were not available
Add the TextEditorActionHandler and point it to the text editor.

Change-Id: I2c84d6b0160c7402ea32d56ed4dbc72d512072a1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 08:31:06 +00:00
Eike Ziller
a353e9fde1 Markdown: Reuse Markdown highlighter from change log viewer
Change-Id: Ief1b0c135a34bfd5e9b5220e9fbf93f281d8e95a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 11:48:15 +00:00
Eike Ziller
9027758b89 Markdown: Fix keeping scroll position when text is edited
Change-Id: I1812f2835cc0e9bc23aeb1237363b82af1acc479
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-23 07:13:17 +00:00
Eike Ziller
c90423eb05 Markdown: Remove unneeded context
Change-Id: I5b574f33d335a1a52792aad4520e5abc16ec2645
Reviewed-by: hjk <hjk@qt.io>
2023-02-23 07:13:06 +00:00
hjk
dce7025969 MarkdownView: Merge into TextEditor
Make it a bit more compact, too.

Change-Id: I448164371c5a1d6969a292feba17caa2826f58c3
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 07:17:29 +00:00