Interpolation
There is optional support for string interpolation. The way it works is
that you define a custom function that takes a string and transforms it to
another string. This function will be applied to every string
property.
This works in addition with the config.contextData property, which
will be passed as the second argument to the template function.
Example:
import { Editor, Config } from "@tyzo/page-editor";
const config: Config = {
tepmlateFunction: (value, contextData) => value.replace('{{userName}}', contextData.userName),
components: {
...
}
}
return <Editor config={config} contextData={{ userName: 'Ben' }} />