Page MenuHomePhabricator

<charinsert> should replace highlited text
Open, LowPublic

Description

<charinsert> buttons should probably replace selected text with the inserted string, instead of inserting before it. Inserting before is B/C behavior to be compatible with the now removed insertTags method in MediaWiki core, which behaved that way because it was mainly meant to insert open/close tag pairs (where wrapping the selected text makes perfect sense). Other character insertion tools (in WikiEditor and VisualEditor) also replace selection so this would help with consistency.

(Inserting an open/close pair of tags/braces/etc, also supported by CharInsert, should keep wrapping the selection though.)

Details

Reference
bz9592

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:39 PM
bzimport set Reference to bz9592.
bzimport added a subscriber: Unknown Object (MLST).

Do you mean for single-item inserts, rather than for paired inserts?

Yes I do mean for single-item inserts, these seem to be far more common these
days. Think of the accented characters and foreign alphabets used in large
numbers on quite a few wikis now. Look how many are used on the English
Wiktionary for example.

TheDJ subscribed.

I'm resolving this, as it doesn't seem to be a direction that we will be taking. We have the char inserters in various editors now, IME's from the language extensions and operating systems have various input methods as well.

insertTags itself is deprecated and replaced with jquery.textSelection

Tgr subscribed.

insertTags has been removed in rMWcfa70ea6d003: Remove old "bulletin board style toolbar" from core in favor of the insertion tools in various extensions (CharInsert, WikiEditor, VisualEditor). WikiEditor and VisualEditor do replace the selected character. I think this is still a valid change request with regards to CharInsert.

Tgr renamed this task from wikibits/insertTags + <charinsert> should replace highlited text to <charinsert> should replace highlited text.Nov 18 2021, 10:38 PM
Tgr edited projects, added CharInsert; removed MediaWiki-Page-editing.
Tgr updated the task description. (Show Details)