本文整理汇总了PHP中TextareaField::Field方法的典型用法代码示例。如果您正苦于以下问题:PHP TextareaField::Field方法的具体用法?PHP TextareaField::Field怎么用?PHP TextareaField::Field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextareaField
的用法示例。
在下文中一共展示了TextareaField::Field方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Field
function Field($properties = array())
{
Requirements::css(MARKDOWN_BASE . '/css/MarkdownEditorField.css');
Requirements::javascript(MARKDOWN_BASE . '/thirdparty/ace/src-min-noconflict/ace.js');
Requirements::javascript(MARKDOWN_BASE . '/js/MarkdownEditorField.js');
return parent::Field($properties);
}
示例2: testTextEncoding
/**
* Quick smoke test to ensure that text is being encoded properly.
*/
function testTextEncoding()
{
$inputText = "These are some unicodes: äöü";
$field = new TextareaField("Test", "Test");
$field->setValue($inputText);
$this->assertContains('These are some unicodes: äöü', $field->Field());
}
示例3: Field
/**
* @return string
*/
function Field($properties = array())
{
self::include_js($this->markupType, $this->includeCallback);
$settings = ucfirst($this->markupType);
// add JS
Requirements::customScript('jQuery().ready(function () { jQuery("#' . $this->id() . '").markItUp(my' . $settings . 'Settings)});');
return parent::Field($properties);
}
示例4: Field
function Field()
{
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery.js");
Requirements::javascript("dataobject_manager/code/simple_wysiwyg_field/javascript/htmlbox.min.js");
Requirements::javascript("dataobject_manager/code/simple_wysiwyg_field/javascript/xhtml.js");
Requirements::customScript($this->buildJS());
return parent::Field();
}
示例5: Field
public function Field($properties = array())
{
$this->addExtraClass('stacked');
Requirements::javascript(POSTMARK_RELATIVE_PATH . '/thirdparty/quill/quill.min.js');
Requirements::javascript(POSTMARK_RELATIVE_PATH . '/javascript/QuillEditorField.js');
Requirements::css(POSTMARK_RELATIVE_PATH . '/thirdparty/quill/quill.snow.css');
Requirements::css(POSTMARK_RELATIVE_PATH . '/css/QuillEditorField.css');
return parent::Field($properties);
}
示例6: getColumnContent
/**
* HTML for the column, content of the <td> element.
*
* @param GridField $gridField
* @param DataObject $record - Record displayed in this row
* @param string $columnName
* @return string - HTML for the column. Return NULL to skip.
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = new TextareaField('MetaDescription');
$value = $gridField->getDataFieldValue($record, $columnName);
$value = $this->formatValue($gridField, $record, $columnName, $value);
$field->setName($this->getFieldName($field->getName(), $gridField, $record));
$field->setValue($value);
return $field->Field() . $this->getErrorMessages();
}
开发者ID:helpfulrobot,项目名称:littlegiant-silverstripe-seo-editor,代码行数:17,代码来源:SEOEditorMetaDescriptionColumn.php
示例7: Field
function Field($properties = array())
{
$acePath = $this->getAcePath();
Requirements::javascript($acePath . "ace.js");
Requirements::javascript($acePath . "mode-" . $this->getMode() . ".js");
// Requirements::javascript($acePath . "worker-" . $this->getMode() . ".js");
Requirements::javascript("codeeditorfield/javascript/CodeEditorField.js");
Requirements::css("codeeditorfield/css/CodeEditorField.css");
return parent::Field($properties);
}
示例8: Field
/**
* @return string
*/
public function Field($properties = array())
{
// mark up broken links
$value = Injector::inst()->create('HTMLValue', $this->value);
if ($links = $value->getElementsByTagName('a')) {
foreach ($links as $link) {
$matches = array();
if (preg_match('/\\[sitetree_link(?:\\s*|%20|,)?id=([0-9]+)\\]/i', $link->getAttribute('href'), $matches)) {
if (!DataObject::get_by_id('SiteTree', $matches[1])) {
$class = $link->getAttribute('class');
$link->setAttribute('class', $class ? "{$class} ss-broken" : 'ss-broken');
}
}
if (preg_match('/\\[file_link(?:\\s*|%20|,)?id=([0-9]+)\\]/i', $link->getAttribute('href'), $matches)) {
if (!DataObject::get_by_id('File', $matches[1])) {
$class = $link->getAttribute('class');
$link->setAttribute('class', $class ? "{$class} ss-broken" : 'ss-broken');
}
}
}
}
$properties['Value'] = htmlentities($value->getContent(), ENT_COMPAT, 'UTF-8');
return parent::Field($properties);
}
示例9: Field
public function Field($properties = array())
{
// Include requirements
$this->getEditorConfig()->init();
return parent::Field($properties);
}
示例10: Field
public function Field($properties = array())
{
Requirements::javascript(FORM_EXTRAS_PATH . '/javascript/expandable/jquery.expandable.js');
Requirements::javascript(FORM_EXTRAS_PATH . '/javascript/ExpandableTextareaField.js');
return parent::Field($properties);
}
示例11: Field
/**
* @return string
*/
public function Field($properties = array())
{
// Before rendering our field, require our custom script
Requirements::javascriptTemplate("trumbowyg-htmleditor/javascript/trumbowyg-init.js", array('ID' => $this->ID(), "Buttons" => $this->getButtonsJS()));
return parent::Field($properties);
}
示例12: testTextEncoding
/**
* Quick smoke test to ensure that text is being encoded properly.
*/
function testTextEncoding() {
$inputText = "This is my <text>These are some unicodes: äöü&<>";
$field = new TextareaField("Test", "Test");
$field->setValue($inputText);
$this->assertContains('This is my <text>These are some unicodes: äöü&<>', $field->Field());
}
示例13: Field
public function Field($properties = array())
{
return parent::Field($properties);
}
示例14: Field
function Field()
{
Requirements::javascript($this->BaseHref() . "jsparty/jquery/jquery.js");
Requirements::javascript($this->BaseHref() . "dataobject_manager/code/simple_tinymce_field/javascript/tiny_mce/jquery.tinymce.js");
Requirements::javascript($this->BaseHref() . "dataobject_manager/code/simple_tinymce_field/javascript/tiny_mce/tiny_mce.js");
Requirements::customScript($this->buildJS());
return parent::Field();
}
示例15: Field
function Field($properties = array())
{
Requirements::javascript(FORM_EXTRAS_PATH . '/javascript/LimitedTextareaField.js');
return parent::Field($properties);
}