Render the field using the YUI Editor widget
436451
function() {
	   if(!inputEx.RTEfieldsNumber) { inputEx.RTEfieldsNumber = 0; }
	   
	   var id = "inputEx-RTEField-"+inputEx.RTEfieldsNumber;
	   var attributes = {id:id};
      if(this.options.name) { attributes.name = this.options.name; }
      
	   this.el = inputEx.cn('textarea', attributes);
	   
	   inputEx.RTEfieldsNumber += 1;
	   this.fieldContainer.appendChild(this.el);
	
	   //This is the default config
	   var _def = {
	       height: '300px',
	       width: '580px',
	       dompath: true,
	       filterWord:true // get rid of the MS word junk
	   };
	   //The options object
	   var o = this.options.opts;
	   //Walk it to set the new config object
	   for (var i in o) {
	        if (lang.hasOwnProperty(o, i)) {
	            _def[i] = o[i];
	        }
	   }
	   //Check if options.editorType is present and set to simple, if it is use SimpleEditor instead of Editor
	   var editorType = ((this.options.editorType && (this.options.editorType == 'simple')) ? YAHOO.widget.SimpleEditor : YAHOO.widget.Editor);
	
	   //If this fails then the code is not loaded on the page
	   if (editorType) {
	       this.editor = new editorType(id, _def);
	       this.editor.render();
	   } else {
	    alert('Editor is not on the page');
	   }
	   
	   
	   /**
   	 * Filters out msword html comments, classes, and other junk
   	 * (complementary with YAHOO.widget.SimpleEditor.prototype.filter_msword, when filterWord option is true)
   	 * @param {String} value The html string
   	 * @return {String} The html string
   	 */
   	this.editor.filter_msword = function(html) {
   	   
   	   html = editorType.prototype.filter_msword.call(this,html);
   	   
   	   // if we don't filter ms word junk
   	   if (!this.get('filterWord')) {
   	      return html;
   	   }

   	   html = html.replace( /<!--[^>][\s\S]*-->/gi, ''); // strip (meta-)comments
         html = html.replace( /<\/?meta[^>]*>/gi, ''); // strip meta tags
         html = html.replace( /<\/?link[^>]*>/gi, ''); // strip link tags
         html = html.replace( / class=('|")?MsoNormal('|")?/gi, ''); // strip MS office class
         html = YAHOO.lang.trim(html); // trim spaces
         
         return html;
   	};
   	
	}
1302893
def render_datefield(field, attrs, style="date"):
	
	return wrappers.CALENDAR_WRAPPER % {
		"field": field,
		"style": pad(style),
		"align": pad(attrs.get("_align", "")),
		"icon": format_html(wrappers.ICON_TEMPLATE, attrs.get("_icon")),
	}
1239820
def render(self, name, value, attrs=None, renderer=None):
        
        if not hasattr(self, "editor_manifest"):
            self.editor_manifest = self.init_manifest(self.config_name)

        config = self.editor_manifest.get_config(self.config_name)
        if config.get('embed_config'):
            self.embed_config = True

        context = self.get_context(name, value, attrs)

        return self._render(self.template_name, context, renderer)
1120834
def render(self, name, value, attrs=None, **kwargs):
        
        output = super(Select2Mixin, self).render(
            name, value, attrs=attrs, **kwargs)
        id_ = attrs['id']
        output += self.render_js_code(
            id_, name, value, attrs=attrs, **kwargs)
        return mark_safe(output)
77662
function ajax_render_options()
	{
		// vars
		$options = array(
			'field_key' => '',
			'field_type' => '',
			'post_id' => 0,
			'nonce' => ''
		);
		
		// load post options
		$options = array_merge($options, $_POST);
		
		
		// verify nonce
		if( ! wp_verify_nonce($options['nonce'], 'acf_nonce') )
		{
			die(0);
		}
		
		
		// required
		if( ! $options['field_type'] )
		{
			die(0);
		}
		
		
		// find key (not actual field key, more the html attr name)
		$options['field_key'] = str_replace("fields[", "", $options['field_key']);
		$options['field_key'] = str_replace("][type]", "", $options['field_key']) ;
		
		
		// render options
		$field = array(
			'type' => $options['field_type'],
			'name' => $options['field_key']
		);
		do_action('acf/create_field_options', $field );
		
		
		die();
		
	}
347479
function() {
	   
	   var grid, eventDelegation, square, i;
	   
	   // remember squares
	   this.squares = [];
	
	   // container
	   grid = inputEx.cn('div', {className: 'inputEx-ColorField-Grid'});
	   
	   // Is event delegation available ?
	   // (YAHOO.util.Event.delegate method is in "event-delegate" YUI-module)
	   eventDelegation = !lang.isUndefined(Event.delegate);
	   
	   for(i = 0 ; i < this.length ; i++) {
	      
	      //var square = inputEx.cn('div', {className: 'inputEx-ColorField-square'},{backgroundColor: this.colors[i], width:this.cellWidth+"px", height:this.cellHeight+"px", margin:this.cellMargin+"px" });
	      square = inputEx.cn('div', {className: 'inputEx-ColorField-square'},{backgroundColor: this.colors[i] });
	   	grid.appendChild(square);
			
	   	this.squares.push(square);
	   	
	   	// No event delegation available : add a listener on each square
	   	if (!eventDelegation) {
	   	  Event.addListener(square, "mousedown", function(e) {
	   	     var el = Event.getTarget(e);
	   	     this.onColorClick(e,el,grid);
	   	  }, this, true );
   	   }
	   	
	   	// <br clear='both'/> insertion to end a line
	   	// ( + always after the last colored square)
	   	if (i%this.cellPerLine === this.cellPerLine-1 || i === this.length-1) {
            grid.appendChild(inputEx.cn('br',{clear:'both'}));
         }
      }
      
      // Mousedown event delegation
      if (eventDelegation) {
         
         if (!lang.isUndefined(YAHOO.util.Selector)) {
            
            Event.delegate(grid,"mousedown",this.onColorClick,"div.inputEx-ColorField-square",this,true);
            
         } else {
            
            Event.delegate(grid,"mousedown",this.onColorClick,function(el) {
               if (el.nodeName === "DIV" && YAHOO.util.Dom.hasClass(el,'inputEx-ColorField-square')) {
                  return el;
               }
            },this,true);
            
         }
      }
      
	   return grid;
	}
349743
protected function renderEditor()
    {
        $html = '';

        // Will store the name
        $html .= $this->createHidden('name', $this->name);

        // Will store the crop coordinates
        $html .= $this->createHidden('crop_box',
            $this->image()->getAttributeValue('crop_box'));

        // Begin the image upload section
        $html .= '
			<div class="image-holder">
			<div class="toolbar input-group">
			<div class="btn-group btn-group-sm">
			<div class="crop btn js-tooltip active" title="' . __('decoy::form.image.crop_tooltip') . '">
			<div class="glyphicon glyphicon-scissors"></div></div>';

        // Will add the focal point ui
        if ($this->add_focal_point) {
            $html .= '<div class="focal btn js-tooltip" title="' . __('decoy::form.image.focal_tooltip') . '">
				<div class="glyphicon glyphicon-screenshot"></div></div>';

            // Will store the focal point
            $html .= $this->createHidden('focal_point',
                $this->image()->getAttributeValue('focal_point'));
        }

        // Will close out the button group
        $html .= '</div>';

        // Add the title input
        $html .= Former::text($this->inputName('title'))
            ->class('title js-tooltip')
            ->placeholder(__('decoy::form.image.title_placeholder'))
            ->title(__('decoy::form.image.title_help'))
            ->render();

        // Add delete button
        $html .= '<div class="delete btn-sm js-tooltip">
				<div class="glyphicon glyphicon-trash"></div>
			</div>';

        // Close out all divs and add image holder.  Make the old image no wider
        // than the max available width of forms (1050)
        if ($src = Former::getValue($this->inputName('file'))) {
            $src = Croppa::url($src, 1050);
        }

        $html .= sprintf('</div>
			<div class="preview"><img class="source" src="%s"></div>
			</div>', $src);

        return $html;
    }
279295
function() {

		 // Render the help panel
	    this.renderHelpPanel();

	    /**
	     * @property layout
	     * @type {YAHOO.widget.Layout}
	     */
	    this.layout = new widget.Layout(this.el, this.options.layoutOptions);
	    this.layout.render();

		 // Right accordion
	    this.renderPropertiesAccordion();

	    // Render buttons
	    this.renderButtons();

	 	 // Saved status
		 this.renderSavedStatus();

	    // Properties Form
	    this.renderPropertiesForm();

  }
1327267
def render(self, ctx=None):
        '''
        
        '''
        if ctx is None:
            ctx = RenderContext()
        ctx.push(self)
        self._initialize()
        offset = self.offset if self.offset else 0
        if self._mutating():
            field_idx = self._field_idx
        else:
            key_field = self.resolve_field(self._key_field)
            key_from_key_field = key_field._current_value
            if key_from_key_field in self._keys:
                field_idx = self._keys.index(key_from_key_field)
            else:
                field_idx = 0  # default value
        self._fields[field_idx].set_offset(offset)
        rendered = self._fields[field_idx].render(ctx)
        self.set_current_value(rendered)
        ctx.pop()
        return self._current_rendered
382694
function renderKoboField() {
		$this->renderField(
			[
				'id' => 'kobo',
				'name' => $this->getSlug(),
				'option' => 'kobo',
				'value' => ( isset( $this->options['kobo'] ) ) ? $this->options['kobo'] : '',
				'type' => 'url',
				'class' => 'regular-text code',
			]
		);
	}
337851
protected function renderWidget()
    {
        $contents = [];

        // get formatted date value
        if ($this->hasModel()) {
            $value = Html::getAttributeValue($this->model, $this->attribute);
        } else {
            $value = $this->value;
        }
        if ($value !== null && $value !== '') {
            // format value according to dateFormat
            try {
                $value = Yii::$app->formatter->asDate($value, $this->dateFormat);
            } catch(InvalidParamException $e) {
                // ignore exception and keep original value if it is not a valid date
            }
        }
        $options = $this->options;
        $options['value'] = $value;

        if ($this->inline === false) {
            // render a text input
            if ($this->hasModel()) {
                $contents[] = Html::activeTextInput($this->model, $this->attribute, $options);
            } else {
                $contents[] = Html::textInput($this->name, $value, $options);
            }
        } else {
            // render an inline date picker with hidden input
            if ($this->hasModel()) {
                $contents[] = Html::activeHiddenInput($this->model, $this->attribute, $options);
            } else {
                $contents[] = Html::hiddenInput($this->name, $value, $options);
            }
            $this->clientOptions['defaultDate'] = $value;
            $this->clientOptions['altField'] = '#' . $this->options['id'];
            $contents[] = Html::tag('div', null, $this->containerOptions);
        }

        return implode("\n", $contents);
    }
905766
function () {
        var self = this, layout = self._layout, prefix = self.classPrefix;

        self.preRender();
        layout.preRender(self);

        return (
          '<fieldset id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' +
          (self.settings.title ? ('<legend id="' + self._id + '-title" class="' + prefix + 'fieldset-title">' +
            self.settings.title + '</legend>') : '') +
          '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' +
          (self.settings.html || '') + layout.renderHtml(self) +
          '</div>' +
          '</fieldset>'
        );
      }
1253896
private function renderForm()
    {
        /** @var ActiveRecord $model */
        $model = new $this->modelClass;

        echo <<<HTML
<div class="modal" id="{$this->id}-new-node-modal" tabindex="-1" role="dialog" aria-labelledby="newNodeModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
HTML;
        /** @var ActiveForm $form */
        $form = ActiveForm::begin([
            'id' => $this->id . '-new-node-form'
        ]);

        echo <<<HTML
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="newNodeModalLabel">New node</h4>
      </div>
      <div class="modal-body">
HTML;

        echo call_user_func($this->formFieldsCallable, $form, $model);

        echo <<<HTML
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="submit" class="btn btn-primary">Create node</button>
      </div>
HTML;
        $form->end();
        echo <<<HTML
    </div>
  </div>
</div>
HTML;
    }
166215
def render_filefield(field, attrs):
	
	field.field.widget.attrs["style"] = "display:none"

	if not "_no_label" in attrs:
		attrs["_no_label"] = True

	return wrappers.FILE_WRAPPER % {
		"field": field,
		"id": "id_" + field.name,
		"style": pad(attrs.get("_style", "")),
		"text": escape(attrs.get("_text", "Select File")),
		"icon": format_html(wrappers.ICON_TEMPLATE, attrs.get("_icon", "file outline"))
	}
547411
function() {
	   if(!inputEx.TinyMCEfieldsNumber) { inputEx.TinyMCEfieldsNumber = 0; }
	   
	   var id = "inputEx-TinyMCEField-"+inputEx.TinyMCEfieldsNumber;
		this.id = id;
	   var attributes = {id:id, className: "mceAdvanced"};
      if(this.options.name) { attributes.name = this.options.name; }

	   this.el = inputEx.cn('textarea', attributes);
	   
	   inputEx.TinyMCEfieldsNumber += 1;
	   this.fieldContainer.appendChild(this.el);
			
		this.editor = new tinymce.Editor(this.id, this.options.opts);

		// Adds an observer to the onInit event using the render method
		this.editorReady = false;		
		var that = this;
		this.editor.onInit.add(function(ed) {
			that.editorReady = true;
		});

		this.editor.render();
	}
937088
function onRenderRenderWidgets(ViewEvent $e)
    {
        $viewModel = $e->getModel();
        if (! $viewModel->terminate())
            // Only base themes has a widgets rendered into
            return;

        /** @var RegionBoxContainer $rBoxContainer */
        $rBoxContainer = $this->sm->get('yimaWidgetator.Widgetizer.Container');
        foreach ($rBoxContainer->getWidgets() as $region => $wdgs) {
            // Render Widget
            $this->__renderWidgets($region, $wdgs, $viewModel);
        }
    }
1236781
function() {
	
	   // Create a DIV element to wrap the editing el and the image
	   this.divEl = inputEx.cn('div', {className: 'inputEx-fieldWrapper'});
	   if(this.options.id) {
	      this.divEl.id = this.options.id;
	   }
	   if(this.options.required) {
	      Dom.addClass(this.divEl, "inputEx-required");
	   }
	   
	   // Label element
	   if(this.options.label) {
	      this.labelDiv = inputEx.cn('div', {id: this.divEl.id+'-label', className: 'inputEx-label', 'for': this.divEl.id+'-field'});
	      this.labelEl = inputEx.cn('label');
	      this.labelEl.appendChild( document.createTextNode(this.options.label) );
	      this.labelDiv.appendChild(this.labelEl);
	      this.divEl.appendChild(this.labelDiv);
      }
      
      this.fieldContainer = inputEx.cn('div', {className: this.options.className}); // for wrapping the field and description
	
      // Render the component directly
      this.renderComponent();
      
      // Description
      if(this.options.description) {
         this.fieldContainer.appendChild(inputEx.cn('div', {id: this.divEl.id+'-desc', className: 'inputEx-description'}, null, this.options.description));
      }
      
   	this.divEl.appendChild(this.fieldContainer);
      
	   // Insert a float breaker
	   this.divEl.appendChild( inputEx.cn('div',null, {clear: 'both'}," ") );
	
	}