html tags not working in config.json file

1730
10
01-30-2018 06:26 AM
FranklinAlexander
Occasional Contributor III

This is kind of frustrating because I can't seem to figure out why html tags sometimes work in my config files and sometimes they don't work. I have a config.json that I am editing for a customized flash widget. All of the html tags work just fine, accept for the 'title'. When I insert a line break into the title:

       "title": "Seabird Rehabilitators\n<br />and Transporters", I get this:

               

The tags in the description are working just fine:

        "description:"  ...stay with the bird until help arrives. \n<br />\n<br />\n<a   <---These are working                  href=\"http://myfwc.com/education/wildlife/unhook/\"...

I must be missing something very obvious but I am not seeing it! 

0 Kudos
10 Replies
RebeccaStrauch__GISP
MVP Emeritus
 I have a config.json that I am editing for a customized flash widget.

"Flash" as in Flex?  I don't know if that would be the issue or not.  Web AppBuilder is actually built with JavaScript and is a replacement for the Flex viewer which is/has-been depreciated.  Maybe you just said the wrong word, but worth mentioning.  

But, it may just be a missing < or > ....check the lines above it.

BTW - working with AK Fish and Game, I'll be checking out your web site. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rebecca,

   I think he meant "Splash" as that image is the splash widget.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Ahhhh.   That makes much more sense and I should have figured that out.     

0 Kudos
FranklinAlexander
Occasional Contributor III

Yes, Robert is right Rebecca. Sorry, I should have been more specific.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Franklin,

   Can I see your whole config_widgets_Splash_Widget_xx.json?

0 Kudos
FranklinAlexander
Occasional Contributor III

Thanks Robert, I attached the file. I did get around the problem by creating a 'subtitle' and adding a div in the html doc. Originally, the 'title' and 'subtitle' were combined in one line. I would still like to know why the html tags don't seem to work at times, I do run into this often when editing widget configs. It just seems weird that the line breaks work fine in some areas and not in other in the same file. As far as syntax, I tried inserting the breaks just about every way possible with no luck. I also make sure to clear the browser cache each time. 

Just one observation I have noticed regarding the config files, as far as consistency. Not sure if this makes any sense, but the files that have the more 'structured' format (normally found in the widget folder) are the ones I seem to have most issues with. I assume this is because they are closely tied to the html and javasript files, therefore any edits must be done across all associated files. I am learning not to try and edit the configs located in the widget folders, and instead create a new one and located inside the configs folder. That way, although they look messy, all of the coding is included in the one file and you just have to worry about syntax and css. The attached file looks like it might have been copied and pasted from the widget folder into the configs folder, so I don't know if that may be causing some issue with the html tags. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Franklin,

   What version of WAB are you using? Because I do not recognize this config format or properties. It is definitely not version 2.6 or 2.7 of the Splash widget.

0 Kudos
FranklinAlexander
Occasional Contributor III

version 2.4. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Franklin,

   And you are sure that it is the Splash widget... Not some custom widget.

0 Kudos