1
Ruddle
WF-Sections WYSIWYG Bug
  • 2003/12/4 13:29

  • Ruddle

  • Just popping in

  • Posts: 61

  • Since: 2003/11/10


I posted a question on this before and Catzwolf replied that the WYSIWYG editor in WF-Sections shouldn't be using the AddTable.htm file to create tables. But it is... Catzwolf, what am I missing?? My wife says I don't have a clue most of the time... perhaps this is one of my "senior moments"!

The following line of code is in the /modules/wfsection/include/wysiwygeditor.php file:

<img style="cursor:hand;" src="<?=XOOPS_URL?>/modules/<?php echo $GLOBALS['drname']?>/images/wysiwyg/table.gif" align="middle" border="0" alt="Link to external site" onClick="addTable()" />

This line calls the following function...

function addTable()
{
ReturnValue=window.showModalDialog("AddTable.htm","","dialogWidth=310px;dialogHeight=150px;status=0");
if(ReturnValue && ReturnValue!="") pasteHTML(ReturnValue);
}


The AddTable.htm files does not exist. Has anyone else encountered this problem? Is there a workaround? Was there a file update I missed?

Is there any status on when WF-Sections might be rolling out the inclusion of the SPAW editor?

Thanks much!
Rick

2
Catzwolf
Re: WF-Sections WYSIWYG Bug
  • 2003/12/20 5:56

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Erm...no, you can tell your wife that you are not having one of those moments

I should have removed that link before hand So you can stop looking lol

We are still working on the next version of WF at the moment, no timeframe as yet sorry!

3
disky
Re: WF-Sections WYSIWYG Bug
  • 2003/12/29 23:16

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hi there

Sorry to mix in,

How to get tha adding a table to work ?

Best regards
Disky

4
Ruddle
Re: WF-Sections WYSIWYG Bug
  • 2003/12/31 16:55

  • Ruddle

  • Just popping in

  • Posts: 61

  • Since: 2003/11/10


Didn't.

Switched to TinyContent. That uses the Spaw Editor and it works nicely. I like the categorization of WF-Sections but I needed the flexibility of adding tables via wysiwyg.

Catzwolf is suppoed to come out with an upgraded version of wf-sections with the Spaw editor in the future but don't know when. I needed to get the content finished right away!

Rick

5
disky
Re: WF-Sections WYSIWYG Bug
  • 2004/1/1 15:03

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Thanks for the tip, i'll take a look at tinysection.

6
paola
Re: WF-Sections WYSIWYG Bug
  • 2004/7/8 14:37

  • paola

  • Just popping in

  • Posts: 1

  • Since: 2004/7/8 1


Hello, what I did is the following:
1. I created the AddTable.htm file in the \modules\wfsection dir (code follows;

<HTML>
<HEAD>

<TITLE>Insert Table</TITLE>
<style> td,a,input,select{font-size:9pt}</style>
<script>
function Ok(control,Name,Min,Max)
{
var t= parseInt(control.value);
if (isNaN(t))
{ alert(Name+"Invaild Input");
control.select();
control.focus();
return(null);
}
if(t<Min)
{ alert(Name+"Must larger or equal to "+Min);
control.select();
control.focus();
return(null);
}
if(t>Max)
{ alert(Name+"Must smaller or equal to "+Max);
control.select();
control.focus();
return(null);
}
return(t);
}

function ClickOk()
{
var s;
var i;
var j;
var t=document.Edit;
var iHeight=Ok(t.iHeight,"Row",1,50);
if(iHeight==null) return(false);
var iWidth=Ok(t.iWidth,"Column",1,50);
if(iWidth==null) return(false);
var CellPadding=Ok(t.CellPadding,"Cell Padding",0,100);
if(CellPadding==null) return(false);
var CellSpacing=Ok(t.CellSpacing,"Cell Spacing",0,100);
if(CellSpacing==null) return(false);
var Width=Ok(t.Width,"Table Width",1,2000);
if(Width==null) return(false);
var Border=Ok(t.Border,"Border ",0,100);
if(Border==null) return(false);
var Unit=t.Unit.value;
s="<table width=" +Width+Unit+ " cellspacing="+CellSpacing+" cellpadding="+CellPadding+" border=" + Border +">"
for(i=1 ;i<=iHeight;i++)
{ s=s+"<tr>";
for(j=1;j<=iWidth;j++)
s=s+"<td>&nbsp;</td>";
s=s+"</tr>"
}
s=s+"</table>";
window.returnValue=s;
window.close();

}

function ClickCancel()
{ window.returnValue="";
window.close();
}
</script>
</HEAD>
<BODY topmargin=10 leftmargin=0>
<center>
<table width="274" border="0" cellpadding="0" cellspacing=2 align=center>
<tr>
<form name="Edit">
<td width="40" align="right">Row:</td>
<td width="40">
<input type="text" name="iHeight" maxlength="3" style="width:35;height: 20" value="2">
</td>
<td width="80" align="right">Cell Padding:</td>
<td width="40">
<input type="text" name="CellPadding" maxlength="3"
style="width:35;height: 20" value="0">
</td>
<td rowspan="4" width="4" background="Images/Separator.gif"></td>
<td width="70" align="right">
<input style="width: 60; height: 21"
type="button" name="bntOk" value="OK" onclick="ClickOk();">
</td>
</tr>
<tr>
<td width="40" align="right">Col:</td>
<td width="40">
<input type="text" name="iWidth" size="3" style="width: 35; height: 20" value="2">
</td>
<td width="80" align="right">Cell Spacing:</td>
<td width="40">
<input type="text" name="CellSpacing" maxlength="3" style="width:35;height: 20" value="0">
</td>
<td width="70" align="right">
<input style="width: 60; height: 21" type="button"
name="bntCancel" value="Cancel" onClick="ClickCancel();">
</td>
</tr>
<tr>
<td width="40" align="right">Table Width:</td>
<td colspan="3">
<input type="text" name="Width" maxlength="3"
style="width:35;height: 20" value="100"><select name="Unit">
<option>px</option>
<option value="%" selected>%</option>
</select>
</td>
<td width="66" align="center"></td>
</tr>
<tr>
<td width="40" align="right">Border:</td>
<td width="40">
<input type="text" name="Border" maxlength="3" style="width:35;height: 20" value="1">
</td>
<td width="80">&nbsp;</td>
<td width="40">&nbsp;</td>
<td width="66">&nbsp;</td>
</form>
</tr>
</table>
</center>
</BODY>
</HTML>
2. next I modified the following lines in the wysiwygeditor.php file:


function pasteHTML(HTML)
{
document.frames("<?php echo $myEditor;?>").document.frames("textEdit").innerText = document.frames("<?php echo $myEditor;?>").document.frames("textEdit").innerHTML;
format="Text";
document.frames("<?php echo $myEditor;?>").document.frames("textEdit").innerText=doFormat('Paste',HTML);
copyValue_<?php echo $textareaname;?>();
document.frames("<?php echo $myEditor;?>").document.frames("textEdit").innerHTML = document.frames("<?php echo $myEditor;?>").document.frames("textEdit").innerText;
format="HTML";

}


The thing quite works, meaning with 'quite' that wysiwyg visualization for the table only works only after 'preview' is selected
Bye

Login

Who's Online

143 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 143


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits