Yakup ULUTAŞ Posted March 10, 2025 Posted March 10, 2025 I'm using TuniHTMLMemo, switching to source code editing mode, and pasting the HTML I've written into it. There is a table inside the HTML, and I create the list items myself. However, it automatically changes the placement of the list items, which disrupts my design. It also removes the first three lines of HTML tags. <!DOCTYPE html> <html> <head> htmledit.mp4 Quote
Sherzod Posted March 10, 2025 Posted March 10, 2025 Hello, Yes, I think adding a non-breaking space ( ) inside <tbody> might prevent it from being removed. Can you try this and see if {urun_listesi} stays in place after editing? <tbody> {urun_listesi} </tbody> Quote
Yakup ULUTAŞ Posted March 11, 2025 Author Posted March 11, 2025 Unfortunately, the same issue persists It also removes these tags. Quote
Sherzod Posted March 11, 2025 Posted March 11, 2025 32 minutes ago, Yakup ULUTAŞ said: If this doesn't work, another option could be adding an empty <tr> with a non-breaking space: <tbody> {urun_listesi} <tr><td> </td></tr> </tbody> or <tbody> {urun_listesi} <tr style="display: none;"><td></td></tr> </tbody> Quote
Yakup ULUTAŞ Posted March 11, 2025 Author Posted March 11, 2025 Unfortunately, the same issue persists , I have attached a sample HTML file; you can test it. siparis_taslak__.html Quote
Sherzod Posted March 11, 2025 Posted March 11, 2025 16 minutes ago, Yakup ULUTAŞ said: siparis_taslak__.html 6.09 kB · 0 downloads Yes, it turns out your code didn't meet the HTML specification. You can verify this behavior in any browser. This is not a bug in UniHTMLMemo. Try to wrap {urun_listesi} inside <tr> and <td> tags, like this: <tbody> <tr> <td colspan="5">{urun_listesi}</td> </tr> </tbody> Or, if {urun_listesi} consists of multiple table rows (<tr>), you could do: <tbody> {urun_listesi} <tr style="display:none;"><td colspan="5"> </td></tr> </tbody> Quote
Yakup ULUTAŞ Posted March 11, 2025 Author Posted March 11, 2025 But you're adding an extra empty line. Is this really the solution? And how will we fix the removed head tag? Quote
Sherzod Posted March 11, 2025 Posted March 11, 2025 2 hours ago, Yakup ULUTAŞ said: But you're adding an extra empty line. Is this really the solution? <tbody> {urun_listesi} <tr style="display:none;"> <td colspan="5"> </td> </tr> </tbody> ? Quote
Sherzod Posted March 11, 2025 Posted March 11, 2025 2 hours ago, Yakup ULUTAŞ said: And how will we fix the removed head tag? If your goal is to display or use a complete HTML document including tags like <!DOCTYPE html>, <html>, <head>, then TUniHTMLFrame is the right component. TUniHTMLMemo is designed only for editing HTML fragments (body content) and removes those tags automatically. Try using TUniHTMLFrame instead, as it's meant to handle full HTML pages. Quote
Yakup ULUTAŞ Posted March 11, 2025 Author Posted March 11, 2025 2 minutes ago, Sherzod said: Eğer amacınız <!DOCTYPE html>, <html>, <head> gibi etiketleri içeren tam bir HTML belgesini görüntülemek veya kullanmaksa, TUniHTMLFrame doğru bileşendir. TUniHTMLMemo yalnızca HTML parçalarını (gövde içeriğini) düzenlemek için tasarlanmıştır ve bu etiketleri otomatik olarak kaldırır. Bunun yerine, tam HTML sayfalarını işlemek için tasarlanmış olan TUniHTMLFrame'i kullanmayı deneyin. But the user needs to be able to modify the HTML design as they wish and save it. Does the component you mentioned support this? Quote
Sherzod Posted March 11, 2025 Posted March 11, 2025 6 minutes ago, Yakup ULUTAŞ said: But the user needs to be able to modify the HTML design as they wish and save it. Does the component you mentioned support this? If the user needs to edit and save an entire HTML document, TUniHTMLMemo might work, but it does not support <!DOCTYPE>, <html>, or <head> elements. A possible workaround is to store only the <body> content in TUniHTMLMemo and programmatically add the missing document structure when saving or displaying the content. Alternatively, if rich text (WYSIWYG) editing is required, integrating a JavaScript-based editor like TinyMCE or CKEditor inside TUniHTMLFrame could be a better solution. Quote
Yakup ULUTAŞ Posted March 11, 2025 Author Posted March 11, 2025 1 hour ago, Sherzod said: If the user needs to edit and save an entire HTML document, TUniHTMLMemo might work, but it does not support <!DOCTYPE>, <html>, or <head> elements. A possible workaround is to store only the <body> content in TUniHTMLMemo and programmatically add the missing document structure when saving or displaying the content. Alternatively, if rich text (WYSIWYG) editing is required, integrating a JavaScript-based editor like TinyMCE or CKEditor inside TUniHTMLFrame could be a better solution. How can I use these? Is there a guide or forum available? TinyMCE looks nice. Quote
Sherzod Posted March 11, 2025 Posted March 11, 2025 13 minutes ago, Yakup ULUTAŞ said: How can I use these? Is there a guide or forum available? TinyMCE looks nice. There are example solutions for using TinyMCE on the forum. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.