i want to let my users write designed articles (with pictures) using the TIWHTMLEdit.
for that i created a table in my DB, that have a blob field that will contain the text and graphics of the article.
2 questions :
when i tested the TIWHTMLEdit from the demo, and clicked the "Get
text from HTML editor", everything dissapeared and i got a small message
saying "Buffer too small" for something that should be about 20k-30k.
how can i make the buffer size bigger please?
can you advise, if saving the TIWHTMLEdit's content to a blob is the proper way please?
i love the TIWHTMLEdit, and i want to thank you for this REALLY GREAT componet !
1. I have not been able to reproduce this issue. Can you please let me know which version of IntraWeb and which browser you are using so I can further investigate this?
2. The content of the TIWHTMLEdit contains text only, so you should be able to save to this to any kind of field that accepts text. Please not that the TIWHTMLEdit only contains links to graphics (image files) and not the image files themselfs.
i think 1 and 2 are connected. yes, the TIWHTMLEdit containes only the link of a graphic object, but i found that all 3 major browsers behave very differently, when i DRAG a graphic file from a folder into the TIWHTMLEdit :
Chrome (26.0.1410.64): does nothing - nothing happens.
IE (8) : "overwrite" the picture in the same tab as the application, thus make the app go away...
Firefox (9.0.1) : THE BEST behaviour! - it lets me DRAG&DROP a picture from and folder(even from the Desktop) into the TIWHTMLEdit, just like a proffessional HTML editor :D we can even resize the image/pic while editing - REALLY nice job! and when i click the "Get text from html editor", it "converts" the text AND the images to letters, so it's much easier to edit and save into a Blob... lol however, if the "converted" text is too big, then i get this "Buffer too small" message in an empty page.
is it possible to impliment the Firefox's behaviour also in Chrom and IE, and let us change the buffer size ?
can i do something server-side that can change the buffer size? DoubleBuffered:=True; won't work i guess, right?
could TIWHTMLEdit1.SetTextBuf(); affect the buffer? what is the SetTextBuf for please?
so the "option" of draging an image into the browser is not a TIWHTMLEdit's feature, but a browser "side effect"? do you think it's possible to impliment Drag&Drop to the TIWHTMLEdit, like the Firefox does?
MANY thanks for your kind help and patience Bart...
- The SetTextBuff call is a standard delphi call which won't affect the in-browser behavior of the TIWHTMLEdit.
As I have not been able to reproduce this issue it's hard to say how it can be avoided. Can you please provide a ready to run sample project that demonstrates the issue (preferably with exact instructions on how to reproduce the issue) so I can further investigate this?
- Yes this is indeed browser-level functionality and not control-level functionality. I'm not sure if it would be technically possible to implement the drag&drop functionality for other browsers than FireFox. In any case this would be a non-trivial change to the control.
the test case is very simple : just run the IW TMS Demo on Firefox, and Drag&Drop pictures from a folder in your computer, to the TIWHTMLEdit. you can add some text to it, and then click the "Get text from html editor". it will take some time to convert the text, but if if will be too big, it will show the "Buffer too small" message in an empty page.
i understand if this feature is not supported, just want to tell my users that if they want to D&D pictures - they should use FF for that.
Please note that the buffer size is a browser-setting which we unfortunately have no control over. I would recommend to upload any required images separately and use links to the image files in the HTML code. This would drastically decrease the size of the code that needs to be stored using the HTML editor (avoiding possible "buffer too small" errors) and would make creating/editing the code possible with all major browser and not only FF.
yes, i understand that. but i can't control the user's actions. now that i underst this issue, i just wanted to inform you about this message, to see if you can do something about it, so the user won't be left with an "empty" page with only this small message in it.
maybe to add a "text counter" that shows the limit of TIWHTMLEdit. something the like in youtube's comment.