I have several templates that are using {{text}:html} formatting. The font specified in word works when the data is transferred from PS forms to word in all cases except when the user enters a second paragraph.
I've tried updating the JS as well as the CSS and Style for that specific field but that didn't work. Is there a way to prevent the font from changing in Word? I've also tried locking the font in Word but that didn't work.
OK. I found the solution for anybody in the future (if it isn't already modified by PS). I think the field is has the paragraph text styler which is overriding any default font settings I have in Word. I used this code snippet in my JS to make sure any paragraph formatting also updates to the font I want. In this case its Calibri 11pt font.
fd.rendered(function() {
console.log('Form rendered');
// Apply Calibri font and 11pt size to rich text fields
var fieldsToStyle = ['FieldNames, SeparatedbyCommas']; // Replace with your actual field names
fieldsToStyle.forEach(function(fieldName) {
var field = fd.field(fieldName);
if (field) {
field.$on('change', function(value) {
// Wrap any content in <p> with inline style enforcing Calibri and 11pt size
var styledContent = value.replace(/<p>/g, '<p style="font-family: Calibri, sans-serif; font-size: 11pt;">');
field.value = styledContent;
});
}
});