Page MenuHomePhabricator

Allow to insert a template not only into a form with 'wpTextbox1' id
Open, Needs TriagePublic

Description

Hello! We want to add an extension to our gadget, but we do not use textarea with 'wpTextbox1' id. Is it possible to remove this hard-coded element, or somehow add a way to change it from the outside?

CodeEditor has the same problem: T214989

Event Timeline

Iniquity created this task.Jul 2 2020, 3:39 PM
Restricted Application added a project: Community-Tech. · View Herald TranscriptJul 2 2020, 3:39 PM
Iniquity updated the task description. (Show Details)Jul 2 2020, 3:44 PM

I join. There is also an inconsistency in the fact that the button is added to any textarea that fires an wikiEditor.toolbarReady event:

mw.hook('wikiEditor.toolbarReady').add(function ($textarea) {

While the text is inserted only in the #wpTextbox1 element:

$('#wpTextbox1').textSelection('encapsulateSelection', textSelectionOpts);

So, a situation is possible where the text is added to a form different from one that has the button.

Currently, together with T214989: Allow CodeMirror to be used for other textareas with WikiEditor, these are the two only buttons that can not be added and work properly in WikiEditor, attached to an arbitrary textarea. So please fix, Convenient-Discussions needs it so much.

Jack_who_built_the_house renamed this task from Ability to insert a template not only into a form with 'wpTextbox1' id to Allow to insert a template not only into a form with 'wpTextbox1' id.Jul 5 2020, 5:57 PM