Page MenuHomePhabricator

Require a specific content format for prop=info&action=preload
Closed, InvalidPublic

Description

I would like to request to have in prop=info&action=preload the possibility to select specific content format, same way as for prop=revisions.

See e.g. https://en.wikisource.org/w/api.php?action=query&prop=revisions&titles=Page:Mrs_Beeton%27s_Book_of_Household_Management_%28Part_2%29.djvu/61&rvprop=content&rvcontentformat=application/json

Event Timeline

Mpaa raised the priority of this task from to Needs Triage.
Mpaa updated the task description. (Show Details)
Mpaa added a project: MediaWiki-Action-API.
Mpaa subscribed.
Anomie claimed this task.
Anomie subscribed.

The preload text from the 'EditFormPreloadText' hook doesn't have a content format per se, it's a raw string to put in the edit <textarea>. So requesting a content format of it doesn't make sense.

If you preload a Page in Page ns in wikisource, (e.g. https://en.wikisource.org/w/api.php?action=query&prop=info&titles=Page:Philosophical_Review_Volume_22.djvu/64&inprop=preload), it could be converted to a json representation, same as the other existing pages in Page ns.
So why giving the option to select a content format does not make sense?

As I already said, inprop=preload shows you the text that would be put into the edit <textarea> by the EditFormPreloadText hook. There's no way to request a contentmodel there, the hook just returns a string.