Fill the content field with the interpretation
        of the placeholder
326000
def save_model(self, request, entry, form, change):
        
        context = RequestContext(request)
        try:
            content = render_placeholder(entry.content_placeholder, context)
            entry.content = content or ''
        except KeyError:
            # https://github.com/django-blog-zinnia/cmsplugin-zinnia/pull/61
            entry.content = ''
        super(EntryPlaceholderAdmin, self).save_model(
            request, entry, form, change)
159414
function placeholder (model, name, spec) {
    // if colum is id then needs to be wrapped in UNHEX
    if (spec.type === 'id' && model.binaryIds) {
        return `UNHEX(:${name})`
    }
    // if column is data and compression is in use it is hex
    else if (spec.type === 'data' && model.compression) {
        return `FROM_BASE64(:${name})`
    }
    else {
        return `:${name}`
    }
}
1069449
def set_placeholder(self, text):
        
        if self._placeholder != text:
            self._placeholder = text
            if not self.hasFocus():
                self.update()
1183633
function _fillMissingFields(attrs) {
  var attr;
  for(var i = 0; i < attrs.length; ++i) {
    attr = attrs[i];

    // populate missing name
    if(typeof(attr.name) === 'undefined') {
      if(attr.type && attr.type in pki.oids) {
        attr.name = pki.oids[attr.type];
      } else if(attr.shortName && attr.shortName in _shortNames) {
        attr.name = pki.oids[_shortNames[attr.shortName]];
      }
    }

    // populate missing type (OID)
    if(typeof(attr.type) === 'undefined') {
      if(attr.name && attr.name in pki.oids) {
        attr.type = pki.oids[attr.name];
      } else {
        var error = new Error('Attribute type not specified.');
        error.attribute = attr;
        throw error;
      }
    }

    // populate missing shortname
    if(typeof(attr.shortName) === 'undefined') {
      if(attr.name && attr.name in _shortNames) {
        attr.shortName = _shortNames[attr.name];
      }
    }

    if(typeof(attr.value) === 'undefined') {
      var error = new Error('Attribute value not specified.');
      error.attribute = attr;
      throw error;
    }
  }
}
13243
def fill_fields(self, **kwargs):
        """"""
        for name, value in kwargs.items():
            field = getattr(self, name)
            field.send_keys(value)
1356487
function () {
                if (!_placeholderSupported && this._cfg.placeholder) {
                    var element = this._domElt;
                    if (element.value === "") {
                        element.value = this._cfg.placeholder;
                        var cssClass = new aria.utils.ClassList(element);
                        cssClass.add('placeholder');
                        cssClass.$dispose();
                        if (this._hasFocus) {
                            ariaUtilsCaret.setPosition(element, 0, 0);
                        }
                        this._hasPlaceholder = true;
                        this._domElt.unselectable = "on";
                    }
                }
            }
124778
function resolvehtml(html, holders) {
	Object.keys(holders).forEach(function(key) {
		html = html.replace(placeholder(key), holders[key]);
	});
	return html;
}
1341002
public void fillContent(CmsImageInfoBean imageInfo) {

        //checking for enhanced image options
        m_form.hideEnhancedOptions(
            (getDialogMode() != GalleryMode.editor) || !CmsPreviewUtil.hasEnhancedImageOptions());
        CmsJSONMap imageAttributes = CmsPreviewUtil.getImageAttributes();
        boolean inititalFill = false;
        // checking if selected image resource is the same as previewed resource
        if ((imageAttributes.containsKey(Attribute.emptySelection.name()))
            || (imageAttributes.containsKey(Attribute.hash.name())
                && !imageAttributes.getString(Attribute.hash.name()).equals(
                    String.valueOf(m_handler.getImageIdHash())))) {
            imageAttributes = CmsJSONMap.createJSONMap();
            inititalFill = true;
        }
        m_form.fillContent(imageInfo, imageAttributes, inititalFill);
    }
855505
function (placeholderPath) {
            var outputContent;
            var typeUtil = ariaUtilsType;
            var pageConfig = this._pageConfigs[this.currentPageId];
            if (pageConfig) {
                var placeholders = pageConfig.pageComposition.placeholders;
                var content = placeholders[placeholderPath] || [];
                outputContent = [];
                var plainContent;
                if (!typeUtil.isArray(content)) {
                    content = [content];
                }

                for (var i = 0, ii = content.length; i < ii; i++) {
                    var item = content[i];
                    if (typeUtil.isObject(item)) {
                        if (this._lazyContent && item.lazy) {
                            outputContent.push({
                                loading : true,
                                width : item.lazy.width || null,
                                height : item.lazy.height || null,
                                color : item.lazy.color || null,
                                innerHTML : item.lazy.innerHTML || null
                            });
                        } else {
                            if (item.template) {
                                outputContent.push(this._getTemplateCfg(item, pageConfig));
                            } else if (item.contentId) {
                                plainContent = this._getPlaceholderContents(pageConfig, item.contentId);
                                outputContent = outputContent.concat(plainContent);
                            }
                        }
                    } else {
                        outputContent.push(item);
                    }
                }
            }
            return outputContent;
        }
570760
def fill_document(self):
        """"""
        with self.create(Section('A section')):
            self.append('Some regular text and some ')
            self.append(italic('italic text. '))

            with self.create(Subsection('A subsection')):
                self.append('Also some crazy characters: $&#{}')
332390
protected function updateDimensionFields()
    {
        foreach ($this->fields as $dim => $field) {
            
            // Update Title / Placeholders:
            
            if ($this->usePlaceholders) {
                $field->setTitle(null)->setAttribute('placeholder', $this->getDimensionLabel($dim));
            } else {
                $field->setTitle($this->getDimensionLabel($dim))->setAttribute('placeholder', null);
            }
            
            // Update Disabled Flags:
            
            $field->setDisabled($this->disabled);
            
            // Update Readonly Flags:
            
            $field->setReadonly($this->readonly);
            
        }
    }
424850
function _fillMissingFields(attrs) {
  var attr;
  for(var i = 0; i < attrs.length; ++i) {
    attr = attrs[i];

    // populate missing name
    if(typeof attr.name === 'undefined') {
      if(attr.type && attr.type in pki.oids) {
        attr.name = pki.oids[attr.type];
      } else if(attr.shortName && attr.shortName in _shortNames) {
        attr.name = pki.oids[_shortNames[attr.shortName]];
      }
    }

    // populate missing type (OID)
    if(typeof attr.type === 'undefined') {
      if(attr.name && attr.name in pki.oids) {
        attr.type = pki.oids[attr.name];
      } else {
        var error = new Error('Attribute type not specified.');
        error.attribute = attr;
        throw error;
      }
    }

    // populate missing shortname
    if(typeof attr.shortName === 'undefined') {
      if(attr.name && attr.name in _shortNames) {
        attr.shortName = _shortNames[attr.name];
      }
    }

    // convert extensions to value
    if(attr.type === oids.extensionRequest) {
      attr.valueConstructed = true;
      attr.valueTagClass = asn1.Type.SEQUENCE;
      if(!attr.value && attr.extensions) {
        attr.value = [];
        for(var ei = 0; ei < attr.extensions.length; ++ei) {
          attr.value.push(pki.certificateExtensionToAsn1(
            _fillMissingExtensionFields(attr.extensions[ei])));
        }
      }
    }

    if(typeof attr.value === 'undefined') {
      var error = new Error('Attribute value not specified.');
      error.attribute = attr;
      throw error;
    }
  }
}
1267572
function ($placeholder, file, that) {
				$.ajax({
					type: "post",
					url: that.options.imagesUploadScript,
					xhr: function () {
						var xhr = new XMLHttpRequest();
						xhr.upload.onprogress = that.updateProgressBar;
						return xhr;
					},
					cache: false,
					contentType: false,
					complete: function (jqxhr) {
						that.uploadCompleted(jqxhr, $placeholder);
					},
					processData: false,
					data: that.options.formatData(file)
				});
			}
58947
function(fill) {
    var xml = this.map.fill.toXml(fill);
    var index = this.index.fill[xml];
    if (index === undefined) {
      index = this.index.fill[xml] = this.model.fills.length;
      this.model.fills.push(xml);
    }
    return index;
  }
609817
function (pageConfig, contentId) {
            var outputContent = [];
            var content = pageConfig.contents.placeholderContents
                    ? pageConfig.contents.placeholderContents[contentId]
                    : null;
            if (!content) {
                return outputContent;
            }
            if (!ariaUtilsType.isArray(content)) {
                content = [content];
            }
            for (var i = 0, length = content.length; i < length; i++) {
                outputContent = outputContent.concat(this.processContent(content[i]));
            }
            return outputContent;
        }
33970
function placeholder (input, property) {
  return ( input === undefined || input === '' || input === null ) ? property : input;
}
655601
function buildField (args, field, form, model, schema, isArrayField) {
    // create field title from schema or property name
    var title = schema && schema.title
        ? schema.title
        : changeCase.titleCase(field.property)
    // set field title
    field.title = title
    // set label if labels are enabled
    if (form.labels && args.label !== false) {
        field.label = title
        // delete so wont be merged over placeholder
        if (args.label === true) {
            delete args.label
        }
    }
    // set placeholder if placeholders enabled
    if (form.placeholders || args.placeholder !== false) {
        field.placeholder = title
        // delete so wont be merged over placeholder
        if (args.placeholder === true) {
            delete args.placeholder
        }
    }
    // set immutable property on field - field will be disabled/readonly after
    // initial value is set
    if (model.columns[field.property] && model.columns[field.property].immutable) {
        field.immutable = true
    }
    // if property has schema then use schema to populate default values
    if (schema) {
        // if schema is an array then need to create sub fields for elements
        if (schema.type === 'array') {
            // do not allow nested arrays
            assert.ok(!isArrayField, 'nested arrays not supported')
            // build field that is array of fields
            return buildArrayField(args, field, form, model, schema)
        }
        // if schema has enum then default to select type
        else if (schema.enum) {
            field.inputType = 'select'
            field.options = _.map(schema.enum, value => {
                // by default use enum values as both key and value
                var option = {
                    title: value,
                    value: value,
                }
                // set selected flag for default value
                if (schema.default && schema.default === value) {
                    option.selected = true
                }
                return option
            })
        }
        // if value is boolean then default to checkbox
        else if (schema.type === 'boolean') {
            field.inputType = 'checkbox'
            // set default value
            field.value = schema.default
        }
        // otherwise use text
        else {
            field.inputType = 'text'
            // set default value
            field.value = schema.default
        }
        // if schema has pattern apply to field
        if (schema.pattern) {
            field.pattern = schema.pattern
        }
        // use schema description
        field.description = schema.description
        // store schema type on field since multiple schema types may map
        // to the same input type but need to be handled differently
        field.schemaType = schema.type
    }
    // property does not have schema
    else {
        // if property does not have schema then it must have input type
        assert.ok(inputTypes[args.inputType], `field without schema must have inputType ${model.name} ${field.property}`)
    }
    // set id for input
    field.id = model.path+'-'+field.property
    // set name for input as the modelName[property]
    field.name = model.name+'['+field.property+']'
    // merge args over default set for field
    _.merge(field, args)
    // if ckeditor flag is set on field then set for form
    if (field.ckeditor) {
        form.ckeditor = true
    }
    // return built field
    return field
}