Keyword

Extra WYSIWYG fields

More
15 years 3 months ago #68745 by BBC
Replied by BBC on topic Extra WYSIWYG fields

Please Log in or Create an account to join the conversation.

More
15 years 3 months ago #68746 by Simone Giacometti
Replied by Simone Giacometti on topic Extra WYSIWYG fields
The easiest thing to do is put the following under case 'textarea' in extrafield.php:

$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.

More
15 years 3 months ago #68747 by Ian Powney
Replied by Ian Powney on topic Extra WYSIWYG fields
Hi Lee

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.

More
15 years 2 months ago #68748 by Hans Trautmann
Replied by Hans Trautmann on topic Extra WYSIWYG fields
Hallo,

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.

More
15 years 2 months ago #68749 by Mark Banks
Replied by Mark Banks on topic Extra WYSIWYG fields
Looking at the current code repository for 2.3, it looks like an option has been included to use wysiwig editors on extra text fields if required..
Good news!!!

Please Log in or Create an account to join the conversation.

More
15 years 1 month ago #68750 by lee Wilson
Replied by lee Wilson on topic Extra WYSIWYG fields
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.

  • Georgopoulos Sotirios
  • Georgopoulos Sotirios's Avatar
  • Offline
  • New Member
More
15 years 1 month ago #68751 by Georgopoulos Sotirios
Replied by Georgopoulos Sotirios on topic Extra WYSIWYG fields
I have implemented wysiwyg inthe backend with the wysiwyg also inside joomfish.
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.

More
15 years 3 weeks ago #68752 by AdrianK
Replied by AdrianK on topic Extra WYSIWYG fields
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.

  • Georgopoulos Sotirios
  • Georgopoulos Sotirios's Avatar
  • Offline
  • New Member
More
15 years 3 weeks ago #68753 by Georgopoulos Sotirios
Replied by Georgopoulos Sotirios on topic Extra WYSIWYG fields
I actually knew that ;) but when i used the original K2 method of injecting data inside joomfish after implementing my changes to the code they didn't appear in joomfish at all.
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.

More
14 years 11 months ago #68754 by Hans Trautmann
Replied by Hans Trautmann on topic Extra WYSIWYG fields
Hello,

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.

More
14 years 10 months ago #68755 by Alan Sparkes
Replied by Alan Sparkes on topic Extra WYSIWYG fields
For anybody not quite getting the expected results this might help

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.

More
14 years 10 months ago #68756 by Keegan Green
Replied by Keegan Green on topic Extra WYSIWYG fields
Has this been added to the latest k2? It doesn't seem like it has, I have k2 v2.2 and Joomla 1.5.17. I managed to get it working, but the lines to replace are a bit different:

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.

More
14 years 9 months ago #68757 by normdouglas
Replied by normdouglas on topic Extra WYSIWYG fields
Just for someone else finding this (A STICKY PERHAPS?)... the above solution is what I needed.
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.

More
14 years 7 months ago #68758 by FaïWoueb
Replied by FaïWoueb on topic Extra WYSIWYG fields
Hello !

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.

More
13 years 10 months ago #68759 by Jock
Replied by Jock on topic Extra WYSIWYG fields
Hi,

 

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.

More
13 years 7 months ago #68760 by Maurizio Peisino
Replied by Maurizio Peisino on topic Extra WYSIWYG fields
You just need to take $active[0] instead of $active, these changes work for me:

 

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.


Powered by Kunena Forum