How to use the xui.UI.RichEditor function in xui

To help you get started, we’ve selected a few xui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linb / CrossUI / xui2.0 / xui / js / UI / FormLayout.js View on Github external
$afterAppend:function(prf, target,subId){
            if(!subId)return;
            // force dock for the only widget
            if(prf.renderId && target['xui.UI'] && target.size()==1){
                var item = prf.getItemByItemId(subId), inputPrf = target.get(0), iProp=inputPrf.properties;
                if(item){
                    var cell = prf.getSubNode("ITEM", item._serialId), 
                        isFormField = inputPrf.box._isFormField ? inputPrf.box._isFormField(inputPrf) : !!xui.get(inputPrf,['properties','isFormField']),
                        mode = prf.boxing().getMode(),
                        show = mode!='read' || target['xui.UI.RichEditor'];
                    if(isFormField && (!iProp.name || prf.ItemIdMapSubSerialId[iProp.name])){
                        iProp.name = item.id;
                    }
                    // for form field only
                    // onsize for dom must here
                    if(cell && cell.get(0)){
                        // if parent is re-rendered
                        if(inputPrf._cellresizeP!=cell){
                            var adjustSize = function(){
                                    if(!cell.get(0))return;
                                    target.setPosition('absolute').setLeft(0).setTop(0);
                                    // first row/col , 2 pix border
                                    if(target.setWidth)target.setWidth(cell.offsetWidth()-(item.col?1:2));
                                    if(target.setHeight)target.setHeight(cell.offsetHeight()-(item.row?1:2));
                                };
                            adjustSize();