[MAGNOLIA-3467] Replace codepress with codemirror as syntax highlighter in DialogEditCode Created: 15/Dec/10  Updated: 13/Dec/11  Resolved: 27/Dec/10

Status: Closed
Project: Magnolia
Component/s: gui
Affects Version/s: 4.2
Fix Version/s: 4.4.2, 4.5

Type: Improvement Priority: Major
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLGROOVY-35 Running a new, not yet saved script w... Closed
supersession
supersedes MAGNOLIA-2940 Fix codepress support on safari and c... Closed
supersedes MAGNOLIA-2941 Fix codepress support on opera Closed
supersedes MAGNOLIA-2963 Create nice syntax highlighter for st... Closed
supersedes MAGNOLIA-3166 Nice Editor counts line only to value... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Already used codemirror (http://codemirror.net) for the groovy scheduler module and it works pretty well. Contrary to codepress, it is an active and decently documented project and supports webkit browsers too.



 Comments   
Comment by Federico Grilli [ 15/Dec/10 ]

An almost working patch. Missing are inline style for editor lines and, of course, the relevant js and css files from codemirror. One noteworthy problem is that mixed highlighter for css, js and html is only triggered by the explicit presence in code of tags such <style> or <script> which is not the case, for instance, for the stk resources.

Comment by Magnolia International [ 24/Dec/10 ]

Cool !
I suggest we close MAGNOLIA-2940 and MAGNOLIA-2941 as obsolete, then !

Do we have a solution for the problem you mention for stk resources ?

Comment by Federico Grilli [ 24/Dec/10 ]

Merci! The stk resources are no longer a problem as the control will try to guess the syntax highlighter more appropriate to a certain resource by looking at its extension or its mgnl:template metadata property. Only if nothing is found, it falls back to the generic HTMLMixedParser which requires some kind of tags (either html or script or style) to trigger syntax coloring.

Generated at Mon Feb 12 03:46:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.