schema.org attributes (itemprop, etc) in RTE (Umbr...
# help-with-umbraco
a
We have an uncommon situation where we need to allow certain attributes such as itemprop, customprop, etc on a div inside the rich text editor in the backoffice but we haven’t been successful in getting it to allow it through the use of the tinyMCEConfig.config file. Any ideas? We’ve tried changing the validElements value to remove the - on div and added these attributes to it to no avail. Thanks!
d
Does this need to be added to random words or this this structured content such as an address or recipe?
d
I'd normally generate schema as JSON-LD based on strongly-typed models, rather than attaching them as properties. It's more robust and less likely to break if editors screw something up - you can use something like https://github.com/RehanSaeed/Schema.NET
a
Sorry for the delay. The issue is that it’s actually a third-party script and their integration requires the use of those attributes
s
If they are getting a snippet with the script, I would suggest you add a simple textarea property, for them to paste the snippet inside. No need to complicate things with an RTE for that 🙂
Or if it absolutely has to be in an RTE, create a html snippet macro they can add in the RTE. This way it will be obvious where the script is. Without it, there is a big risk that an editor can delete it without noticing.
2 Views