As the title says, the displayed text for CharInsert should be splitted from the inserted code.
E.g.: "includeonly" inserts <includeonly></includeonly>
It would also be awesome if multirow text could be inserted like templates and tables.
See also
| Subfader | |
| Apr 30 2010, 1:09 PM |
| F6674: TestCharInsert.php | |
| Nov 21 2014, 11:03 PM |
| F6673: charinsert-customlabel.patch | |
| Nov 21 2014, 11:03 PM |
As the title says, the displayed text for CharInsert should be splitted from the inserted code.
E.g.: "includeonly" inserts <includeonly></includeonly>
It would also be awesome if multirow text could be inserted like templates and tables.
See also
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Allow overriding the link text | mediawiki/extensions/CharInsert | master | +105 -18 |
proppy wrote:
Feel free to review this patch for inclusion in CharInsert extensions, it allows to customized the link label by passing a "label" argument to charinsert tag, example:
<charinsert label="foo">bar</charinsert>
proppy wrote:
add custom label on charinsert test case
Here is a test case that validated submitted patch behaviour.
Attached:
Sorry, had not time back then and now remembered this. The patch works fine (without the test case). Cheers!
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
How can I add line breaks using your patch? E.g. to insert
Text.
mhershberger wrote:
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
sumanah wrote:
Johan, I'm sorry for the wait. I'm marking this bug with "need-review" to signal to developers that there's code here awaiting review. Thank you for your patch and test case.
sumanah wrote:
Johan, does your patch still apply?
I recommend that you get a developer access account https://www.mediawiki.org/wiki/Developer_access so that you can commit your patches directly into the source control system in the future -- in fact, you could update and submit this patch, and get it reviewed faster. I'm sorry for the delay.
This was requested again [1] so I guess the patch never made it to the official repo.
[1] https://www.mediawiki.org/wiki/Thread:Extension_talk:CharInsert/attributes
@Kghbln Yeah that was me. I am almost begging for someone to make it an official repo. I don't understand PHP well enough to do any tweaking of this extension myself, so please would someone do this.
5 years later and it's still not possible to create a one word button for multi-line code. E.g.
<charinsert label="Infobox"><nowiki>{{Infobox | }}</nowiki></charinsert>CharInsert.body.php
12a13,17
>
>
> global $charInsertArgs;
> $charInsertArgs = $params;
>
51c56,61
< if ( $eend == '' ) {
---
>
> global $charInsertArgs;
>
> if( isset($charInsertArgs["label"]) && $charInsertArgs["label"] != "" ) {
> $inline = $charInsertArgs["label"];
> } elseif ( $eend == '' ) {@Subfader: To get this moving, you are very welcome to use developer access to submit the proposed code changes as a Git branch directly into Gerrit which makes it easier to review them quickly and provide feedback. If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader. Thanks again!
I never done this, so I wonder if someone more familiar with the process can do it. It's not my code, and I don't know how to test it. Or is it OK to submit patch without testing? Also there are two patches above, I don't know which one is better.
After submitting to Gerrit, you could add a separate comment explicitly saying that it's untested
Change 748823 had a related patch set uploaded (by Tacsipacsi; author: Tacsipacsi):
[mediawiki/extensions/CharInsert@master] Allow overriding the link text
Change 748823 merged by jenkins-bot:
[mediawiki/extensions/CharInsert@master] Allow overriding the link text
The display text can be overridden since January, multiline inserts are still not supported. Can we close this task, considering that the latter is specified as just a nice-to-have?
I think we could.
However! multiline inserts actually also seem to work for me. The example from this comment works:
(It seems that you need both the nowiki and the entities to escape it correctly, which is awkward, but it works.)
I don't know who or when fixed that, but this is definitely resolved.