Commit graph

23 commits

Author SHA1 Message Date
Kunal Mehta 573afa02a1 Add extension.json, stop using $dir
Bug: T87897
Change-Id: I43eaa3f2d96cba98ac6d317b7bff7ba40f16bc7f
2015-03-02 17:55:52 -08:00
Fomafix d3e3a9796e Use mediawiki.api.parse
Change-Id: I9106245c6c0ee98093155c8b9a8f92b270bde063
2014-10-10 13:31:02 +00:00
Derk-Jan Hartman 7bfd574cbe CodeEditor: Keep experimental Geshi editor working
Still experimental, not really functional, but this fixes it to at
least run again.

Change-Id: Ia71aa9421179654a063c706e0cbf3016a2fcc280
2014-08-28 19:41:19 +00:00
Derk-Jan Hartman 1373c915df CodeEditor: Add basic code completion and snippet support
Bug: 48828
Change-Id: If7d165fc849ca9687dd7d511b0d111b9969fb2a7
2014-05-06 22:55:16 +02:00
Derk-Jan Hartman 0c172d6359 Persistent disabling of CodeEditor
This makes it so that if you do not have WikiEditor enabled, you also
will not have CodeEditor enabled. In the feedback we have seen so far,
this seems to be desirable for those users (bug 55936).

Also people were not able with the cookie pref for the editor, because
it can easily expire. This introduces a hidden pref, controlled by the
enable/disable CodeEditor button, to preserve this value instead (bug
46779).

It also gives a more reliable way to detect if the editor is enabled or
disabled. mw.user.options.get( 'usebetatoolbar' ) and
mw.user.options.get( 'usecodeeditor' ) combined should be able to convey
this information to something like WikEd (bug 62250).

Bug: 46779
Bug: 62250
Bug: 55936
Change-Id: I4639f68c00a2b9183a6f89b5e00983c07a8592a2
2014-05-01 10:33:26 +02:00
jenkins-bot 0343d914c3 Merge "Add a status bar to the CodeEditor" 2014-04-22 17:37:11 +00:00
Derk-Jan Hartman 0759a6de4f Allow the CodeEditor in read only mode
Depends on: I6885d617e18562acf0331e8db5790b53b489dbc2
Bug: 45258
Change-Id: Ie69e9c33bc307ec34abb7dcf3f427cfbe407fde3
2014-04-16 23:54:01 +02:00
Derk-Jan Hartman 00905d1829 Add a status bar to the CodeEditor
- Show counts of errors/warnings/info annotations. This is useful
  because the annotations are in the gutter, so in big files it takes
  a lot of scrolling to look for errors
- Clicking the totals count skips you to the 'next' annotation
- If the current line contains an error, show the message of the error
  in the status bar.
- Show the current line:column number, the selection range and the
  editor mode.
- Degrades to a useful and readable but not pretty state in IE7

More complex version of: Ib9f08fcbc0365302756095b9027289736856fc73

Bug: 63294
Change-Id: Ided0804d5eb7864452287087dd1cf5a3dd8ff078
2014-04-14 09:46:55 +02:00
Derk-Jan Hartman 262bfde28e Ask for confirmation when saving document with errors
Bug: 63202
Change-Id: Ifbdf976f3c0f27da67d7cf034c040d4279d62217
2014-03-30 00:47:10 +01:00
Siebrand Mazeland 27249af1cc Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: Id2e1243b0d67c0e6e54e4a147adca6df5d8ee78e
2014-03-26 10:12:39 +01:00
MatmaRex d841459c2e Adjust after changes in core
I6a6c12a9, Id27555c6.

Change-Id: I2e93cfffd7b31b090c93f7911e1e45f2a6619371
2013-05-17 22:04:51 +02:00
Ori Livneh 4ae61874af (Bug 42561) Enable Ace's JSON mode
MZMcBride suggested CodeEditor should be deployed to Meta, citing the
need for a JSON-aware interface for editing articles in the new
Schema: namespace, which are JSON-encoded. The bundled distribution of
ACE supports JSON, but the extension does not include it as one of the
file formats it supports.

Change-Id: Ice63dece67c732b76c23abc617782332435427cf
2012-12-01 01:09:55 -08:00
Tim Starling 1787861005 Allow core functionality of CodeEditor to be disabled.
Scribunto requires that the CodeEditor extension be installed, but I
haven't reviewed CodeEditor for its primary use case, i.e. CSS and
JS. The automatic brace close feature in JS mode might be annoying for
some. I'm ready to deploy Scribunto but the CodeEditor core
functionality will need to be deployed separately.

Change-Id: I0d423563cc13f9f8ec00590c8e16273d10f1dbce
2012-08-14 15:04:20 +10:00
Tim Starling 4bb8a4c984 Updated Ace
Updated Ace to the latest version of my fork on Github, i.e.
approximately 0.2.0 plus some improvements to the Lua indenting module.
I have submitted a pull request, so hopefully the next update will be
from upstream.

The suffixed file names (*-uncompressed, *-noconflict) have disappeared
from upstream, replaced by conditional compilation in separate build
directories. There's not much point in maintaining two unused copies of
the entire source tree, so I deleted them. To avoid migration issues, I
re-added symlinks in place of the suffixed files which were previously
referenced from MediaWiki.

Change-Id: Ic9d2450528769539dfea59bdde7620dbec903604
2012-07-09 02:13:50 +00:00
Tim Starling c41ec784f9 Depend on ext.wikiEditor.toolbar
Depend on ext.wikiEditor.toolbar instead of just ext.wikiEditor since
both are needed, and under certain circumstances the module would try to
initialise before the toolbar component was loaded.

Change-Id: Ie6a725513399815670ff0d24fa394c0b3b3a2a7e
2012-07-03 13:19:43 +10:00
vvv 0ac1a47dbb * Update the list of the languages
* Make the language to be used determined on server side
* Allow extension to enable code editor for certain pages
2012-02-06 21:59:13 +00:00
Brion Vibber 21be1db9cf add jquery.ui.resizable to explicit deps for CodeEditor 2012-01-19 00:17:14 +00:00
Brion Vibber 17f2f4cbaf Update a butt-ton of extension about URLs to point to https://www.mediawiki.org/ 2011-12-13 23:49:33 +00:00
Brion Vibber bf67581924 CodeEditor ext: Add an experimental demo (off by default) mode to edit SyntaxHighlight_GeSHi sections inline using Ace editor
Not ready for prime-time. :) Doesn't actually save pages (just updates the live view), and seems to have problems when invoked multiple times.
Not all GeSHi languages are supported.

Colors of course are different.

Set $wgCodeEditorGeshiIntegration = true to enable; adds a 'section edit link' on source bits.
2011-08-04 22:33:59 +00:00
Brion Vibber 81ba498314 CodeEditor ext: basic ability to toggle the syntax-highlighting editor on/off.
When off, we restore the regular textarea and its behavior.
State is saved as a cookie, like other WikiEditor settings.
2011-06-16 22:30:01 +00:00
Brion Vibber 18af202a72 Partway through integrating CodeEditor more closely with WikiEditor. Special character insertions now work! Bold, link etc will insert their sample text, which is less useful but hey. 2011-06-10 01:11:18 +00:00
Brion Vibber e3f5ab3f2e Update CodeEditor extension to load Ace editor via RL instead of manually 2011-06-09 22:17:00 +00:00
Brion Vibber ec233e4297 Add stub extension version of CodeEditor embedding Ace (ace.ajax.org) for editing JS and CSS pages.
Simply using the existing gadget version modified to load Ace from the extension directory for now, will integrate better into WikiEditor and use ResourceLoader to load Ace itself in upcoming commits.
2011-06-09 21:50:45 +00:00