本文整理汇总了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