Dynamic Text items on the board don't retain settings after content replace
I'd like to be able to add a bunch of .txt files as media and set their font/size/alignment all at once.
To accomplish this, I attempted to create one piece of media on my board which has the formatting I was looking for. I then copied that into a different column and went to replace the media by dragging the separate .txt file onto the media while holding Option. Unfortunately, this cleared font/size/alignment settings. This seems different from how video files work.
Is there a better approach for this?
Comments
Hello @zachwcohn,
Yes indeed, the properties of a text-media are not re-imported when you replace one. We will see if we can improve this behavior in a near future.
In the meantime, you could use a script to copy the properties from one text-media to another. For example :
value = Millumin.getMediaProperty("layer", 1, "font size") Millumin.setMediaProperty("layer", 2, "font size", value)And in a more generic script (that you can use right away) :
Parameter.createParameter("layer name", "Layer") Parameter.createParameter("column source", 1, true, [1,100]) Parameter.createParameter("column target", 0, true, [0,100]) Parameter.addInfo("set at 0 to use the launched column") Parameter.addSpace() Parameter.createButton("Copy", copyProperties) function copyProperties() { var layerName = Parameter.get("layer name") var columnSource = Parameter.get("column source") var columnTarget = Parameter.get("column target") if( columnTarget == 0 ) { columnTarget = Millumin.getLaunchedColumnIndex() } var properties = ["use whole text", "fontFamilyName", "fontName", "underlined", "font size", "alignment", "color", "force size"] properties.forEach(propertyName => { var value = Millumin.getMediaProperty(layerName, columnSource, propertyName) Millumin.setMediaProperty(layerName, columnTarget, propertyName, value) log(propertyName+" = "+value) }) }Best. Philippe