• Resolved gpanton

    (@gpanton)


    I’ve been directly adding HTML tags for text formatting, eg <i>. Is there an easier way to do this? If I use inline editing on a field with these tags they get dropped.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @gpanton,

    Can you give me a little more background information? Where are you adding HTML? What is your goal? What’s going wrong? What can I do to reproduce your issue?

    Thanks,
    Peter

    Thread Starter gpanton

    (@gpanton)

    Hio Peter

    I’m inserting <i> and </i> tags into plain text, to italicise. If I do this for a field where in-line editing is enabled the tags get dropped. If I use the edit option in data explorer they stick exactly as entered and will still be there if I re-open. The text is rendered as required when the table is published and the page is displayed.

    If I subsequently make any edit of that field through the in-line box then any tags get dropped.

    Regards
    Graham

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Graham,

    Sorry for my late reply!

    The plugin makes a difference between html tags and table data. When you enter a html tag in a table column, it is stored as a string. When you query that data, you will see the html tags as strings. They will not be displayed as html tags and have no influence on the layout.

    Suppose you would allow users to add html tags to your table data, they would be able to change the layout of your pages. That would be unwanted, although it might not be such a big issue. But they would also be able to add script tags, which could be a huge issue! For that reason all data displayed on WordPress pages need to be handled correctly. This behaviour is in line with the WordPress guidelines.

    This might not be the answer you were hoping for, but I hope you understand the reason why it is not possible to add html tags to table data.

    Best regards,
    Peter

    Thread Starter gpanton

    (@gpanton)

    Hi Peter

    I’ve been able to enter HTML <i> tags through the Data Explorer edit function and they then provide the italic rendering when the table is displayed in the browser. Should this not have been allowed?

    Regards
    Graham

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Graham,

    You can add html to a publication, but the list in the Data Explorer or in a Data Project should show the html code instead of interpreting it. Can you confirm that behaviour?

    Thanks,
    Peter

    Thread Starter gpanton

    (@gpanton)

    Hi Peter
    Yes, confirmed. However, as previously noted, if in-line editing is enabled and used, the html code is removed.
    Regards
    Graham

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Graham,

    I can reproduce the inline editing issue. I’ll fix it!

    Thank your for reporting,
    Peter

    Thread Starter gpanton

    (@gpanton)

    You’re welcome.
    Thanks for fixing.
    Graham

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Text formatting’ is closed to new replies.