Last modified: 2014-06-24 20:32:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53899, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51899 - VisualEditor: Please add an "Add wikicode" tool
VisualEditor: Please add an "Add wikicode" tool
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Lowest enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks: ve-plugins-to-create
  Show dependency treegraph
 
Reported: 2013-07-23 18:27 UTC by kipod
Modified: 2014-06-24 20:32 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description kipod 2013-07-23 18:27:01 UTC
sometime, there is a piece of wikicode i get from elsewhere and want to add to the page.

more often than not, this comes in the form of pre-filled template: e.g., in hewiki we developed tools (in the form of bookmarklets) that generate external-link templates from popular sites (the user activate the bookmarklet on some on-line news site, and the tool generates the appropriate template for this site, with article name, author name, date etc. already filled).
another example is the "coord" template: we created a bookmarklet that allows the users to generate pre-filled "coord" template from google maps.

there are other cases where the user might want to inject some prepared wikicode into the page when using VE.

REQUESTED ACTION
create a button/hotkey that will open a "enter wikicode" form. it's ok to require that it will be legal wikicode and ask the parser to test it, and it's ok not to do so. the important thing is the request to allow insertion of raw wikicode through VE, rather than requiring that i'll save and switch to source code editor.

peace.
Comment 1 Chris McKenna 2013-07-25 00:43:12 UTC
From a comment I posted on bug 49686:

The desire [for VE to understand wikimarkup] stems from people wanting the best of both worlds - they want to be able to have the structure and layout of the visual editor with the low-level control they are used to in the source editor all in one place. 

Long term something like this really ought to be possible, but I don't think [VE automatically converting wikitext to visual elements at save or on the fly] is the way. Rather there should be some way for the visual editor to include non-visual blobs that it sends to the parser as is without doing anything to it (other than word wrapping in the editing window); and someway for the editor to mark the start and end of such blobs.
Comment 2 This, that and the other (TTO) 2013-07-25 00:55:41 UTC
This is already possible using the transclusion editor: instead of inserting a new template, insert a "content" section instead with your wikitext

But that workflow is not ideal - particularly because the VE doesn't convert the added wikitext to regular VE content on the fly - and it also seems a bit buggy from my quick tests.
Comment 3 kipod 2013-07-25 13:39:08 UTC
(In reply to comment #1)
> From a comment I posted on bug 49686:
> 
> The desire [for VE to understand wikimarkup] stems from people wanting the
> best
> of both worlds - they want to be able to have the structure and layout of the
> visual editor with the low-level control they are used to in the source
> editor
> all in one place. 
> 
> Long term something like this really ought to be possible, but I don't think
> [VE automatically converting wikitext to visual elements at save or on the
> fly]
> is the way. Rather there should be some way for the visual editor to include
> non-visual blobs that it sends to the parser as is without doing anything to
> it
> (other than word wrapping in the editing window); and someway for the editor
> to
> mark the start and end of such blobs.

i am not sure this is required. once you inject a blob, ve can "pretend" that it found it there when it originally opened the page for editing (i.e., do "unparse for the whole content, inject the blob into the right place in the "unparsed" page, and then "reparse", to integrate the blob into the page). marking the beginning and end of blob will not be necessary if this approach is taken. this may not be a cheap or quick operation, but it's much better to have an expensive "inject" than no inject at all, which basically force the user to use "edit source".

i never investigated what VE does exactly when the user uses Copy/Paste between two pages (i.e., open one page in VE, mark part of it, "Copy", open another page for editing, and "Paste"). maybe we can take a page from that book, no?.

peace.
Comment 4 John Mark Vandenberg 2013-07-26 11:45:28 UTC
The National Library of Australia provides Wikipedia citation wikicode in their digitised newspaper system.
http://trove.nla.gov.au/general/using-digitised-newspapers-faq/#using_cite
Comment 5 vssun 2013-08-12 01:31:32 UTC
This tool is very much required.

Some use cases:
- Copy-pasting some regularly used references (containing cite template)
- Putting wiki signature

At present I am using a dummy template with subst for these purposes.
Comment 6 Chris McKenna 2013-08-13 11:08:13 UTC
Does this request duplicate bug 43133 or 47742?
Comment 7 Chris McKenna 2013-08-13 11:08:33 UTC
sorry bug 47742
Comment 8 kipod 2013-08-13 14:11:55 UTC
(In reply to comment #6)
> Does this request duplicate bug 43133 or 47742?

not really: as far as i was able to understand, those are about wikitext _editing_, while this one asks to be able to "inject" wikitext (usually something you obtained externally, either from some tool/app that generates wikitext, or via copy/paste etc.)

i believe it's significantly simpler to implement than either bug 43133 or bug 47742, and the use-case is different (much more limited).

peace.
Comment 9 Chris McKenna 2013-09-22 08:47:16 UTC
Another request for this today on en.wp, this time from Rezonansowy
Comment 10 James Forrester 2013-11-01 04:51:41 UTC
As mentioned several times, there are a number of major issues that this would cause; we'll have to investigate if they're things we can work around.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links