Keyword

K2 comments (use editor instead of textarea)

  • Michael Gulyaev
  • Michael Gulyaev's Avatar Topic Author
  • Offline
  • New Member
More
8 years 8 months ago #150549 by Michael Gulyaev
K2 comments (use editor instead of textarea) was created by Michael Gulyaev
Good day. I want to use editor in comments instead of textarea.

I tried to do something - place this code:

<?php $editor =& JFactory::getEditor(); echo $editor->display('commentText', $editor->commentText, '100%', '400', '170', '20');?><?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?>

instead of

<textarea rows="20" cols="10" class="inputbox" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?>') this.value='';" name="commentText" id="commentText"><?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?></textarea>

Editor is appeared. But i can't use it. Only after second click to button "send" the comment is sending. But bbcodes don't work. But i want to use them in comments.

Can anyone help to me?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150557 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 comments (use editor instead of textarea)
The code will be stripped once the comment is being submitted.
In order to change the comments' functionality, you need to do with an extension or a K2 plugin. You can look for an extension in the JED or getk2.org/extend/

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum