Hey to all
I'm trying to do it myself but I need some help...
I'm using Joomla 1.5.15 and K2 v2.1
I made this changes to K2 core files:
in file: administrator\components\com_k2\views\extrafield\view.html.php line 51 I added this code:
$typeOptions[] = JHTML::_('select.option', 'editor', JText::_('editor'));
and in administrator\components\com_k2\views\extrafield\tmpl\default.php line 65 I added this codes:
case 'editor':
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;
to add 'editor' type to extra field types
in new extra filed form...
and in administrator\components\com_k2\models\extrafield.php line 183 I added this code:
case 'editor':
$editor =& JFactory::getEditor();
$output=' ';
echo $editor->display('content', $this->content, '550', '400', '60', '20', false);
break;
it almost works like this:
but I can't handle the contents in the editor
any Idea to do that?