re-open
Public

When using the ForeUI editor I can put line breaks into table cells (by entering backslash-n).

Is there some way to do the same thing from an action? When I try to use a backslash-n in the “Set Cell Value” action, like this:

what I get in the table is this:

I’ve tried several other possibilities like backslash-x0A, #013; and \r, but nothing I have tried works.

Might it be possible to accomplish this using a JavaScript snippet?

Thanks!

16 answers

Staff July 24, 2016

Hi Hephaestus, 

At the time being the action for setting table cell value only take the value as text instead of HTML. We will improve this in future version.

Meanwhile you can work around it by using your own Javascript function to set the value. You can put this function in the “Script” element (green “JS” icon in the element list):

var setTableCellHtml = function(elemId, row, col, value) {
$(“#”+elemId).find(“.contentView”).children(“.content”).children().children(“tr”).eq(row – 1).children(“td”).eq(col – 1).find(“.table_cell”).html(htmlToView(value));
}

Then you can call this function using the “Call Javascript Snippet” action. Below is an example:

Please notice the correct format of newline, it is “\\n” because we need to escape the slash in the parameter.

 

 

 

#1
  1. Hi ViVi, that works beautifully, thank you! Something I should mention for anyone else wanting to try this: just copying and pasting the JavaScript into the snippet editor will *NOT* work, because the quote and hyphen (minus sign) characters in the article text above are not ASCII characters, but rather, Unicode left and right double quotes (0x201C, 0x201D) and "en dash" (0x2013). After pasting the text, one needs to work through the text and replace each of their characters with their equivalents typed from the keyboard.

Well this is great site! Would definitely recommend this to my friends. Love the read  https://sandblastingcoloradospringsco.com

#2

Awesome! Learned alot thanks so much keep posting more.https://breastaugmentationomahane.com

#3

The information you have posted is very useful. The sites you have referred was good. Thanks for sharing.  dentalimplantsbatonrougela.com

#4

thanks for sharing keep posting more! deck staining

#5

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Tilly

#6

I really loved it here but are there any recent updates? Thanks  media blasting colorado springs

#7

Awesome! Learned alot thanks so much keep posting more.  bigger boobs

#8

The information you have posted is very useful. The sites you have referred was good. Thanks for sharing  www,wichitadentalimplantswichitaks.com

#9

thanks for sharing keep posting more  deck staining greenville sc

#10

I love your content! Great job!  acupuncture santa barbara

 

#11

I love your content! Great job! acupuncture santa barbara

 

#12

I highly appreciate your work here! Thank you so much!  acupuncture virginia beach

#13

I love your content! Great job! mini abdominoplasty

 

#14

I love your content! Great job! abdominoplasty

 

#15

I wanna know more about this because this is really informative!  how much is a tummy tuck

#16

Please login or Register to Submit Answer