Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

HTMLEditor Field in frontend (SS3)


Go to End


8 Posts   3777 Views

Avatar
JonShutt

Community Member, 244 Posts

23 August 2012 at 11:10am

Using ss3, I have a form with an html editior field, but nothing shows up.

If i paste in all the links to js and css files that the admin area uses, it shows up file.
This makes me think SS3 is missing a few JS links when using the HTMLeditor field in a form - and it's not being enables...

possible a bug?

Avatar
JonShutt

Community Member, 244 Posts

23 August 2012 at 11:34am

actually, just seems it's missing a bit...

<script type="text/javascript">

tinyMCE.init({
theme : "advanced",
mode: "textareas",
theme_advanced_toolbar_location : "top",
theme_advanced_buttons1 : "formatselect,|,bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,separator,undo,redo",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
height:"250px",
width:"400px"
});

</script>

adding this to the template initiallized thed editor, but I think it should be doing this anyway without having to add manually...

Avatar
Willr

Forum Moderator, 5523 Posts

24 August 2012 at 9:51pm

Good find, you may want to raise this as a ticket on open.silverstripe.org.

Avatar
Harley

Community Member, 165 Posts

6 June 2013 at 3:50am

Hi there,

I've just come across this problem too, just wondering if this has been resolved?

Regards

Avatar
purplespider

Community Member, 89 Posts

7 December 2013 at 6:08am

I too am having trouble getting HTMLEditorField working in the frontend on SS3.1.

Is there a solution?

Avatar
Willr

Forum Moderator, 5523 Posts

11 December 2013 at 9:00pm

Purplespider, more than the solution described above??

Avatar
Vix

Community Member, 60 Posts

28 January 2014 at 8:16pm

I am having issues with getting the editor to work in the front end also, but my issue is that when the form is submitted the data from the HTMLEditorField does not get passed through. If I change the field to a plain textarea it is fine.

I have already started a topic here: http://www.silverstripe.org/form-questions/show/36948 and tried the solution offered with no luck.

Really hoping someone could shed some more light on the situation

Avatar
colymba

Community Member, 26 Posts

18 March 2014 at 1:05am

With SS3, HTMLEditorField requires an instance of HtmlEditorField_Toolbar, this is done automatically by the cms but in the frontend you have to implement it yourself. See the doc here:

http://doc.silverstripe.org/framework/en/topics/rich-text-editing#using-the-editor-outside-of-the-cms