JavaScript - Ck Editor Not Sending Rich Html
Hello,
I am having a bit of a problem sending rich html emails. I just installed CK Editor on my hosting account and it appears to be working fine. But instead large colored fonts, I'm getting html tags only in my email. Links and emails appear to be working fine, though... So instead looking like this: Big Bold Blue. It looks like this: <p><span style='color: rgb(0, 0, 255);'><strong>Big Bold Blue.</strong></span></p> I also tried using mail() function in php, on its own, but that didn't work either. Can anyone help me out with this? I'm not very familiar with JavaScript... Thanks in advance! Similar TutorialsI'm using Kevin Roth's Cross-Browser Rich Text Editor JS component. Below is a demo.php script showing how it's created in JS. I got it working fine but I now want to dynamically add new text to the component in my php script. I know how to setup the php part to initiate the new text load event but I can't figure out how to actually get the new text into the RTE component inside a JS function. I tried this JS function but it didn't load in the new text in: PHP Code: function pre_canned_message_click() { rte1.html = 'New string'; } In the demo.php below the RTE component is loaded the same way rte1.html = but in the JS function it doesn't work. I don't know what I'm missing here. Thanks for any help... PHP Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php echo var_dump($_POST); ?> <!-- // Cross-Browser Rich Text Editor // Written by Kevin Roth (http://www.kevinroth.com/rte/) // License: http://creativecommons.org/licenses/by/2.5/ //--> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Cross-Browser Rich Text Editor (RTE)</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="keywords" content="cross-browser rich text editor, rte, textarea, htmlarea, content management, cms, blog, internet explorer, firefox, safari, opera, netscape, konqueror" /> <meta name="description" content="The cross-browser rich-text editor (RTE) is based on the designMode() functionality introduced in Internet Explorer 5, and implemented in Mozilla 1.3+ using the Mozilla Rich Text Editing API." /> <meta name="author" content="Kevin Roth" /> <meta name="ROBOTS" content="ALL" /> <!-- html2xhtml.js written by Jacob Lee <letsgolee@lycos.co.kr> //--> <script language="JavaScript" type="text/javascript" src="../cbrte/html2xhtml.min.js"></script> <script language="JavaScript" type="text/javascript" src="../cbrte/richtext_compressed.js"></script> </head> <body> <h2>Cross-Browser Rich Text Editor (RTE) Demo</h2> <p>For more information, visit the <a href="http://www.kevinroth.com/rte/">Cross-Browser Rich Text Editor (RTE) home page</a>.</p> <!-- START Demo Code --> <form name="RTEDemo" action="demo.php" method="post" onsubmit="return submitForm();"> <script language="JavaScript" type="text/javascript"> <!-- function submitForm() { //make sure hidden and iframe values are in sync for all rtes before submitting form updateRTEs(); return true; } //Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML, encHTML) initRTE("../cbrte/images/", "../cbrte/", "", true); //--> </script> <noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript> <script language="JavaScript" type="text/javascript"> <!-- //build new richTextEditor var rte1 = new richTextEditor('rte1'); <?php //format content for preloading if (!(isset($_POST["rte1"]))) { $content = "here's the " . chr(13) . "\"preloaded <b>content</b>\""; $content = rteSafe($content); } else { //retrieve posted value $content = rteSafe($_POST["rte1"]); } ?> rte1.html = '<?=$content;?>'; //rte1.toggleSrc = false; rte1.build(); //--> </script> <p><input type="submit" name="submit" value="Submit" /></p> </form> <?php function rteSafe($strText) { //returns safe code for preloading in the RTE $tmpString = $strText; //convert all types of single quotes $tmpString = str_replace(chr(145), chr(39), $tmpString); $tmpString = str_replace(chr(146), chr(39), $tmpString); $tmpString = str_replace("'", "'", $tmpString); //convert all types of double quotes $tmpString = str_replace(chr(147), chr(34), $tmpString); $tmpString = str_replace(chr(148), chr(34), $tmpString); // $tmpString = str_replace("\"", "\"", $tmpString); //replace carriage returns & line feeds $tmpString = str_replace(chr(10), " ", $tmpString); $tmpString = str_replace(chr(13), " ", $tmpString); return $tmpString; } ?> <!-- END Demo Code --> </body> </html> I got a code from Javascriptkit.com found he http://www.javascriptkit.com/script/...mlticker.shtml I'm using PHP and arrays to display the HTML with a foreach loop. All that displays is the box that is supposed to have the content. Here's my PHP code: Code: $stats = array( $txt[95] => $context['common_stats']['total_posts'], $txt[64] => $context['common_stats']['total_topics'], $txt[659] => $context['latest_post']['link'], $txt[656] => $context['common_stats']['latest_member'] ); echo '<div id="myhtmlticker" class="tickerstyle">'; foreach($stats as $key => $value){ echo '<div class="messagediv"><b>', $key ,':</b> ', $value ,'</div>'; } echo '</div>'; I've placed the javascipt code in my head area of my html. I've been using Coffeecup free version for HTML/CSS needs and it works fine as if you forget say one or two values, the prompt feature works fine. Im now getting into Javascript and can see that it is a very useful language, however are there any editors that will provide prompt/suggestion pop ups when editing which are free? If possible, one that combines HTML/CSS/Javascript all together. I've seen this:- http://download.cnet.com/Free-JavaSc...-10907077.html And was going to give it a download. But anyone know of any others or can recommend the above? Thanks I currently use MSE but it keeps moving things around and changing the formatting of the code. Can anyone recommend an editor that leaves things as I type them? Cheers Daniel. I am trying to use the HTML created by openWYSIWYG editor on my site. I am wanting to manipulate the created HTML that is generated...but I don't seem to be able to access it. When I pass the value through to a PHP script, it functions in much the similar way that any other textarea does. What I want to do works fine with a standard textbox and acquiring the value using: Code: textareaid.value But this doesn't seem to work when the openWYSIWYG editor is attached. Does anyone know how I can do this?? Cheers The Moose I am looking to create a web script that allows you to create custom strategy maps for various game like battlefield. What I want is the users to select a map (probably an image map with some default icons on it) and then they can lay on custom icons (directional arrows, attack / defend icons, ect, ect) to show a battle plan and then save it as an image. I would assume an image map would be best for this, but I am not sure how users can input, remove, rotate and resize the icons if needed. Is there some sort of script like this I can build on? I only know the basics of javascript and php, but perhaps someone can point me to a guide of some sort? Here is an example of what I want the user to be able to create which I made in photoshop, though it can easily be made in a simple program like paint too. Any recommendations for a freeware html/javascript editor??. I am presently using HAPedit. Should it suffice ??
hi!! i wanna create a simple javascript editor.. the main thing here is i want something like Tinymce but with some features i want to add.. something simple i can tweak with.. please help guys I'm starting out in JS and I'm looking for a good editor. Preferably cheap or free Anyone suggest something pls Nigel I use http://www.openwebware.com/ wysiwyg editor. It is necessary to change something in it, but I do not know how? When the inserted image in the editor, and then changes the image size, stretches the image in an editor, I want to record a change image size, without editor in <input type='text'> field. Is there any idea how to bring? Thanks! Hi, well i saw this editor http://www.w3schools.com/svg/tryit.a...=trysvg_circle at w3schools and i was wondering if there is something like this available for use in one's site. I mean if there is a service that provides you with the editor for your site or if there is a way out to make something like this if there is already a script available. My knowledge is till html&css so this is what i don't know I assumed this is a javascript based text editor because when I turn off javascript it doesn't work. I was wondering how something like this is created. maybe not this exact one, but how would I create something like it. Maybe just a simple editor that changes text size and color.
I would like to have a Javascript WYSIWYG text editor for the site mentioned on the bottom of this post. I don't need anything complex, but basic rich text editing. I know a few of them like CKEditor, TinyCME, WMD etc. I would like to hear others' experience in the regard. Thanks. Writing Javascript code in Notepad and saving it in HTML works fine. However when I write js in my DiDaPro editor and go to preview the screen it is blank. Why?
Because of my rather second-rate vision; I would like to get an editor for my Javascript that will check my syntax for me. Missing or extra brackets, semicolons etc are the bane of my life. Any suggestions welcomed. Frank WYSIWYG editor for PHPBB3. As far as I'm aware only unofficial MODS exist, and one has the impression they are fraught with bugs. I need a polished free opensource solution. I was really hopeful there was an official WYSIWYG, but I haven't found it yet if there is one. Can anyone confirm? Uhm, hi. So, sorry if this is the wrong place, but I hope someone can help. I'm 13 years old, and I'm slowly learning how to code. I made this website for my teacher from scratch using basic HTML tables, with a few PHP include lines I copied from somewhere. Not bad, right? Well, here's the tricky part. When she was using her previous website, she kept messing up her various widgets when she added site content (because Wikispaces sucks ) So, my hope was to create an inline editor (AJAX??) for her to only be able to edit a certain part of the page. A) ONLY SHE SHOULD BE ABLE TO EDIT IT, so I need some kind of a login system. I have access to phpMyAdmin to run MySQL queries and such. B) I was hoping for a top corner login button like Twitter, or the example shown here. C) I know I can give her access to my FTP and make a separate file, and use an include script, but she wouldn't know how to use an FTP. D) I'd prefer if the editor DID NOT use HTML. Reason being, I wouldn't want to have to make her use <br> every time she wants a line break. E) It should be like this. If her username is detected as logged in, a button should be displayed above the editable area that says "Edit". Then, when she clicks that, a text box shows up, she edits her text, and clicks "Submit". I'm sure this would be mighty difficult to do, but I'd much appreciate the help. I know I used phrases such as "MySQL queries" and "PHP include script", but please talk to me as if I were 4 years old. I have extremely limited coding knowledge. Also, please don't get annoyed if I ask a lot of stupid questions. Be sure to let me know if you need any more information! THANK YOU SO MUCH! ~Kyle$calise hi everyone, fairly new to this forum, does anybody know where i can find a good, free color coded editor ? Hi All, Having a real problem with IE losing focus when clicking outside the wysiwyg iframe. This works fine in Firefox, Chrome, Safari, Opera. Code: <html> <head></head> <body> <script type="text/javascript"> function initializeEditor() { contentEditor.document.designMode='on'; } function insertHTML1() { var html = "<em><u>Some Text</u></em><p>2. Select this text<p><strong></u>Some text</strong>"; document.contentEditor.focus(); range = contentEditor.document.selection.createRange(); document.contentEditor.focus(); range.pasteHTML(html); } function insertHTML2() { var html = "<strong>INSERTED TEXT</strong>"; document.contentEditor.focus(); range = contentEditor.document.selection.createRange(); document.contentEditor.focus(); range.pasteHTML(html); } </script> <iframe name="contentEditor" id="contentEditor" onLoad="initializeEditor();"></iframe> <p><input type="button" value="1. Click Here" onClick="insertHTML1()"> <p><input type="text" value="3. Click Here"> <p><input type="button" value="4. Click Here" onClick="insertHTML2()"> </body> </html> To demonstrate, first follow steps 1, 2 and 4. This works fine! Introduce step 3, clicking in a field outside the iframe and focus is lost. Appreciate any help!! Thanks |