Commit graph

39 commits

Author SHA1 Message Date
jenkins-bot 220a68a9f9 Merge "textSelection: Replace encapsulateSelection with replaceSelection" 2018-02-13 17:25:25 +00:00
Kunal Mehta f7e5949334 Move classes into includes/
Depends-On: Idbcb76f54eb57b0a56b46188526858038d698627
Change-Id: I2858e848137336aeabb18513f073bfccf64c0a6b
2018-02-10 09:27:42 +00:00
Ed Sanders 3e0d9773d4 textSelection: Replace encapsulateSelection with replaceSelection
encapsulateSelection is now defined in terms of other methods,
so we don't need to duplicate it here.

Follows on from T185917.

Change-Id: I1f99b3140ed363658ed2724a58c8b34ef20769fa
2018-02-09 10:31:47 +00:00
Kunal Mehta e3f0df1cfc Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: Iddfe5ea4519690d2b14f6a363d87c648a0050e25
2018-01-04 02:55:40 -08:00
jenkins-bot d25705d804 Merge "Disable WebkitTextFillColor in Firefox+OSX" 2017-12-12 19:44:09 +00:00
Fomafix 63720b9c20 Rename CodeMirror.hooks.php to CodeMirrorHooks.php
This avoids the MediaWiki.Files.ClassMatchesFilename.NotMatch exception
in .phpcs.xml.

Change-Id: I599016f4754f24b16394bdf1ba45bb20862fcd2a
2017-12-02 20:27:01 +01:00
Reedy 5be0a26626 Set required MW to 1.25.0 in extension.json
Change-Id: I7e76cfca9a476be7dd766d14231d0a2ee67cb942
2017-12-01 03:23:49 +00:00
Ed Sanders 80241fb717 Disable WebkitTextFillColor in Firefox+OSX
Avoids opaque selection covering text.

Bug: T175223
Change-Id: Iede96501d4a03ccd80488b4661c18647eb9118e1
2017-11-30 18:05:52 +00:00
Niharika Kohli a0062e3100 Make textbox height flexible with CodeMirror
Bug: T170906
Bug: T176449 (hopefully)
Change-Id: Ic0ac663c413db5c29ae786d3c17f7396ad620226
2017-11-06 17:20:51 -08:00
Sam Wilson b4b9da7e51 Join the popup label into one message
The popup label was being styled as two words from two different
i18n messages, each a different colour. This combines them into
one, moves the identifing class name up to the outer span, and
colours both words blue (the outer braces are left black).

Bug: T174219
Change-Id: Id1166f48ae4b3b8daff29be56dd92ef330dd9cef
2017-09-11 10:23:22 +08:00
jenkins-bot 13a4780879 Merge "Remove $wgCodeMirrorEnableFrontend" 2017-08-25 18:31:20 +00:00
Florian Schmidt 00a0baf8b6 Remove $wgCodeMirrorEnableFrontend
Not needed/used anymore.

Bug: T172470
Change-Id: I9aa03c97bd775248f3a2cfb316df77eb7ef86457
2017-08-24 17:55:08 +02:00
Fomafix 93844520cc Add dependency to module 'mediawiki.user'
ext.CodeMirror.js uses mw.user.isAnon from module 'mediawiki.user'.

Change-Id: If1a98914ad58e9ed004089a6c2ebf3295974712b
2017-08-24 11:12:33 +02:00
Ed Sanders 659e0963f1 Separate out CodeMirror config data and add to VE mode
Bug: T172958
Change-Id: I2d7969782ee9f02347f7aa0c7f0eebb2d592904d
2017-08-13 12:06:41 -04:00
jenkins-bot 0971aabc42 Merge "Move JS config vars from page HTML into RL module" 2017-08-04 12:54:08 +00:00
Max Semenik 0f6d8818be Move JS config vars from page HTML into RL module
Bug: T172458
Change-Id: I60bfab0028a21c3942508f5ad6377df9a285c7de
2017-08-04 13:37:54 +06:00
Max Semenik a749945897 ext.CodeMirror.loader is unused, remove
Change-Id: I2b51fb2e4e20fef088503567ba0cf818a1d2c857
2017-08-03 17:54:28 -07:00
Umherirrender 453335f16e Fix indent in json files
Change-Id: Id873facdf4d0aece5883f3ced79f7fb17aa6de8a
2017-07-18 20:14:34 +02:00
Max Semenik c6ccd44f95 Remove i18n shim
Change-Id: I187328ea888589aa33500dda25c73cff18261e07
2017-07-08 21:07:51 +00:00
Niharika29 55092521c3 Make sure popup appears for both classic and wikitext editors
Bug: T165003
Change-Id: I4b1c9498df7931643ea3c39d6d2afd9384e47de0
2017-07-04 00:15:56 +00:00
Niharika29 e3d24a9d32 Add missing dependency
Bug: T165003
Change-Id: I77669035aa425230fe254e776fdb9a5cdd4715c7
2017-06-30 19:35:17 +00:00
Niharika29 99e31d152f Show a popup for first time Codemirror users
Bug: T165003
Change-Id: I545a57bdb273ab6906711e2d65dc029293ecc02a
2017-06-29 00:20:14 +00:00
niharika29 48358c1f57 Add syntax highlight as a beta feature
Bug: T165543
Change-Id: If7eb2dc3f7c00a91e5ca39ae564f63efa07bbead
2017-06-20 05:07:53 +00:00
Ed Sanders de6b08919b Use consistent label for button across editors
Change-Id: I1a299522e95cdb4a6e5bdbdda1c65d4fcec22133
2017-05-08 16:54:10 +01:00
Ed Sanders 7b01a98ad0 VisualEditor source mode support
Long-term todo:
* Performance will be poor on large pages due
  to using a auto-height textarea which CodeMirror
  doesn't optimise.

Change-Id: I16598fcdbeee51e6fae88376ec81f1c8552b383d
2017-05-08 16:54:10 +01:00
Pavel Astakhov c9b4aa65fd Refactor the Integration with other extensions (v 4.0.0)
This patch makes initialization easier and cheaper.

Since only the PhpTags extension uses the CodeMirrorGetAdditionalResources
  hook it was removed. Instead, the CodeMirrorPluginModules and
  CodeMirrorTagModes properties are used in extension.json file.

This patch adds ext.CodeMirror.lib.mode.php module for the PhpTags
  extension (with dependences). In CodeMirror there are a lot of modes
  they will be registered on request (if they will be requered for
  extensions).

Examples of integration:
* Cite: I1bf156fa813af4d5f891619f692047bbdb8a1a86
* PhpTags: Ie339f0475e63885e603defaee2cdcccd6a95fafc

Bug: T163238
Change-Id: Idb7a1a5769a1047ef2f7cd25a7152f73a6613225
2017-05-04 21:20:21 +01:00
Pavel Astakhov b7bc84d783 Remove some outdated code
Since WikiEditor uses wikiEditor-toolbar-doneInitialSections event
  we don't need to add it to ResourceLoader dependencies.

Bug: T161475
Change-Id: I7c7c3ba495c0292d2df052145e7930c86fcb48f5
2017-04-18 14:07:51 +06:00
Kaldari fe11d52eaa Explicitly declare mediawiki.api.options module dependency
Change-Id: Ie1915e6c0d0671d7f3327d0ad80542ca967dab98
2017-03-26 22:26:49 -07:00
Ed Sanders 3980fa0af0 Cleanup and use SVG icons
Change-Id: Idcad8e2554c5e44155c88bd925186095e3aad930
2017-03-27 02:59:13 +00:00
Pavel Astakhov 7854e7c06b Update the CodeMirror library to 5.9 (v 3.4.0)
Change-Id: Ia36b0573809d632c0521477cea72268b5524efae
2015-12-14 11:28:57 +06:00
Pavel Astakhov 740cc73d1a Go to next field when TAB key is pressed (v 3.3.0)
Bug: T118180
Change-Id: Ic86736f0c2b657bd3b56c16f9243a4f123af6d5e
2015-11-18 14:34:08 +06:00
Pavel Astakhov 82f8acd450 Fix conflict with the CodeEditor extension (v 3.2.3)
CodeMirror will be not initialized if CodeEditor is used

Change-Id: I78ab2814beb0e40a878f6a02b7d3967c216afce6
2015-11-18 11:34:36 +06:00
Pavel Astakhov 3db709ef0c Skip setCodeEditorPreference for anon users (v 3.2.2)
Change-Id: If4f208b3edd73a100404f09f170fb3a060ce1c3c
2015-10-29 09:15:29 +06:00
Pavel Astakhov 991be29500 fix highlighting parameters inside a template transclusion (v 3.2.1)
Bug: T108450
Change-Id: Ic686fe6aa211988d8458037c275779f512d03563
2015-08-20 10:32:11 +06:00
Pavel Astakhov 9acce89672 fix bold and italic apostrophes (v 3.2)
Bug: T108455
Change-Id: Ie9e0d734004d062e4c347f7940eb34bdc231d026
2015-08-19 21:10:31 +06:00
Pavel Astakhov 66b518d8dd fix highlighting of external links, multiple apostrophes end link (3.1.14)
Change-Id: Ibbb4850edc04ed6b184fa59c51e1978d60cd1269
2015-08-14 13:22:47 +06:00
Pavel Astakhov 491f186e14 fix matching hr ---- (v 3.1.13)
Change-Id: I7ea6fa891d2c53da4ac9bd62319dad702a11b8d7
2015-08-14 12:03:41 +06:00
Pavel Astakhov e681dc6ce2 Add setContents to textSelection and JS hook for #wpTextbox1 (v 3.1.12)
Bug: T108711
Change-Id: I65f25108863339fdcfc55c030a1158c2cd789b91
2015-08-14 11:49:12 +06:00
Pavel Astakhov c6f14176ca Convert to ExtensionRegistration (v 3.1.11)
Remove group ext.CodeMirror, too. There is no need to load CodeMirror
in it's own request, it can be loaded with all other modules.

Change-Id: I16958866847b66c523e2edfe841ca20694ec7ccc
2015-08-11 13:12:51 +06:00