Feature #88162

Persistent search in CodeMirror for t3Editor

Added by Sven Juergens 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-04-17
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Hi,

I use the search within TypoScript templates in the backend very much, but in the context of CodeMirror in TYPO3 9.x the normal browser search works not anymore. Therefore I have to use the CodeMirror search (Ctrl-F / Cmd-F). It would be nice if the search dialog did not disappear again and again. CodeMirror itself has an option that requires only a keyboard shortcut. Here's an example from https://codemirror.net/demo/search.html with key: "Alt + F"
In order to use this, only the initialisation in typo3/sysext/t3editor/Resources/Public/JavaScript/T3editor.js needs to be adjusted in this way:

in the part "extraKeys"

 extraKeys: {
                "Ctrl-Alt-F": ...
                ...
}

add

 extraKeys: {
                "Alt-F": "findPersistent",
                "Ctrl-Alt-F": ...
                ...
}

would be great to have that in core :)

cmd-f--and--ctrl-f--on-mac.mp4 - Preview of Ctrl+f and Cmd+f on a mac (700 KB) Sven Juergens, 2019-04-17 13:37

88162_codemirror-overlaybug.gif View (114 KB) Josef Glatz, 2019-04-18 15:49

Associated revisions

Revision 67bce955 (diff)
Added by Andreas Fernandez 4 months ago

[BUGFIX] Make CodeMirror search persistent

Currently, when searching a term in CodeMirror (used in EXT:t3editor),
the search bar disappears when after the operation, which is super
annoying.

The configuration of CodeMirror is slightly changed to keep the
search bar always present until closed explicitly.

Resolves: #88162
Releases: master, 9.5
Change-Id: I8780d9b10816c1667c14b0a23f50428a5f081579
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60490
Tested-by: TYPO3com <>
Tested-by: Josef Glatz <>
Tested-by: Sven Juergens <>
Tested-by: Richard Haeser <>
Reviewed-by: Josef Glatz <>
Reviewed-by: Sven Juergens <>
Reviewed-by: Richard Haeser <>

Revision c84c91a4 (diff)
Added by Andreas Fernandez 4 months ago

[BUGFIX] Make CodeMirror search persistent

Currently, when searching a term in CodeMirror (used in EXT:t3editor),
the search bar disappears when after the operation, which is super
annoying.

The configuration of CodeMirror is slightly changed to keep the
search bar always present until closed explicitly.

Resolves: #88162
Releases: master, 9.5
Change-Id: I8780d9b10816c1667c14b0a23f50428a5f081579
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60519
Reviewed-by: Richard Haeser <>
Tested-by: TYPO3com <>
Tested-by: Richard Haeser <>

History

#1 Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60490

#3 Updated by Gerrit Code Review 4 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60490

#4 Updated by Josef Glatz 4 months ago

My notes on patch set 2

Nice improvement. However, as the search get's somehow grayed out when you press enter for search, the UI is broken if the first search result is found on the first line of the code editor. But have a look at the following gif – 1000x better than my english ;-)

#5 Updated by Gerrit Code Review 4 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60519

#6 Updated by Andreas Fernandez 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Gerrit Code Review 4 months ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60519

#8 Updated by Andreas Fernandez 4 months ago

  • Status changed from Under Review to Resolved

#9 Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF