构建表单 textarea element
@param $ele
@return string
8924
private function buildTextarea($ele) {

        $formNs = $this->formNs;

        if ($ele['editor'] == true){
            $textareaClass = $formNs.'form-editor '.$formNs.'form-textarea '.$formNs.'textarea-'.$ele['name'];
        }else {
            $textareaClass = $formNs.'form-textarea '.$formNs.'textarea-'.$ele['name'];
        }

        $html = '<div class="'.$formNs.'form-group">';
        if ($ele['title']){
            $html .= '<label class="'.$formNs.'form-label" for="'.$ele['id'].'">'.$ele['title'].'</label>';
        }
        $html .= '<div class="'.$formNs.'form-content">';
        $html .= '<textarea name="'.$ele['name'].'" id="'.$ele['id'].'" class="'.$textareaClass.'" placeholder="'.$ele['placeholder'].'" ';
        if (isset($ele['required'])){
            $html .= ' required="" ';
        }
        if (isset($ele['readonly'])){
            $html .= ' readonly="" ';
        }
        $html .= '>';
        $html .= $ele['value'];
        $html .= "</textarea>";
        if ($ele['msg']){
            $html .= '<p class="'.$formNs.'form-help">'.$ele['msg'].'</p>';
        }

        $html .= '</div>';
        $html .= '</div>';

        return $html;
    }
368267
private function renderElement(Element $element) : string
    {
        $label = $element->getLabel();

        if ($label->isEmpty()) {
            return $element->render();
        }

        return $label->render() . $element->render();
    }
325348
function escapeXML($elementValue){
    $escapedValue = str_replace("&", "&amp;", trim($elementValue));
    $escapedValue = str_replace("<", "&lt;", $escapedValue);
    return $escapedValue;
  }
454541
function getArea(elt, validation) {
			var clientRect = elt.getClientRects();
			if (clientRect && clientRect.length) {
				var rect = clientRect[0];
				if (rect) {
					rect.invalid = validation && !isElementInViewport(rect);
					return rect;
				}
			}
			return getNullArea();
		}
885340
function (elem)
    {
        if (!elem) { return null; }

        var str = "";
        if (elem.childNodes.length === 0 && elem.nodeType ==
            Strophe.ElementType.TEXT) {
            str += elem.nodeValue;
        }

        for (var i = 0; i < elem.childNodes.length; i++) {
            if (elem.childNodes[i].nodeType == Strophe.ElementType.TEXT) {
                str += elem.childNodes[i].nodeValue;
            }
        }

        return Strophe.xmlescape(str);
    }
827100
public function textarea( array $args = [], $implode = false )
	{
		$attributes = $this->parseAttributes( self::TEXTAREA_ATTRIBUTES, $args );

		return $this->maybeImplode( $attributes, $implode );
	}
372513
protected function namespaceAttrs($ele) {
        if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument) {
            $this->xpath = new \DOMXPath($ele->ownerDocument);
        }

        foreach ($this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele) as $nsNode) {
            if (!in_array($nsNode->nodeValue, $this->implicitNamespaces)) {
                $this->wr(' ')->wr($nsNode->nodeName)->wr('="')->wr($nsNode->nodeValue)->wr('"');
            }
        }
    }
1001823
public function getPreviewHtml(BBcodeElementNodeInterface $el)
    {
        if (!$this->hasValidInputs($el)) {
            return $el->getAsBBCode();
        }

        $html = $this->getReplacementText();

        if ($this->usesOption()) {
            $options = $el->getAttribute();
            if (count($options) == 1) {
                $vals = array_values($options);
                $html = str_ireplace('{option}', reset($vals), $html);
            } else {
                foreach ($options as $key => $val) {
                    $html = str_ireplace('{' . $key . '}', $val, $html);
                }
            }
        }

        $content = $this->getPreviewContent($el);
        $html = str_ireplace('{param}', $content, $html);

        return $html;
    }
1295
function (ele) {
            var node = this[0];
            //结点类型判断
            if (node.nodeType === 1 || node.nodeType === 11 || node.nodeType === 9) {
                if(ele instanceof vQ){
                    ele.each(function(inx,ele){
                        node.appendChild(ele);
                    });
                } else if(ele.nodeType){
                    node.appendChild(ele);
                }
                // string array
            }
            return this;
        }
157751
public function getElementsForSearch()
    {
        $oldThemes = SSViewer::get_themes();
        SSViewer::set_themes(SSViewer::config()->get('themes'));
        try {
            $output = [];
            foreach ($this->owner->hasOne() as $key => $class) {
                if ($class !== ElementalArea::class) {
                    continue;
                }
                /** @var ElementalArea $area */
                $area = $this->owner->$key();
                if ($area) {
                    $output[] = strip_tags($area->forTemplate());
                }
            }
        } finally {
            // Reset theme if an exception occurs, if you don't have a
            // try / finally around code that might throw an Exception,
            // CMS layout can break on the response. (SilverStripe 4.1.1)
            SSViewer::set_themes($oldThemes);
        }
        return implode($output);
    }
177152
protected function getPropertyStringValue(\DOMElement $element)
    {
        // If HTML mode is active
        if ($this->html) {
            $value = $this->getPropertyContentAttrValue($element);
            if ($value === null) {
                $value = $this->getPropertyHtmlValue($element);
            }
            if ($value !== null) {
                return $value;
            }
        }

        // Return the text content
        return $element->textContent;
    }
1309024
function get_inner_html( DOMElement $element ) {

        $inner_html= '';

        $children = $element->childNodes;

        foreach ( $children as $child ) {

            $inner_html .= $child->ownerDocument->saveXML( $child );

        }

        return $inner_html;

    }
856743
protected function getActiveTextarea(): string
    {
        return Html::activeTextarea($this->model, $this->attribute, $this->options);
    }
1206148
public function textContent(DOMElement $element, $implied=false)
	{
				return preg_replace(
						'/(^[\t\n\f\r ]+| +(?=\n)|(?<=\n) +| +(?= )|[\t\n\f\r ]+$)/',
						'',
						$this->elementToString($element, $implied)
				);
	}
134619
public static function textarea($name, $body = '', array $attributes = null)
    {
        // Set the input name
        $attributes['name'] = $name;

        // Set the input id
        $attributes['id'] = (isset($attributes['id']))?$attributes['id']:$name;

        return '<textarea'.Html::attributes($attributes).'>'.$body.'</textarea>';
    }
223302
public static function innerXML(DOMElement $element)
	{
		// Serialize the XML then remove the outer element
		$xml = $element->ownerDocument->saveXML($element);
		$pos = 1 + strpos($xml, '>');
		$len = strrpos($xml, '<') - $pos;

		// If the template is empty, return an empty string
		return ($len < 1) ? '' : substr($xml, $pos, $len);
	}
534035
protected function element($element = null)
    {
        return is_null($element)
            ? $this->element
            : ($this->element = $element);
    }