HTML fields and line spacing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2014 11:51 AM
Is there any way to set the default line spacing on HTML fields? I've seen posts about writing a before Business Rule to replace the HTML tags but that doesn't change it until you save the record.
I created an HTML field on the sys_user table to allow ITIL users to create a personal signature, which we can pull in to the email client. Originally I created it as a string field but it did not put any line breaks at all so the signature would all end up on one line so I changed it to be an HTML field. When the user goes to My Profile to add their signature, everything is double spaced. The only way to single space is to Shift+Enter for a line break, but I don't want the ITIL users to have to remember to do that.
When the carriage return is used, it adds a </p> tag. If I could get it to add the <br /> tag it would single space. Does anyone know of a way to do this so that it will always single space in the HTML field in real-time the user is entering their information?
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2015 06:37 AM
Hi Travis Toulson /Salva,
I am facing a similar issue here. I have in one view i have two HTML fields on my form, and in other just one. both views are on the same table.
to check the number of fields i am using i am using
var editors1 = tinymce.EditorManager.editors.length;
Issue is....on the page load sometimes editors1 has a correct value and sometimes it shows 0, i.e it doesn't recognize the presence of the field on the form, so the code you suggested above does not work, when it does recognize it then it works just fine.
what am i missing here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2015 12:00 PM
Hi Anurag,
That is strange. I haven't had a chance to try to replicate this yet. Does there appear to be a pattern in when it doesn't recognize the editor? Is it only on the view with one, only on the view with both? Or does it seem random? If it seems random, it might be a timing issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2015 12:53 AM
Hi Travis,
The only pattern i was able to find was that if you open the form on the same window then it works fine, if you open the form in a new tab then this problem is observe.
As you rightly pointed that it might be a timins issue, i thought the same so for the time being i have overcome this issue by adding a wait of .5 second before coming to the actual script. In this case it is working fine. But i want to understand what might be the actual problem here, any other script might be the reason but using "addAfterPageLoadedEvent" will ensure that this code runs after the page loads.
It is observed in both the views.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2015 07:12 AM
Hi Anurag,
I'm not sure at this point. As far as I can tell combing through the code, it looks like the TinyMCE editor is supposed to initialize with the render events which I believe comes before the afterPageLoad events. I could be wrong on that one. I also noticed that TinyMCE seems to have its own initialize event that you can hook into with addTinymceLoadEvent. I have not tried either of these but there may be a better event chain than afterPageLoaded to hook into for this script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2015 07:32 AM
I think you are right there is something on the "event chain" here. I will keep look more here and post here if i find something.
For the time being adding a .5 sec delay has resolved the issue.