Change property into object. key:string to key:{type:type_name, value:string}

Use case or problem

We have limited property definition. Its all we have hardcoded types.

Problems like

  1. DateTime customization
  2. New custom property types
  3. Spesification Number / Text customization
  4. Defaults values for specific property types

Right now, we could not do that. Maybe with plugins.

Proposed solution

As it is now, we have “Key:Value” for properties. That is limits a lot of features and render specifications. I dont know where the type of property stores. Yet i think, we can store the type of proprety inside the md file by changing value as object or method support.

Like

propertyA: { type: text, value: “TestMyValue” }
propertyB: { type: number, value: 1234 }
propertyC: { type: formule, value: note[‘propertyA’] + note[‘propertyB’]}

Alternative:

propertyA: Text(“TestMyValue”)
propertyB: Number(1234)
propertyC: Formule(note[‘propertyA’] + note[‘propertyB’])

2 Likes

I believe this has already been requested: Properties & Bases: Support multi-level YAML (Mapping of Mappings, nested attributes, ).