Page MenuHomePhabricator

VisualEditor: Character inserter should re-use the code/config from WikiEditor somehow
Closed, DeclinedPublic

Description

Inserting symbols, accented characters, and characters from other writing systems is a common task in encyclopedia-building.

VisualEditor needs to provide this as much as WikiEditor does; preferably they should use the same configuration and avoid duplicating code or config if possible.


Version: unspecified
Severity: enhancement

Details

Reference
bz38029

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 12:46 AM
bzimport set Reference to bz38029.

Agree with stealing existing code if possible. :-)

This may be obvious but to use the existing character code would make this feature dependent on WikiEditor. Otherwise, reproduce the character configuration in a VisualEditor module. Another idea is to to pull the character configuration out of WikiEditor and place it in a more centralized place. Thoughts?

the character config can be found: WikiEditor/modules/jquery.wikiEditor.toolbar.config.js

Forking existing code feels icky, but depending on an otherwise-unrelated extension isn't a good way to go.

Possibly some of this could be core-ified?

weskaggs wrote:

I have a few comments; apologies if I misunderstand the issues or am commenting in the wrong place.

First, the ability to enter special characters should have higher priority. They are very frequently used -- long dashes the most frequently of all, but many others too.

Second, the WikiEditor toolbar is probably overkill. A better model may be the CharInsert gadget that can be enabled in the English Wikipedia preferences. The JS code for the gadget can be found at

http://en.wikipedia.org/wiki/MediaWiki:Gadget-charinsert.js

The gadget depends on a very simple extension called CharInsert, whose php code can be viewed at

https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FCharInsert/8fa1602e22324b73491004957f02d5309302505b/CharInsert.php

Of course none of this can be used without modification, but it may provide a model for a character insert interface that has been optimized for usability.

This seems coincidentally to have been the subject of two separate requests today in the VE feedback pages: many editors need access to accented characters, greek letters, em-dashes and other specialised symbols, etc. See http://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback#Quick_insert_panel and the section below it.

Another request for this today. It's regarded as one of the few key missing features by a significant content editor.

Re-wording this and making it depend on bug 50296 - I have doubts about this, however. Many choices about availability of characters, or about their prominence, aren't appropriate in both contexts ("~~~~" isn't something needed in VisualEditor, for example). Not sure whether this should instead be a WONTFIX in lieu of 50296, but leaving open for now.

  • Bug 58323 has been marked as a duplicate of this bug. ***

Re-visiting this, I'm not sure I agree with the premise any more.

Lots of the per-language localisations (and the per-wiki customisations) of the "edit tools" message have added useful characters for editors without the ability to insert them using their keyboard, but they all mix the semantic concepts of wikitext syntax fragments (e.g. "<nowiki>" or even "{{RLM}}") and accented characters; asking communities to de-merge these just so VisualEditor can re-use some of them seems impractical.

Consequently I'm going to mark this as a WONTFIX, but if you can think of a sane way to do this, please re-open. :-(