Jump to content

Topic on Talk:ResourceLoader/Legacy JavaScript

Summary by Krinkle

insertTags() was deprecated, but the new mw.toolbar module covers all its functionality.

Krinkle (talkcontribs)

How can you deprecate major features like insertTags with no replacement listed? What's the purpose of this page, to just tell us that we're screwed and should give up on ever using our scripts again? UncleDouggie 09:58, 18 February 2011 (UTC)

This post was posted by Krinkle, but signed as UncleDouggie.

Brooke Vibber (talkcontribs)

It is deprecated not removed. The function is still there and used by:

Note that the actual insertTags function has in fact already been replaced in 1.18 with a call into the jquery.textSelection module; but it's kept available for internal API compatibility.

The direct callers are on the way (though not yet 100%) to being superseded by Extension:WikiEditor's editing & toolbar widgets, which have more tightly integrated (and more flexible) ways to list things to insert into your editor (ultimately using jquery.textSelection as the actual implementation).