suneditor icon indicating copy to clipboard operation
suneditor copied to clipboard

Custom tag

Open akin2unde opened this issue 3 years ago • 1 comments

Hello  Genius,  I Am trying to add custom tags that codeview will recognise and not replace .i have this sample in a react project.

<header> <fld>Company.Description</fld> <b>Journal Report Report</b> Date: </header> <fld>Journal.Code</fld> <table> <th>Voucher Code</th><th>Description</th><th>Credit Account</th> <th>Debit Account</th> <th>Amount</th> <th>Currency</th> <lst> <lstfld>Journal.Vouchers</lstfld> <sort> <sortType>DESC</sortType> <fld>Voucher.TransactionDate</fld> </sort> <tr> <td><fld> Voucher.Code</fld></td> <td><fld> Voucher.Description</fld></td> <td><fld> Voucher.CreditAccount</fld></td> <td><fld> Voucher.DebitAccount</fld></td> <td><fld> Voucher.Amount</fld></td> <td><fld> Voucher.Currency</fld></td> </tr></lst> <tr> <td>Total Journal Value:</td><td><eq><agctx>Journal.Vouchers</agctx>Sum[<fld> Voucher.Amount</fld>] </eq></td> </tr> </table>

i want the codeview section of suneditor not to replace this custom tags (< fdl > ,< lst > ,< lstfdl > e.t.c)thanks in advance

akin2unde avatar Feb 14 '22 16:02 akin2unde

addTagsWhitelist: "fld|sort|sortType|lst|lstfld|header"

The "header" tag will not work properly. Replace it with another tag. Currently, it is difficult to properly use custom tags. It will be improved in v3.0.0.

JiHong88 avatar Apr 22 '22 17:04 JiHong88