Graphics

 View Only
  • 1.  Xpression - MOS - Select text color

    Posted 09-09-2020 16:04

    Is there a way to have a Producer select specific text and change its color using within the MOS plug-in and ENPS?  The real-world example is to give Producers the ability to "highlight" specific text within a quote.  Having the Producer enter the text (or copy/paste) is the easy part.  But often there are times they want to highlight specific words within the quote.

    The un-highlighted version looks like this (for example only):

    The highlighted version would look like this, after they have selected the text they want changed:



  • 2.  RE: Xpression - MOS - Select text color

    Posted 09-14-2020 14:57

    Create a second version of your font with a broad yellow stroke or border...or what ever to make the highlight you like.

    Then have producer add a font tag {FontHighlightID} or {FontHighlightName} before the text that needs to be highlighted and a font tag to change it back {FontNormalID} or {FontNormalName}.

    Teaching your producers the font names and IDs may be the challenge.


    #XPression


  • 3.  RE: Xpression - MOS - Select text color

    Posted 09-22-2020 21:26

    We do something similar, but to make it easier on producers, they can just wrap whatever they want highlighted with curly braces. A script on the text field OnSetText does the replacement of "{" with "{FontHighlightName}" and "}" with "{FontNormalName}" (or whatever your font names are). Then they can just type "The {@WarriorsPR} representative" instead of having to remember and properly spell the font object name (which could also change).

    We chose curly braces because we used that convention elsewhere and because they rarely appear in text outside of programming code, but you could use any open-close symbols you want. Curly braces require an extra conversion step (here using 3 greater-than and less-than symbols) because VBScript in Xpression won't let you directly replace the curly brace without your highlighted text disappearing.

    One pitfall is, while they can add as many highlighted words or phrases as they want, the opening and closing highlight markers must be balanced or you might end up with the rest of the text highlighted. But, they can see that in the MOS preview so it's generally not a problem.

    text = text.replace("{", ">>>") _
      .replace("}", "<<<") _
      .replace(">>>", "{TextHighlight}") _
      .replace("<<<", "{TextPlain}")

    #XPression