Edit field data before editor starts

Edit field data before editor starts

MaikelMaikel Posts: 75Questions: 18Answers: 1

My data in the table (data loaded from dom) can have some html tags inside the tables.

I want to strip these tags before the editor initializes an edit form. Because if the html for example has another css class, the editor thinks the data is different, but the actual text is the same.

Is there an event i can use to get this working?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    You could possibly use initEdit for that. However, if you can strip out the HTML and then use columns.render to render the HTML in, that would possibly be a better option.

    Allan

  • MaikelMaikel Posts: 75Questions: 18Answers: 1

    hmm,
    but columns.render works on the table.

    I only want to filter the html out for the editor, not in the table itself.

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin
    Answer ✓

    Yes, my point is that if you have the raw data in the table, when Editor reads it, it will get that raw data. But DataTables has the option of "rendering" that raw data when displaying it.

    Allan

This discussion has been closed.