Jump to content


"Bug" Fix for WYSIWYG Editor


  • You cannot reply to this topic
No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 13 September 2004 - 01:37 AM

"Bug" Fix for WYSIWYG Editor

Problem: When you use the WYSIWYG editor that comes packaged with MKPortal to add local images (such as MKGallery images) to internal pages (pid) the image does not display on the actual internal page.

The image displays just fine if you edit the html source (and if you don't preview) instead of using the WYSIWYG editor but if you use the editor it does not display in the internal page.

The problem is the editor javascript itself. It is changing the full URL to a relative URL. But the URL is relative to the /mkportal/ directory and not to the "root" directory where index.php is and where the pid pages display.

I found a solution on this thread for IE.
http://www.interacti....cgi?post=33616


FIND:

/mkportal/editor/htmlarea.js said:

// strip to last directory in case baseurl points to a file
baseurl = baseurl.replace(/[^\/]+$/, '');
var basere = new RegExp(baseurl);
string = string.replace(basere, "");

Comment out these lines like this...
FIND:

/mkportal/editor/htmlarea.js said:

// strip to last directory in case baseurl points to a file
// baseurl = baseurl.replace(/[^\/]+$/, '');
// var basere = new RegExp(baseurl);
// string = string.replace(basere, "");


It seems to be working for me.

-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users