sendMessage Question RE oddity

8 posts by 2 authors in: Forums > CMS Builder
Last Post: August 15, 2013   (RSS)

By gregThomas - July 31, 2013

Hi Steve,

I just want to confirm I'm understanding this correctly before I suggest anything :) . So users are creating content in an textarea that is being converted to WYSIWYG editor using nicEdit.js in the front end of the site, and then this content is being e-mailed to your client using the sendMessage function. Is this data stored in CMS Builder at all? Could someone have edited the content in CMS Builder before the content is sent in an e-mail?

I've had a quick look around sendMessage function, it doesn't look as if it edits the contents of the HTML in anyway before sending. 

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Steve99 - July 31, 2013

Hi Greg,

Yes, that is correct. No, the data is not stored in CMSB.

This simple "eBlast" form is used by a board member of a home owners association to send notifications to all residents (site utilizes the membership module - each resident has a profile). It consists of one text field for a subject line and one textarea for content that is using the most trimmed down instance of nicEdit.js.

I've also searched the database to see if they had possibly posted this message in the residents area of the site as well, but they did not (rules out entering it through TinyMCE WYSIWYG editor and copying into front end textarea for "eBlast").

As far as the sendMessage function is concerned, and as you verified, I wouldn't see why anything from TinyMCE would be referenced at all - especially since the specific file that conditional exists in has to do with handling pasting content.

So I guess with that being said, I'm left scratching my head  :)  Since the CMSB library is being loaded, do you think there might be a conflict between nicEdit and TinyMCE such as function names or something?

Thanks again, Greg.

Steve

By gregThomas - August 1, 2013

Hi Steve,

Including the viewer functions on a page and using the sendMessage function won't call any of the tinyMCE code, you have to specifically call a couple of functions to get  tinyMCE to load. You could try using a regular expression to remove the comments from your html code before you send it:

$htmlCode = preg_replace('/<!--(.|\s)*?-->/', '', $htmlCode);

You could also try asking in the nicEdit forum and site to see if they have any suggestions.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Steve99 - August 1, 2013

Hi Greg,

Okay, thanks for the background info and suggestion.

Thanks again!

Steve

By Steve99 - August 12, 2013

Greg,

After further research it appears that this is related directly to Microsoft Word and Outlook. It just so happened to have the same name as used in TinyMCE. Also, it doesn't appear to happen every time and others have reported the same experience in various forums. Just thought I'd share this info.

Steve

By gregThomas - August 13, 2013

Hi Steve,

Thanks for the feedback, I'll bear that in mind if the issue comes up again.

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Results - the issue had nothing to do with sendMessage function or TinyMCE

By Steve99 - August 15, 2013

Hi Greg,

Sure thing. After this had occurred (a week or so), I had noticed the exact same conditional appear around the unordered list of a regular email message. This standard email message was drafted and sent from MS Outlook 2007 and received by the latest version of Mozilla Thunderbird. That discovery is what led to my final findings.

Due to the end result, perhaps this thread should get moved to the off topic section. I appreciate your assistance on dismissing any correlation with the experienced issue and any part of CMSB.

Cheers,

Steve