- Posts: 663
COMMUNITY FORUM
Extra WYSIWYG fields
- BBC
-
- Offline
- Platinum Member
Please Log in or Create an account to join the conversation.
- Simone Giacometti
-
- Offline
- New Member
- Posts: 8
$editor =& JFactory::getEditor();
$output = $editor->display("K2ExtraField_".$extraField->id."", $active, '550', '400', '60', '20', false);
This will give you a text editor when you select a field of type text area.
It works in front end editing, V2.2.
Please Log in or Create an account to join the conversation.
- Ian Powney
-
- Offline
- New Member
- Posts: 11
Did you ever find out if you could use joomla plugin tags in the extra fields?
All I get is the code displayed
lee said:If we get a text area with the editor working can the text entered into this area also be made to picked up by any joomla plugins? eg. I have a plugin that picks up any {audio},{/audio} tags and inserts an audio player in its place. I would like to be able to use these tags in one of the extra fields but the plugin seems to have no effect on extra fields - only in the article text itself?
Please Log in or Create an account to join the conversation.
- Hans Trautmann
-
- Offline
- New Member
- Posts: 4
would like to ask for the Feature "WYSIWYG" in the text field (Backend). What I understand in this discussion is:
This Feature is also not available in Version 2.2. Right ??
Is there any "trick" to get this (importend) feature in Version 2,2 ????
Is there a Timeline to include WYSIWYG ?
Thanks for any reply / help
Greetings Hans
Please Log in or Create an account to join the conversation.
- Mark Banks
-
- Offline
- Premium Member
- Posts: 100
Good news!!!
Please Log in or Create an account to join the conversation.
- lee Wilson
-
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Georgopoulos Sotirios
-
- Offline
- New Member
- Posts: 7
The first part is pretty easily solved by searching the forum.
The second was a pain.
Lee Wilson said:Running latest JCE and K2 v2.2... This fix does not work... shame. Will have to look at Zoo me thinks.....
Please Log in or Create an account to join the conversation.
- AdrianK
-
- Offline
- Senior Member
- Posts: 46
Please Log in or Create an account to join the conversation.
- Georgopoulos Sotirios
-
- Offline
- New Member
- Posts: 7
Lost a lot of time trying that way and i still don't know what went wrong.
What i finally did was to inject all the textarea extrafields my own way keeping field names.
If someone has succeeded in using the native method of injection please post or send a pm.
Titus said:First, WYSIWYG is a function, not a field. When you use the tinymce or the tinymce clone JCE, you have only to attach a single Id and Class to th HTML an you got an editor for a textarea (tinymce is jquerry driven).
Please Log in or Create an account to join the conversation.
- Hans Trautmann
-
- Offline
- New Member
- Posts: 4
you have only to attach a single Id and Class to th HTML
??? would be nice to get a short information how we can manage this.
hopi
Titus said:First, WYSIWYG is a function, not a field. When you use the tinymce or the tinymce clone JCE, you have only to attach a single Id and Class to th HTML an you got an editor for a textarea (tinymce is jquerry driven).
Please Log in or Create an account to join the conversation.
- Alan Sparkes
-
- Offline
- Premium Member
- Posts: 118
The hack code
if ( $rows[$i]->type=='wysiwyg' ){
$value=$object->value;
}
is for front end /model/item.php
Whereas the code:
$variables = JRequest::get('post',JREQUEST_ALLOWRAW);
is for the backend admin model/item.php (on mine this is line 492)
hth
Please Log in or Create an account to join the conversation.
- Keegan Green
-
- Offline
- New Member
- Posts: 4
1/ Edit the administrator/components/com_k2/models/extrafield.php file
Line 186 :
Replace :
$output='';
With :
$editor =& JFactory::getEditor();
$output = $editor->display("K2ExtraField_".$extraField->id."", $active, '550', '400', '60', '20', false);
2/ Edit the administrator/components/com_k2/models/item.php file
Line 491 :
Replace :
$variables = JRequest::get('post');
with :
$variables = JRequest::get('post',JREQUEST_ALLOWRAW);
fidelis semper said:Well done.. has anybody even seen this? Thank you FaïWoueb, this works!!!! yo urock. thank you to K2!
FaïWoueb said:I found a solution ! 1/ Edit the administrator/components/com_k2/models/extrafield.php file
Line 164 :
Replace :
$output='';
By :
$editor =& JFactory::getEditor();
$output = $editor->display("K2ExtraField_".$extraField->id."", $active, '550', '400', '60', '20', false);
2/ Edit the administrator/components/com_k2/models/item.php file
Line 462 :
Replace :
$variables = JRequest::get('post');
By :
$variables = JRequest::get('post',JREQUEST_ALLOWRAW);
... and that's all folks.
Please Log in or Create an account to join the conversation.
- normdouglas
-
- Offline
- New Member
- Posts: 18
Essentially I don't care about a WYSIWYG, rather I wanted to be able to use HTML inside a field without it being stripped.
The above solution worked for me, thanks.
Please Log in or Create an account to join the conversation.
- FaïWoueb
-
- Offline
- New Member
- Posts: 2
I'm happy to discover that in the last release (v 2.4.1), now it's possible to have a wysiwyg editor for extrafields.
But ... it remains 1 problem, the HTML is not save.
I keep my solution founded 1 year ago :
In the file "administrator/components/com_k2/models/item.php",
replace
$variables = JRequest::get('post', 4); - line 510 -
by
$variables = JRequest::get('post',JREQUEST_ALLOWRAW);
FaïWoueb said:I found a solution !
1/ Edit the administrator/components/com_k2/models/extrafield.php file
Line 164 :
Replace :
$output='';
By :
$editor =& JFactory::getEditor();
$output = $editor->display("K2ExtraField_".$extraField->id."", $active, '550', '400', '60', '20', false);
2/ Edit the administrator/components/com_k2/models/item.php file
Line 462 :
Replace :
$variables = JRequest::get('post');
By :
$variables = JRequest::get('post',JREQUEST_ALLOWRAW);
... and that's all folks.
Please Log in or Create an account to join the conversation.
- Jock
-
- Offline
- Premium Member
- Posts: 90
I am having troubles adding {gallery},{/gallery} code to extra fields in K2 2.4.1 ... it is just outputting the syntax. It works fine on the content tab but not the extra field tab?
Anyone know what I can try ... I've tried most of the above, what am I missing?
Please Log in or Create an account to join the conversation.
- Maurizio Peisino
-
- Offline
- New Member
- Posts: 3
1/ Edit the administrator/components/com_k2/models/extrafield.php fileLine 208:Replace :$output='<textarea name="K2ExtraField_'.$extraField->id.'" id="K2ExtraField_'.$extraField->id.'" rows="10" cols="40" class="k2ExtraFieldEditor">'.$active[0].'</textarea>';By :$editor =& JFactory::getEditor();$output = $editor->display("K2ExtraField_".$extraField->id."", $active[0], '550', '400', '60', '20', false);2/ Edit the administrator/components/com_k2/models/item.php fileLine 511:Replace :$variables = JRequest::get('post');By :$variables = JRequest::get('post',JREQUEST_ALLOWRAW);
Steve said:
I've been able to get the editor to show up using FaïWoueb's solution, but unfortunately NOTHING will save. The solo word "Array" appears in the text area and cannot be overwritten. Any idea what could be going on? I'm using k2 2.3.
Please Log in or Create an account to join the conversation.