This isn't totally an interakt problem, but for the life of me I can't get tinyMCE to work with nextensio. I've been mucking around with it (tinyMCE) & got it to install on the basic form. In my site root I have a folder called Tiny Mice with the src files in there, & this test page is in the site root also, here's the code
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<title>TinyMCE Test</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<!-- tiny_mce.js PATH -->
<script type="text/javascript" src="../Tiny Mice/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "emotions,spellchecker,advhr,insertdatetime,preview",
// Theme options - button# indicated the row# only
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,|,code,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,charmap,emotions",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
</script>
<script type="text/javascript">
function previewWindow(id) {
var win = window.open("", "PreviewWindow", "width=500,height=500,resizable=yes");
var c = tinyMCE.get(id).getContent();
if(win) {
win.document.writeln("<html><head><link rel='stylesheet' type='text/css' href='replaceMeWithYourStyleSheet.css' /></head><body>" + c + "</body></html>");
win.document.close();
}
}
</script>
</head>
<body>
<!-- OF COURSE YOU NEED TO ADAPT ACTION TO WHAT PAGE YOU WANT TO LOAD WHEN HITTING "SAVE" -->
<form method="post" action="show.php">
<p>
<textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea>
<input type="submit" value="Submit" />
</p>
</form>
<p> </p>
<form id="form1" method="post" action=""><input type="button" id="previewButton" value="Preview content before submitting it" onclick="javascript:previewWindow('content');"></input>
</form>
<p> </p>
</body>
</html>
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/adminTrackeyKids.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<script type="text/javascript" src="../../Tiny Mice/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "emotions,spellchecker,advhr,insertdatetime,preview",
// Theme options - button# indicated the row# only
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,|,code,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,charmap,emotions",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
</script>
<script type="text/javascript">
function previewWindow(id) {
var win = window.open("", "PreviewWindow", "width=500,height=500,resizable=yes");
var c = tinyMCE.get(id).getContent();
if(win) {
win.document.writeln("<html><head><link rel='stylesheet' type='text/css' href='replaceMeWithYourStyleSheet.css' /></head><body>" + c + "</body></html>");
win.document.close();
}
}
</script>
---------------------------------------------
//AND THE FORM BELOW
---------------------------------------------
<form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>" enctype="multipart/form-data">
<?php $cnt1 = 0; ?>
<?php do { ?>
<?php $cnt1++; ?>
<?php
// Show IF Conditional region1
if (@$totalRows_rsarticles_art > 1) {
?>
<h2><?php echo NXT_getResource("Record_FH"); ?> <?php echo $cnt1; ?></h2>
<?php }
// endif Conditional region1
?>
<table cellpadding="2" cellspacing="0" class="KT_tngtable">
<tr>
<td class="KT_th"><label for="title_art_<?php echo $cnt1; ?>">Title:</label></td>
<td><input type="text" name="title_art_<?php echo $cnt1; ?>" id="title_art_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rsarticles_art['title_art']); ?>" size="32" maxlength="250" />
<?php echo $tNGs->displayFieldHint("title_art");?> <?php echo $tNGs->displayFieldError("articles_art", "title_art", $cnt1); ?> </td>
</tr>
<tr>
<td class="KT_th"><label for="date_art_<?php echo $cnt1; ?>">Date:</label></td>
<td><input type="text" name="date_art_<?php echo $cnt1; ?>" id="date_art_<?php echo $cnt1; ?>" value="<?php echo KT_formatDate($row_rsarticles_art['date_art']); ?>" size="10" maxlength="22" />
<?php echo $tNGs->displayFieldHint("date_art");?> <?php echo $tNGs->displayFieldError("articles_art", "date_art", $cnt1); ?> </td>
</tr>
<tr>
<td class="KT_th"><label for="article_art_<?php echo $cnt1; ?>">Article:</label></td>
<td><textarea name="article_art_<?php echo $cnt1; ?>" id="article_art_<?php echo $cnt1; ?>"cols="50" rows="5"><?php echo KT_escapeAttribute($row_rsarticles_art['article_art']); ?></textarea>
<?php echo $tNGs->displayFieldHint("article_art");?> <?php echo $tNGs->displayFieldError("articles_art", "article_art", $cnt1); ?> </td></tr>
<tr>
<td class="KT_th"><label for="image_art_<?php echo $cnt1; ?>">Image:</label></td>
<td><input type="file" name="image_art_<?php echo $cnt1; ?>" id="image_art_<?php echo $cnt1; ?>" size="32" />
<?php echo $tNGs->displayFieldError("articles_art", "image_art", $cnt1); ?> </td>
</tr>
<tr>
<td class="KT_th"><label for="category_art_<?php echo $cnt1; ?>">Category:</label></td>
<td><select name="category_art_<?php echo $cnt1; ?>" id="category_art_<?php echo $cnt1; ?>">
<option value=""><?php echo NXT_getResource("Select one..."); ?></option>
<?php
do {
?>
<option value="<?php echo $row_rsCategory['id_cat']?>"<?php if (!(strcmp($row_rsCategory['id_cat'], $row_rsarticles_art['category_art']))) {echo "SELECTED";} ?>><?php echo $row_rsCategory['category_cat']?></option>
<?php
} while ($row_rsCategory = mysql_fetch_assoc($rsCategory));
$rows = mysql_num_rows($rsCategory);
if($rows > 0) {
mysql_data_seek($rsCategory, 0);
$row_rsCategory = mysql_fetch_assoc($rsCategory);
}
?>
</select>
<?php echo $tNGs->displayFieldError("articles_art", "category_art", $cnt1); ?></td>
</tr>
</table>
<input type="hidden" name="kt_pk_articles_art_<?php echo $cnt1; ?>" class="id_field" value="<?php echo KT_escapeAttribute($row_rsarticles_art['kt_pk_articles_art']); ?>" />
<?php } while ($row_rsarticles_art = mysql_fetch_assoc($rsarticles_art)); ?>
<div class="KT_bottombuttons">
<div>
<?php
// Show IF Conditional region1
if (@$_GET['id_art'] == "") {
?>
<input type="submit" name="KT_Insert1" id="KT_Insert1" value="<?php echo NXT_getResource("Insert_FB"); ?>" />
<?php
// else Conditional region1
} else { ?>
<div class="KT_operations">
<input type="submit" name="KT_Insert1" value="<?php echo NXT_getResource("Insert as new_FB"); ?>" onclick="nxt_form_insertasnew(this, 'id_art')" />
</div>
<input type="submit" name="KT_Update1" value="<?php echo NXT_getResource("Update_FB"); ?>" />
<input type="submit" name="KT_Delete1" value="<?php echo NXT_getResource("Delete_FB"); ?>" onclick="return confirm('<?php echo NXT_getResource("Are you sure?"); ?>');" />
<?php }
// endif Conditional region1
?>
<input type="button" name="KT_Cancel1" value="<?php echo NXT_getResource("Cancel_FB"); ?>" onclick="return UNI_navigateCancel(event, '../../includes/nxt/back.php')" />
</div>
</div>
</form>
Thanks Chris