Ticket #10027 (closed defect (bug): invalid)
Code Syntax Highlighter not working in Google Chrome and Safari, disabled in Opera 10
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | JavaScript | Version: | 2.8 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description
The Code Syntax Highlighter in WordPress 2.8 does not highlight code in Google Chrome, it works fine with all other major browsers, attached is a screenshot of how it looks in Chrome. Google Chrome version is 3.0.182.3. Safari has the same problems
In addition to that the code editor is completely disabled in Opera 10.
Screenshots
Syntax highlighting not working in Chrome http://www.pict.com/view/724871/0/wp28highlighternotworkingchrome
Code Editor disabled in Opera http://www.pict.com/view/724870/0/opera10plugineditordisable
Change History
- Keywords needs-patch needs-testing added
- Priority changed from high to normal
- Version set to 2.8
Unfortunately nobody seems to be developing Codepress any more. There are some others we could try.
CodeMirror looks pretty nice.. and simplistic.. Still havn't gotten around to testing this.
- Keywords needs-testing removed
I mis-read this ticket.
The highlighter isn't disabled in Opera10, The text area, however does become disabled. Means that CodePress is just plain buggy with it i guess.
Look into replacing it with a currently-developed class for 2.9, What should we do for 2.8 though? Disable it for Opera10/chrome/safari? But Opera10 final (Its beta atm) might support it.. etc.
Perhaps we should add "Disable syntax highlighting" that would switch to the plain textarea (and remember the choice).
Perhaps we should add "Disable syntax highlighting" that would switch to the plain textarea (and remember the choice).
Something very similar to the TinyMCE switcher would be nice..
comment:8
keithdsouza — 3 years ago
What about Google Chrome and Safari, Webkit in general, will someone be looking into it???
Replying to dd32:
Something very similar to the TinyMCE switcher would be nice..
Not sure if we can make it "switch on the fly" like TinyMCE as CodePress seems to crash and js based switching would be unreliable. Will test some basic try{} catch(e){} calls to see if that is stable enough in all browsers.
comment:10
azaozz — 3 years ago
comment:11
azaozz — 3 years ago
- Owner set to azaozz
- Component changed from Formatting to JavaScript
- Milestone changed from 2.8 to 2.9
Can probably look for different code editor for 2.9.
Imo, we should dump these editors outright. they serve absolutely no purpose for WP's target audience (that is, casual users, as opposed to greasy bearded GNU'ers such as ourselves). Metrosexual Mac users might complain, but they can always be invited to get a copy of TextMate to do their stuff -- or install a plugin, that adds CodePress.
comment:13
dd32 — 3 years ago
Imo
You're not taking it far enough. I mean, Why not move all media management to a plugin.. i mean, we dont all use it.. what about pages? thats used by even less, oh then theres permalinks.. ah bugger it, make WP 10KB and move everything to plugins, including blogging.
..My point is, That WordPress has heaps of features that may only be used by a minority, 90% of the features developers implement, they'll never use themselves. Rather than adding things that We (As Developers) think the majority will use, We focus on the small things that make certain niches of people happy, whilst not affecting the majorities.
- Keywords dev-feedback removed
I sense some irony. For what it's worth, my own users have never seen the editor (because I disabled it), and only two have inquired about it since 2005...
comment:15
follow-up:
↓ 16
dd32 — 3 years ago
Yes but your users are a very very small very niche minority and do not count as general WordPress users.
comment:16
in reply to:
↑ 15
Denis-de-Bernardy — 3 years ago
comment:17
dd32 — 3 years ago
They're almost exclusively users with no coding skills
ie. Not the target of the editor.
WPMU users live very well without an editor.
Because generally, users of a WPMU blog are not entrusted to modify files, edits go via the server admin
comment:18
azaozz — 2 years ago
- Status changed from new to closed
- Resolution set to invalid
- Milestone 2.9 deleted
The syntax highlighter is not used since 2.8.1

AFAIK Opera 9 doesnt support the code highlighter (Or its buggy), I'm not sure if Opera 10 supports it, But I'll test later (I solely use it) and submit a patch for opera if its the case it works.