Commit graph

20 commits

Author SHA1 Message Date
Mark A. Hershberger db76c1b19a CodeEditor should fail if WikiEditor is not available
Instead of quietly failing, code should prompt the user to install
WikiEditor.

Bug: T67072
Change-Id: I5ce1d436fe1d79abfd2dda5ad7cdd09bbe1ca914
2017-02-08 16:44:04 +00:00
Reedy d20a9621fc Function docs for Hooks
Change-Id: Idc505e965a0823a9c846ff6dce9460ad101d02a8
2016-12-13 18:01:34 +00:00
Derk-Jan Hartman 07b24bb9f0 Remove inline CodeEditor for <syntaxhighlight>
This was an unfinished module to enable the CodeEditor to do inline
editing of <syntaxhighlight> blocks. It was never finished and I think
that with the VE and WE 2017 work, it likely will never be finished
either. For that reason, it is better to remove it altogether.

Change-Id: I83714188a53d2ca6bb7bf0dc6d0c89b7fb45a47a
2016-11-14 23:47:28 +01:00
Brian Wolff 7a95deea76 Supply model/format directly to hook
Most of the time people want to trigger on content model, or content
format. This allows triggering correctly even if you are viewing an
old revision with a different content model, or are using a content
format that is different than the default for the current model.

Also remove back compat code for pre 1.23
Change-Id: I9706eaae0983e2b7b99f83c9564ea04c5ec252ac
2016-07-23 01:41:21 +00:00
Kunal Mehta 1b35669437 build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: I1e080882b4dd1f990177ce2b8147cb4aa4e5c868
2016-05-09 16:37:08 -07:00
Paladox b6e9f6cca4 Add jshint and jscs to npm, Also add composer.json
Instead of running the jshint test through jenkins, Run it through npm
instead.

Also add composer.json for running php code sniffer and phplint instead of
running phplint through jenkins.

Also update grunt-jsonlint to 1.0.6

Change-Id: Icd9aa1b1c7213d056aa5294a804341053141b0bd
2015-11-29 12:03:16 +01:00
addshore 14c770e154 Remove use of deprecated wfRunHooks
Change-Id: I571d47326f4033f85c71b30533f3459d5ad93c8d
2015-08-06 18:53:00 +01:00
Fomafix bc526cbf20 Load module 'ext.wikiEditor.toolbar.styles'
This style module hides the old toolbar while loading and
avoids horizontal resize of the textarea with disabled syntax highlight.

Bug: T102738
Bug: T102739
Change-Id: I41f16f1a5034eeebf7b80a68ebded8a4442df8fa
2015-06-17 05:33:25 +00:00
Florianschmidtwelzow 64b286d04e Remove whitespace at the end of lines
Change-Id: Icccee7461ecff22cbc5076df9f3803b6c2e29f28
2014-10-29 18:23:00 +01:00
Kunal Mehta 6e59232eeb Use CodeEditor for JSON pages
Change-Id: I5395fa847944640bc9ae59f269bfe4e156885e5d
2014-10-07 12:57:03 -07: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
Chad Horohoe d9b9580e6f $wgTitle and $wgOut weren't needed here
EditPage::showForm::initial was wrong about its parameters.

Change-Id: I7f2194dee00090a0c4ff35684607384cfc6897a9
2014-02-05 11:21:16 -08:00
Derk-Jan Hartman f7b689d9f0 Use page ContentModel to choose editor language
Bug: 42593
Change-Id: I894afc3119719bfb3feff2677df12842bdf47ef8
2014-01-10 11:58:24 +01:00
Brad Jorsch ce1cfd6a0e Use CodeEditor for user css/js subpages
The test for $title->isCssJsSubpage() seems to have gotten lost in
the refactoring in r110794, so enabling CodeEditor for core only
affects the MediaWiki namespace. This restores that test, so user css/js
subpages also get CodeEditor when $wgCodeEditorEnableCore is true.

Change-Id: Id02825f922a1ed0aace7c9ffd940fe8d29bb5d79
2013-05-20 20:56:50 +00: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
vvv 96c24596bb Fix a very stupid copy-paste-caused typo. 2012-03-09 11:16:23 +00:00
vvv 26988117ca Remove some commented-out code commited by accident in r110794. 2012-02-06 22:00:31 +00: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 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 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