- Posts: 11
COMMUNITY FORUM
adding a WYSIWYG editor as "Extra field"
- truecontact
- Topic Author
- Offline
- New Member
Less
More
15 years 1 week ago #75681
by truecontact
adding a WYSIWYG editor as "Extra field" was created by truecontact
Hi
I want to have some several content text instead of "Intro Text" and "Full Text"
I meant something like this:
How can I add a WYSIWYG editor to Extra field types?
I want to have some several content text instead of "Intro Text" and "Full Text"
I meant something like this:
How can I add a WYSIWYG editor to Extra field types?
Please Log in or Create an account to join the conversation.
- FeSys
- Offline
- Elite Member
Less
More
- Posts: 262
15 years 1 week ago #75682
by FeSys
Replied by FeSys on topic adding a WYSIWYG editor as "Extra field"
+2
Please Log in or Create an account to join the conversation.
- truecontact
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
15 years 1 week ago #75683
by truecontact
Replied by truecontact on topic adding a WYSIWYG editor as "Extra field"
What did you mean?
Followeyes said:+2
Followeyes said:+2
Please Log in or Create an account to join the conversation.
- truecontact
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
15 years 1 week ago #75684
by truecontact
Replied by truecontact on topic adding a WYSIWYG editor as "Extra field"
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?
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?
Please Log in or Create an account to join the conversation.
- Jonathan Heath
- Offline
- New Member
15 years 1 week ago #75685
by Jonathan Heath
Replied by Jonathan Heath on topic adding a WYSIWYG editor as "Extra field"
There have been previous threads on how to do this which helped me (a complete novice) to add an editor to the extra fields - unfortuately I can't find the discussion but if you search you should come across it. I think there was more than one.
If I find it I'll post the link
Jon
If I find it I'll post the link
Jon
Please Log in or Create an account to join the conversation.
- truecontact
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
15 years 6 days ago #75686
by truecontact
Replied by truecontact on topic adding a WYSIWYG editor as "Extra field"
yes
You were right
But I found the solution and post it to that discussion:
Extra WYSIWYG fields
Regards.
S.H.A
Jon Heath said:There have been previous threads on how to do this which helped me (a complete novice) to add an editor to the extra fields - unfortuately I can't find the discussion but if you search you should come across it. I think there was more than one.
If I find it I'll post the link
Jon
You were right
But I found the solution and post it to that discussion:
Extra WYSIWYG fields
Regards.
S.H.A
Jon Heath said:There have been previous threads on how to do this which helped me (a complete novice) to add an editor to the extra fields - unfortuately I can't find the discussion but if you search you should come across it. I think there was more than one.
If I find it I'll post the link
Jon
Please Log in or Create an account to join the conversation.
- FeSys
- Offline
- Elite Member
Less
More
- Posts: 262
15 years 6 days ago #75687
by FeSys
Replied by FeSys on topic adding a WYSIWYG editor as "Extra field"
Sorry .. means I second your idea, and ill try to get it work.
True Contact said:What did you mean?
Followeyes said:+2
True Contact said:What did you mean?
Followeyes said:+2
Please Log in or Create an account to join the conversation.