freon4dsl / Freon4dsl

Web Native language Workbench with Projectional Web Editor
https://www.freon4dsl.dev
MIT License
67 stars 8 forks source link

Change placeholder of string or identifier field #323

Open globallyunique opened 5 months ago

globallyunique commented 5 months ago

How is the placeholder for a name field changed from the name of the property, e.g., the property is 'name' and the field with no value should show ?

joswarmer commented 5 months ago

This is defined in the TextBox. The edit language has no option to change this, the only way to change this currently is to create a custom projection in TypeScript.

joswarmer commented 5 months ago

This could be added this the edit language of course.

joswarmer commented 5 months ago

One relatively simple way of solving this is to use a simple properties file like:

MyConcept.myProperty = Placeholder for property
globallyunique commented 5 months ago

Are you saying that there is already such a property file or just that this would be the way to support adding it to the edit language?

I tried to follow the code but due to my early stage of understanding Freon and weak javascript skills, I couldn't see how the default was set. Can you give more info on where in the TextBox the default is currently set.?

joswarmer commented 5 months ago

No, such a property files ins't there yet, but should be relatively simple to add.

joswarmer commented 3 months ago

The placeholder is a property of the TextBox, so this can be changed when creating the box. POnly in custom projections, there is no way in the .edit file to do this.