本文整理匯總了PHP中HtmlEditorField::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP HtmlEditorField::__construct方法的具體用法?PHP HtmlEditorField::__construct怎麽用?PHP HtmlEditorField::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HtmlEditorField
的用法示例。
在下文中一共展示了HtmlEditorField::__construct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct($name, $title = null, $value = '')
{
parent::__construct($name, $title, $value);
$this->rows = 5;
// The .htmleditor class enables TinyMCE
$this->addExtraClass('htmleditor');
}
示例2: __construct
/**
* @see TextareaField::__construct()
*/
public function __construct($name, $title = null, $value = '')
{
parent::__construct($name, $title, $value);
$this->extraClasses[] = 'htmleditor';
self::include_js();
}
示例3: __construct
/**
* @see TextareaField::__construct()
*/
public function __construct($name, $title = null, $value = '')
{
parent::__construct($name, $title, $value);
$this->extraClasses[] = 'htmleditor';
HtmlEditorConfig::require_js();
// when updating the resampled image, find the orginal.
// ideally this would live server side in HtmlEditorField_Toolbar(), however
// injecting it with a function would be overkill.
Requirements::customScript("\n(function(\$) {\n\t\$.entwine('ss', function(\$) {\n\t\t\$('form.htmleditorfield-form').entwine({\n\t\t\tupdateFromEditor: function() {\t\t\n\t\t\t\tvar self = this, node = this.getSelection();\n\t\t\t\tif(node.is('img')) {\n\t\t\t\t\tmyfixurl = node.data('url') || node.attr('src');\n\t\t\t\t\tmyfixurl = myfixurl.replace('-10x', '');\n\t\t\t\t\tmyfixurl = myfixurl.replace(/_resampled\\/(.+)\\//, '');\n\t\t\t\t\tnode.attr('src', myfixurl);\n\t\t\t\t}\n\t\t\t\tthis.redraw();\n\t\t\t\tthis._super();\n\t\t\t},\n\t\t});\n\t});\n})(jQuery);");
}
示例4: __construct
public function __construct($name, $title = null, $value = '')
{
parent::__construct($name, $title, $value);
HtmlEditorConfig::require_js();
Requirements::customScript("ssTinyMceConfig.mode = 'specific_textareas';ssTinyMceConfig.editor_selector='frontendhtmleditor';tinyMCE.init(ssTinyMceConfig);");
}
開發者ID:helpfulrobot,項目名稱:andrelohmann-silverstripe-legacyfields,代碼行數:6,代碼來源:FrontendHtmlEditorField.php