mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FEATURE: Allow use of tiny mce on front end
This commit is contained in:
parent
8e708d98a7
commit
4c5f0e1075
@ -1 +1,3 @@
|
||||
<?php
|
||||
|
||||
?>
|
||||
|
@ -295,15 +295,21 @@ class BlogHolder_Controller extends Page_Controller {
|
||||
$codeparser = new BBCodeParser();
|
||||
$membername = Member::currentMember() ? Member::currentMember()->getName() : "";
|
||||
|
||||
if(BlogEntry::$allow_wysiwyg_editing) {
|
||||
$contentfield = new HtmlEditorField("BlogPost", _t("BlogEntry.CN"));
|
||||
} else {
|
||||
$contentfield = new CompositeField(
|
||||
new LiteralField("BBCodeHelper","<a id=\"BBCodeHint\" target='new'>"._t("BlogEntry.BBH")."</a><div class='clear'><!-- --></div>" ),
|
||||
new TextareaField("BlogPost", _t("BlogEntry.CN"),20), // This is called BlogPost as the id #Content is generally used already
|
||||
new LiteralField("BBCodeTags","<div id=\"BBTagsHolder\">".$codeparser->useable_tagsHTML()."</div>")
|
||||
);
|
||||
}
|
||||
|
||||
$fields = new FieldSet(
|
||||
new HiddenField("ID", "ID"),
|
||||
new TextField("Title",_t('BlogHolder.SJ', "Subject")),
|
||||
new TextField("Author",_t('BlogEntry.AU'),$membername),
|
||||
new CompositeField(
|
||||
new LiteralField("BBCodeHelper","<a id=\"BBCodeHint\" target='new'>"._t("BlogEntry.BBH")."</a><div class='clear'><!-- --></div>" ),
|
||||
new TextareaField("BlogPost", _t("BlogEntry.CN"),20), // This is called BlogPost as the id #Content is generally used already
|
||||
new LiteralField("BBCodeTags","<div id=\"BBTagsHolder\">".$codeparser->useable_tagsHTML()."</div>")
|
||||
),
|
||||
$contentfield,
|
||||
new TextField("Tags","Tags"),
|
||||
new LiteralField("Tagsnote"," <label id='tagsnote'>"._t('BlogHolder.TE', "For example: sport, personal, science fiction")."<br/>" .
|
||||
_t('BlogHolder.SPUC', "Please separate tags using commas.")."</label>")
|
||||
|
Loading…
Reference in New Issue
Block a user