Lucas, thanks for the links!

It seems none of the overriding extensions implement the "expert mode" -- allowing custom javascript editor.  I was able to do what I need with this tiny extension -- https://github.com/nyurik/ThatSrc , but in order to get the proper server-side validation, I still had to add the word "multiline" to the dataTypeParserIDs array

see https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/94544f0ec34eec6816c567707a075617338cc89f/repo/resources/parsers/getStore.js#L45

Is there a way to dynamically register my own data type parser?
The goal is to have a full blown ACE editor instead of a simple string value for my property.

Thanks!

On Sat, May 30, 2020 at 5:56 PM Lucas Werkmeister <mail@lucaswerkmeister.de> wrote:

WikibaseLexeme and WikibaseMediaInfo are two extensions that add new entity types, including datatypes for those entities. I suspect that WikibaseMediaInfo might be easier to look into – in WikibaseLexeme, the extension registration is complicated a bit by the fact that the extension has to be installed on client wikis as well, but only the client parts, not the repo parts, whereas WikibaseMediaInfo doesn’t have this issue.

Several other extensions add new datatypes (but not entity types): at least Math, Score, Kartographer, I believe.

I’m not aware of any extensions that add new datatypes and are specifically intended to be used as examples or building blocks for your own extensions.

Cheers,
Lucas

On 30.05.20 17:52, Yuri Astrakhan wrote:
Hi, I would like to implement a new property type for my project. Are there any examples of extensions that add new prop types to wikibase?

I already implemented most of what I need by changing wikibase code, but I doubt a property to store multiline code snippets will be accepted into wikibase at this stage, so it has to be done as an extension. Any suggestions would be appreciated.

Note that I had to change two repos:



_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata
_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata