Mibew Messenger Community

General => General Discussion => Topic started by: sddzcuigc on August 01, 2013, 03:43:07 AM

Title: Question: How can I change the textarea editor to another .example:tinymce
Post by: sddzcuigc on August 01, 2013, 03:43:07 AM
Hi ,everyone.
I wanna to change the current message editor to a more powerful editor ,for example:
You can see a demo at
http://lnmp.ladyidiy.com/webim/   admin: admin password:apple0131
http://lnmp.ladyidiy.com/webim/client.php
http://lnmp.ladyidiy.com/webim164/   admin:admin password:(no password)
http://lnmp.ladyidiy.com/webim164/client.php

The problem's after I typed in the new editor. I can't get the message sent.
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: ChrisS on August 01, 2013, 08:44:27 AM
Its because the wysiwyg editor you have added  is using it's own textarea & not the messengers.

Personally, I don't see the point in having a full blown editor in a chat box.

Regards
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: sddzcuigc on August 01, 2013, 08:53:24 AM
I just need the emotion and picture uploading function. And I use the same textarea id and name "msgwnd".
And what should I do if I have to replace the old  to the new editor.
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: Dmitriy Simushev on August 01, 2013, 03:39:02 PM
Hi,

You cannot use any markup in message: it will be cutted at server side.

I'm afraid but in Mibew 1.6.4/1.6.5 there is no way to do what you want.

New version of Mibew will provide an API for custom plugins. If you OK with unstable products,
you can fork Mibew at Github and try to implement functionality you want as a plugin.

Best regards,
Dmitriy
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: sddzcuigc on August 02, 2013, 03:06:05 AM
I notice that I need to change the PHP functions to make the text area can contain html.
I wonder if there are developer docs for us to change the project.
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: faf on August 02, 2013, 06:58:13 AM
I notice that I need to change the PHP functions to make the text area can contain html.
I wonder if there are developer docs for us to change the project.

No, unfortunately at present time there are no any docs or manuals.

Though it will be included into the project's roadmap that soon to be published.
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: sddzcuigc on August 02, 2013, 07:55:04 AM
I will wait the moment. However I would like to do some custom change.
For example:
1) MultiLevel Group.

First:GroupLevel1 [SelectOption] --GroupLevel2 [SelectOption]-- Operators.

Second:Message/Chat with related operators.

2) Message not only plain text.

You can change to any editors. You can enter whatever message  just like you reply in this fourm. :) :)AAA

3)Auto Reply.

Can add customed answer to questions to a FAQ system.
Robot can autometicly answer people's FAQs.
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: sddzcuigc on August 02, 2013, 07:58:18 AM
Can you give me some advice about which files I need to change as I notice this MCV php project's beauty.
I will work on it for a week to let it work for my purpose. I wish you guys could give me some advice.Thanks for all.
Regards Cui.
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: faf on August 02, 2013, 05:54:57 PM
Can you give me some advice about which files I need to change as I notice this MCV php project's beauty.
I will work on it for a week to let it work for my purpose. I wish you guys could give me some advice.Thanks for all.

Well, actually, it's almost impossible to give you an irrefragable answer to your question. 'cause in this case the answer would mean that we've already found a way to solve your troubles.  ;)

Probably, you should look into libs/chat.php, libs/groups.php, libs/operator.php, operator/group.php, operator/groups.php, operator/groupmembers.php, operator/opgroups.php, operator/update.php, views/group.php, views/groups.php, views/operator_groups.php. And into chat.js for browser-side modifications. And into some templates in styles/<your theme>.

So, if we talk about Mibew 1.6.x, you'll have to rewrite a lot of code to achieve what you want.
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: sddzcuigc on August 03, 2013, 01:16:06 AM
Thanks for your advice. 
Regards.
Cui. :)
Title: Re: Question: How can I change the textarea editor to another .example:tinymce
Post by: faf on August 03, 2013, 08:34:18 AM
Thanks for your advice. 

You're welcome.  :)

And tell us, if you'll succeed. We're curious. ;)