src/Easy/Element/HTMLPreview.php
public function render()
    {
        $value = $this->text ? $this->getText() : $this->value;
        
        if ($value == null || $value =="")
            return "";

        $style = $this->getStyle();
        $id = $this->objectName;
        $func = $this->getFunction();

        if ($this->translatable == 'Y')
            $value = $this->translateString($value);
        $value_org = strip_tags($value);
        if((int)$this->maxLength>0){
	        if(function_exists('mb_strlen') && function_exists('mb_substr')){
	        	if(mb_strlen($value,'UTF8') > (int)$this->maxLength){
	        		$value = mb_substr($value,0,(int)$this->maxLength,'UTF8').'...';
	        	}        	
	        }else{
	        	if(strlen($value) > (int)$this->maxLength){
	        		$value = substr($value,0,(int)$this->maxLength).'...';
	        	}         	
	        }
        }
        if($this->height)
        {
        	$height = $this->height.'px';
        }
        if ($value!=null)
        {
        	$header = "
        	<head><link href=\"".OPENBIZ_JS_URL."/ckeditor/contents.css\" rel=\"stylesheet\" type=\"text/css\"></head>
        	";
           $sHTML = "
           			<script>".$id."_data=".json_encode($header.$value)."</script>
           			<iframe border=\"0\" frameborder=\"0\" allowtransparency=\"true\"
           				tabIndex=\"-1\" style=\"width:100%;height:$height;background: none repeat scroll 0 0 transparent;border: 0 none;border-collapse: collapse;\"
           				src=\"javascript:setTimeout(%20function()%7Bdocument.open()%3Bdocument.write(%20window.parent%5B%20%22".$id."_data%22%20%5D%20)%3Bdocument.close()%3Bwindow.parent%5B%20%22".$id."_data%22%20%5D%20%3D%20null%3B%7D%2C%20200%20)\">
           			</iframe>
           			";
            
        }

        return $sHTML;
    }
public function render()
    {
        $value = $this->text ? $this->getText() : $this->value;
        
        if ($value == null || $value =="")
            return "";

        $style = $this->getStyle();
        $id = $this->objectName;
        $func = $this->getFunction();

        if ($this->translatable == 'Y')
            $value = $this->translateString($value);
        $value_org = strip_tags($value);
        if((int)$this->maxLength>0){
	        if(function_exists('mb_strlen') && function_exists('mb_substr')){
	        	if(mb_strlen($value,'UTF8') > (int)$this->maxLength){
	        		$value = mb_substr($value,0,(int)$this->maxLength,'UTF8').'...';
	        	}        	
	        }else{
	        	if(strlen($value) > (int)$this->maxLength){
	        		$value = substr($value,0,(int)$this->maxLength).'...';
	        	}         	
	        }
        }
        if($this->height)
        {
        	$height = $this->height.'px';
        }
        if ($value!=null)
        {
        	$header = "
        	<head><link href=\"".OPENBIZ_JS_URL."/ckeditor/contents.css\" rel=\"stylesheet\" type=\"text/css\"></head>
        	";
           $sHTML = "
           			<script>".$id."_data=".json_encode($header.$value)."</script>
           			<iframe border=\"0\" frameborder=\"0\" allowtransparency=\"true\"
           				tabIndex=\"-1\" style=\"width:100%;height:$height;background: none repeat scroll 0 0 transparent;border: 0 none;border-collapse: collapse;\"
           				src=\"javascript:setTimeout(%20function()%7Bdocument.open()%3Bdocument.write(%20window.parent%5B%20%22".$id."_data%22%20%5D%20)%3Bdocument.close()%3Bwindow.parent%5B%20%22".$id."_data%22%20%5D%20%3D%20null%3B%7D%2C%20200%20)\">
           			</iframe>
           			";
            
        }

        return $sHTML;
    }
Render, draw the element according to the mode

@return string HTML text