Keyword

Extra WYSIWYG fields

More
15 years 8 months ago #68735 by anson parker
Replied by anson parker on topic Extra WYSIWYG fields
vale - hay un problema con el codigo, si, pero hay una solucion - no es perfecto pero funciona para mi...

usando el nuevo codigo que reemplace el codigo original
1) crea un nuevo item con unos campos textarea (ahora debiera ser un campo wysiwyg, aun que no parece ser)
2) guarda el item
3)abrelo de nuevo - los campos textarea ahora seran wysiwyg....

es un poco extrano pero funciona para mi - despues de eso puedes duplicar los items y essos tambien tendran los campos wysiwyg....

es un workaround - falta varias cosas, pero yo lo estoy usando con el JCE y funciona bien.

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

More
15 years 8 months ago #68736 by elinoil
Replied by elinoil on topic Extra WYSIWYG fields
Hi,

did you find any solution?? I would like to have Editor WYSIWYG in add/edit extra field page. I need your help...

I added the folowing code in administrator/components/com_k2/models/extrafield.php (after line 169)
case 'wysiwyg':
$editor =& JFactory::getEditor();
$output = $editor->display("K2ExtraField_".$extraField->id."", $active, '550', '400', '60', '20', false);
break;

I replaced the line 462 in administrator/components/com_k2/models/item.php with the follwing code
$variables = JRequest::get('post',JREQUEST_ALLOWRAW);

i added the following in administrator/components/com_k2/views/extrafield/view.html.php (after line 46)
$typeOptions[] = JHTML::_('select.option', 'wysiwyg', JText::_('Editor WYSIWYG'));

But i don't know what to put in administrator/components/com_k2/views/extrafield/tmpl/default.php after line 57, so i added the following...
case 'wysiwyg':
if (isNewField || currentType!=fieldType)
var textarea = new Element('textarea',{'name':'option_value[]','cols':'40', 'rows':'10'}).injectInside(target);
else
var textarea = new Element('textarea',{'name':'option_value[]','cols':'40', 'rows':'10','value':fieldValues[0].value}).injectInside(target);
var notice = new Element('span').setHTML('()').injectInside(target);
break;

Now, i can see WYSIWYG editor (tinymce) when editing items.
How can i have WYSIWYG editor also in add/edit extra field page? Did you find a solution about the code in administrator/components/com_k2/views/extrafield/tmpl/default.php

thanks



litogeno said:Gracias, perdona mi inglés.... En el panel de administración en el backend. Hay una sección en el panel de control k2 donde se definen los campos extra. Lo que yo quiero es ahí añadir un nuevo campo (como bien tu me has comentado en los posts anteriores) que sea wysiwyg.
El problema es que los cambios que se han comentado servían para todas las partes menos para esta en concreto, ya que
en esta sección (en la que defino los campos adicionales) no interviene el fichero extrafield.php y sí el de la ruta que antes he indicado (
administrator/components/com_k2/views/extrafield/tmpl/default.php). Es posible que esté equivocado pero
cambiando extrafield.php no se consigue nada para poner el editor aquí.

Espero haberme explicado algo mejor y muchas gracias por tu ayuda
Un saludo



anson parker said:la verdad es que no se lo que quieres - dilo en espanol si quieres - veo lo que esta en el foto, y creo que en cambiar extrafield tendras los cambios que necesitas....

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

More
15 years 8 months ago #68737 by elinoil
Replied by elinoil on topic Extra WYSIWYG fields
Unfortunately it doesn't work at frontend... I have attached screenshots from backend and frontend...
It doesn't show the text i have written inside the editor, insteed it shows a broken link " < " to mydomain.com/p (i don't know what 'p' is)...
I tried also with an image but the same happened (this is what i want to accomplish - a litle image icon in additional info table on frontend)


I am confused...Do you have any idea why this happening?

thanks

elina said:
Attachments:

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

More
15 years 7 months ago #68738 by truecontact
Replied by truecontact on topic Extra WYSIWYG fields
I'm also have the same problem...

can any one help us?

elina said:Unfortunately it doesn't work at frontend... I have attached screenshots from backend and frontend... It doesn't show the text i have written inside the editor, insteed it shows a broken link " < " to mydomain.com/p (i don't know what 'p' is)...
I tried also with an image but the same happened (this is what i want to accomplish - a litle image icon in additional info table on frontend)


I am confused...Do you have any idea why this happening?

thanks

elina said:

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

More
15 years 7 months ago #68739 by troponin
Replied by troponin on topic Extra WYSIWYG fields
thumbs up !!!

anson parker said:SCORE!Dear Admins - you might want to sticky those two fields listed above.

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

More
15 years 7 months ago #68740 by truecontact
Replied by truecontact on topic Extra WYSIWYG fields
I found the solution!!!!

in components\com_k2\models\item.php (frontend) line 746
just add this code...
if ( $rows[$i]->type=='wysiwyg' ){
$value=$object->value;
}
it worked for me!

--
S.H.A

True Contact said:I'm also have the same problem... can any one help us?
elina said:Unfortunately it doesn't work at frontend... I have attached screenshots from backend and frontend... It doesn't show the text i have written inside the editor, insteed it shows a broken link " < " to mydomain.com/p (i don't know what 'p' is)... I tried also with an image but the same happened (this is what i want to accomplish - a litle image icon in additional info table on frontend)
I am confused...Do you have any idea why this happening?

thanks

elina said:

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

More
15 years 7 months ago #68741 by tarik916
Replied by tarik916 on topic Extra WYSIWYG fields
This would be a great addition! I used the hack, but noticed some JS errors elsewhere on the edit screen (using JCE) because of it, so I reverted back to non WYSIWYG. I told my customer to format their stuff in the first box, view source and copy to the extra field.

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

More
15 years 5 months ago #68742 by Peter Haupt
Replied by Peter Haupt on topic Extra WYSIWYG fields
Hi, I'm trying to enter an iframe-Tag into the HTML-Editor of my extrafield. Unfortunately the tag isn't saved.

Can anybody help me please!

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

More
15 years 5 months ago #68743 by Szymon Kulik
Replied by Szymon Kulik on topic Extra WYSIWYG fields
Hi FaïWoueb And many thanks. Your hack from #11 comment is working. But i'm wondering on one thing... When you add some new "clean" article, you choose correct category (with extraFields set) for it . In this case JCE don't load for extraFields. You must save this clean article and back to it then JCE editor will load. What do you think? You must to hack : administrator\components\com_k2\views\item\tmpl\default.php somehow?
I'm newbie so sorry for simple quastion in manner "somehow"

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

More
15 years 5 months ago #68744 by BBC
Replied by BBC on topic Extra WYSIWYG fields

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

More
15 years 5 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 4 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 4 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 4 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 3 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 2 months 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 2 months 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 2 months 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 2 months 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
15 years 2 weeks 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.


Powered by Kunena Forum