Hey Matthew, 2011/12/28 Matthew Sherborne <msherbo...@gmail.com>: > Hi guys, > > I'm trying to make my own editor, that's just a 'WText' with the > 'contentEditable' thing on it. (It also has a toolbar for 'bold' and > 'italic' and all that). I know it's not gonna work on every browser before > you mention that :P > > I can do it just deriving my class from WContainerWidget or WCompositeWidget > fine. > > However I'd like to derive from WFormWidget so that I can get an associated > label and all the other perks. > > WFormWidget seems to like to create the DOM objects very manually. > > What are some of the things I need to look into to have my WFormWidget do > its actual rendering using other WWebWidget descendants ? >
This is indeed not documented (nor intended), and not possible without access to a private header (DomElement.h), which is not installed. Having access to this header somehow, you should be able to do it by doing: void WTextArea::updateDom(DomElement& element, bool all) { if (all) { element.setProperty(Wt::PropertyInnerHTML, content_.toUTF8()); } WFormWidget::updateDome(element, all); } DomElementType domElementType() const { return DomElement_DIV; } Perhaps we should look at including this header, or, at another way to be able to implement a WFormWidget pretty much like a WContainerWidget or WCompositeWidget. Regards, koen ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest