Hi
I am trying to use webloginPE to create a listing directory and have added several custom fields for the detail of the listings.
However, the question I have at the moment is, how could I make a field, e.g. description, a rich text field or somehow allow some formatting in the field like paragraphs etc.
This would need to be done on the update profile form. At the moment any entry just gets shown as 1 long line of text.
Any ideas or pointers?
Regards
Mark
-
☆ A M B ☆
- 24,524 Posts
It is possible to use TinyMCE in a snippet. You just need to have the textarea, and have the javascript that loads Tiny into the form in its place.
That is brilliant!!
For the benefit of others I simply had to add the following code to my profileTpl template
<script type="text/javascript" src="assets/plugins/tinymce3101/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "simple"
});
</script>
and make sure the fields you want to use the editor in are set as ’textarea’
This gives me a cut down editor with just the basic text tools, no image insert etc
Thanks again Sottwell!
-
☆ A M B ☆
- 209 Posts
Do watch out for the security implications of doing this, as unless you have some HTML filtering going on behind the scenes (e.g. HTMLPurifier linked in) then your users can inject *any* HTML into your website - including malicious Javascript.