PHP - Using The Wyzz Wysiwig Editor And Php
Hello!
I'm using the Wyzz editor as part of a web application, allowing users to type in using a Wysiwig editor which will then print on the web page what they type. I'm wondering if there's a function in PHP which can tell if the text is "html" or the wysiwig stuff. In other words, if I'm in the text mode and I click on the bold icon, and I type: Hello how are you? ---- then it prints "Hello how are you." but if it's in the html mode, it and I type: <b>Hello how are you?</b> I'd LIKE it to be smart enough to spit out a bold Hello how are you. Instead, it gives me back <b>Hello how are you?</b>. So, might there be a version of the PHP echo which basically says "Hey, if it looks like an HTML tag let's treat it as such?" As you can see by my code below, I'm just using a PHP echo statement right now: Code: [Select] <script language="JavaScript" type="text/javascript" src="../../js/wyzz.js"></script> <?php if (isset($_POST['insert'])) {echo $_POST['textfield'];} ?> <form action="" method="post"><textarea name="textfield" id="textfield" rows="10" cols="40"></textarea> <script language="javascript1.2"> make_wyzz('textfield'); </script> <input type="submit" name="insert" id="insert" value="Add Text" /> </form> Thank you for taking the time to read this. Similar TutorialsHello! I have spent days and days trying to search for some scripts to help me with my goal of making a user friendly XML editor to no avail. Here is the situation: I built a flash image slideshow for a client. This slideshow uses the following XML: Code: [Select] <?xml version="1.0" encoding="utf-8"?> <SLIDESHOW SPEED="4"> <IMAGE URL="slideShowImages/image1.jpg" TITLE="The first Image" /> <IMAGE URL="slideShowImages/image2.jpg" TITLE="The second Image" /> <IMAGE URL="slideShowImages/image3.jpg" TITLE="The third Image" /> </SLIDESHOW> I have been looking for a way to both upload a new image to the server in the /slideShowImages/ folder, and add a new entry to the XML above. Also, I want the ability to delete a node from the list and remove the corresponding image from the server. Basically I want to make a CMS for a flash based slideshow. any help would be simply amazing. Thanks in advance, James Hi im having an issue with this simple file editor...it displays the html file but its all greyed out and uneditable and can't press submit please help!
Attached Files
editor.php 14.66KB
1 downloads
submiteditor.php 1.83KB
0 downloads hi, how can i add a pantone like this http://img.pai.pt/mysite/rendermedia/42/45/2/192881b9-8e84-44ff-b109-bac29d7726de_LARGE.jpg ? thanks for your help Hi there, I have form to send newsletter and I use text encoding not HTML. Do you know the best editor to make BOLD or Space when i write email. I don't need HTML editor I need for text . Thanks This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=323321.0 Hi there, i have a problem regarding a editor that I am building, I am fairly new to php, but this is what i have so far: Code: [Select] <?php $dirname = "."; $dir = opendir($dirname); ?> <form action="editor.php" method="POST"> <select> <?php while(false != ($file = readdir($dir))) if (strpos($file, '.php',1)||strpos($file, '.html',1)||strpos($file, '.css',1) ) { { if(($file != ".") and ($file != "..")) { echo("<option><a href='$file'>$file</a></option>"); } }} ?> </select> <input type="submit" value="Submit" /> </form> <br /> <center> <form > <textarea rows="80" cols="130"> <?php include $_POST["$file"]; ?> </textarea> </center> The code produces a drop down list of any html, php or css files in the current directory and I want it to be able to show the selected file from the drop down list in the textarea so that I can edit it, I also am not sure how to save the file, would this be a file write method? any help would really be appreciated as I've been stuck on this issue for hours an its doing my nut in!!! Thanks SF my issue is to show preview of a form. the form will have a fck editor . this form is used to update a table. i need to show a preview button on this page and when we click on it should show the preview of the content. i am attaching my code. my problem is this is a update page fck value is taken from Dn "$desc" . when do some changes on editor then i click on preview button should show the changes, here showing only the $dec value from DB not the value i change. <?php session_start(); $uname=$_SESSION['usname']; include("dbconnect.php"); $admin_qry="select * from st_admin where admin_username='$uname'"; $res=mysql_query($admin_qry); $admin_res=mysql_fetch_array($res); $level=$admin_res['level']; include("status.php"); ?> <script language="javascript" src="ajax/ajax.js"></script><?php $pos=$_REQUEST['pos2']; $getqry="select * from st_aboutus where categorys='$pos'"; $resr=mysql_query($getqry); $row=mysql_fetch_array($resr); $cat=$row['categorys']; $img=$row['st_img']; //$description=$row['st_content']; $desc=stripslashes($row['st_content']); $file_name=$row['file_name']; $id=$row['st_id']; ?> <script language="javascript"> function popUpPreview() { // Display a new browser for the user var w = screen.availWidth / 2 - 450; var h = screen.availHeight / 2 - 320; var win = window.open('aboutus-prewiew.php', 'payPopupMain', 'width=900,height=650,left='+w+',top='+h+',scrollbars=1'); } </script> <link href="../css/style.css" rel="stylesheet" type="text/css" /> <form name="sform" id="sform" action="update_aboutus.php" method="post"> <table width="679" height="323" border="0" align="center" cellpadding="0" cellspacing="0" > <tr> <td colspan="5" height="40" align="left" class="page_head" valign="top"> </td> </tr> <tr> <td align="left" class="textfont"> </td> <td align="left" class="textfont"> </td> <td height="40" align="left"> </td> <td height="40" align="left" class="normaltext"><?php if($level=="dataentry" ){} else {echo " Status " ; } ?></td> <td align="left"><span style="padding-left:10px;"> <?php if($level=="dataentry" ){} else { showStatus('st_aboutus','st_id','status',$id) ; } ?> </span></td> </tr> <tr> <td width="170" align="left" class="textfont"> </td> <td width="8" align="left" class="textfont"> </td> <td height="40" colspan="3" align="left"><?php echo $message=$_GET[msg]; ?></td> </tr> <tr> <td height="19" class="listitem" align="right"> </td> <td class="listitem" align="left"> </td> <td height="19" align="left" class="listitem1">Image Size 274 X 420</td> <td colspan="2" align="left"></td> </tr> <tr> <td height="71" class="listitem" align="right">Add Image</td> <td class="listitem" align="left"> </td> <td width="236" height="71" align="left"><input name="logo" type = "text" id="logo" value="<?php echo $img; ?>" size="20" readonly="readonly" class="txtbox" /> <img src="../images/attach.gif" onClick="attachment('logo','logoimage')" class="imagebutton12" /> <img src="../images/remove.gif" onClick="removeattachment('logo','logoimage')" class="imagebutton12" /></td> <td width="265" colspan="2" align="left"><img src="<?php if($img) {echo "aboutus/".$img; } else { echo "../images/photo.gif "; } ?>" width="67" height="62" name="logoimage8" id="logoimage" /> <input type="hidden" name="image1_hiid" id="image1_hiid" value="<?php echo $img; ?>" /></td> </tr> <tr> <td colspan="5" align="left" class="optimumSize" valign="bottom"><!--Optimum size of image is 120 X 105 --></td> </tr> <tr> <td height="10" colspan="2" class="textfont"> </td> <td height="10" colspan="3"><?php include("../FCKeditor/fckeditor.php"); $oFCKeditor = new FCKeditor('desc') ; $oFCKeditor->BasePath = '../FCKeditor/'; /* $oFCKeditor->Value =stripslashes(substr($intro,0,500));*/ $oFCKeditor->Value = $desc; // here we can give size of editor as $oFCKeditor->Width = '600' ; $oFCKeditor->Height = '250' ; $oFCKeditor->Create() ; ?></td> </tr> <tr> <td height="27" align="right" class="listitem"> </td> <td height="27" class="textfont"> </td> <td height="27" align="left" valign="bottom"><span class="listitem1"><?php /*?><?php if($pos!="management" ){} else {echo " Only Upload ".pdf" file";} ?><?php */?></span></td> <td height="27" colspan="2" align="left"> </td> </tr> <?php /*?><?php if($pos!="management" ){} else {echo " <tr> <td height='68' align='right' class='listitem'>Update pdf</td> <td height='68' class='textfont'> </td> <td height='68' align='left'> <input name='logo1' type = 'text' id='logo1' value='$file_name' size='20' readonly='readonly' class='txtbox' /> <img src='../images/attach.gif' onclick=\"attachment('logo1','logoimage1')\" class='imagebutton12' /> <img src='../images/remove.gif' onclick=\"removeattachment('logo1','logoimage1')\" class='imagebutton12' /></td> <td height='68' align='left'><img src=\"aboutus/$file_name\" width='67' height='62' name='logoimage1' id='logoimage1' /></td> </tr> ";} ?><?php */?> <tr> <td height="36" colspan="2"><input type="hidden" name="des" id="des" value="<?php echo $img; ?>" /></td> <td align="left"><input name="preview" type="button" onclick="return popUpPreview();" value="Preview"/></td> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><input type="hidden" name="id" value="<?php echo $id; ?>"><input type="hidden" name="pos" value="<?php echo $pos; ?>"> <input type="hidden" name="image1_hiid1" id="image1_hiid1" value="<?php echo $file_name; ?>" /></td> <td align="left"> <input type="image" name="image" value="Submit" src="../images/submit.gif" alt="Login Details" title="Submit" onclick="return fieldcheck(this.form);"></td> <td colspan="2"> </td> </tr> <tr><td colspan="5" height="10"></td></tr> </table> </form> aboutus-prewiew.php <script type="text/javascript"> document.write(opener.document.sform.logo.value); document.write(opener.document.sform.desc.value); // this value only showing from the database ,i need to get the value to show preview </script> Hi, Im making a sort of blogger module for a Zen Cart plug-in so that the front page can be used as a news page which would be good for SEO. I have everything working, except for a HTML editor, as I need the user to be able to create the pages in the same sort of way you make the description for an ebay listing. I have looked on google, but couldnt find anything. Could anyone help me with this? Thanks! This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=346801.0 I hope it is appropriate to ask this here?
Does anyone know of a WYSIWYG HTML editor that can be integrated into a web site (PHP/MYSQL based Bulletin Board), that has code synthax highlighting/display capabilities?
Kindly recommend as i wish to integrate one into my custom built bulletin board.
Thanks
This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=312838.0 I am using CKeditor 3.2. Everything is going fine except image uploader, flash uploader and table... These content are not working.. my site is in PHP.. I have searched too much to solution on Google not found a right answer... infact, there are many results talking about filemanager folder which i was not able to find on downloaded zip. One more thing; when i am uploading images through default uploader and send it to database everything is fine, but when i am retrieving that image on some page; the image is not displaying, /"/" kind of code displaying instead of the images.... What to do to resolve this issue..... Kindly help me its very needed... Thanks in advance.... Hello i just want to code a function for my editor that help me to do this: i copy a page with some note and picture in my editor,when i press send bottom editor find IMG tag in and upload it in my own server i can write a function for finding IMG tag and upload,but i don't know how i have to add automatic upload to my server,is there any body here can help me for coding this? or do you know one script or editor that have this properties on it? i use my sample editor if any body copy and paste anything from word to editor some unwanted css also coming with that pasting. when we request the data same css also coming with that. so how to clean data when we request $desc =$_request['contents']; how to solve this issue. please help me. This topic has been moved to Website Critique. http://www.phpfreaks.com/forums/index.php?topic=355553.0 This topic has been moved to Beta Test Your Stuff!. http://www.phpfreaks.com/forums/index.php?topic=342258.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=333966.0
Auto Save Plugin for the CKEditor which automatically saves the content (via HTML5 LocalStorage) temporarly (for example when a login session times out). And after the content is saved it can be restored when the editor is reloaded.
The auto save plugin for CKEditor does its job the way its described in the quote above.
I was wondering if there is a way to have the web based text editor for my blog, the way the Wordpress text editor is, with an auto save (draft) function?
Is there a web based text editor with such function, which would enable me this?
Edited by glassfish, 01 December 2014 - 07:43 AM. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=345742.0 I'd like to use a text editor like this one: http://tinymce.moxiecode.com/examples/full.php for my forums. But I am not sure exactly how I would prevent abuse and injects to messed up the page, rather than being contained in the designated area it is meant for. Could some one please help me, I know htmlspecailchars will not work, since some of the code needs to render as html |