##############################################################
## MOD Title: WYSIWYG - Rich Text Editor for posting HTML message
## MOD Author: eCardMAX.com < webmaster@ecardmax.com > (Jimbo Hong) http://ecardmax.com
## MOD Description: It's time to turn <textarea> into a powerful Rich Text HTML Editor. Don't force your
## users to learn another set of markup tags. With this MOD you can format your posts or Private
## message just like you would in MS. FrontPage! Our Rich Text Editor will work on all popular browsers
## such as: IE - FireFox - Netscape - Opera 9x
## MOD Version: 4.2
##
##
## Installation Level: Intermediate
## Installation Time: ~20 minutes
##
###############################################
Package SDK, anyone? (http://www.simplemachines.org/community/index.php?topic=20319.0) :)
Thank you for picking SMF to implement this. Many will love you for it. ;)
How secure is this?
<span onclick="alert('GO GO GO')">TEST</span>
<span ="alert('GO GO GO')">TEST</span>
What does "Switch to text area" mean?
Does it have a special function?
Actually if you look at the javascript, they could easily implement a way for the radio buttons to work without a refresh. Its not bad code, but it has a lot of bloat in it, and a few slight bugs, plus a few things could have been implemented in a far better fashion. But yes, very well done thus far.---> I've updated this feature. Right now user can set which editor they want to use each time they post their message. I use browser cookie to remember their setting. Add the javascript code to refresh the page I think it is not a good idea because user can lose what they have typed. My solution is show up a pop up window to tell them hit preview button to see the change.
Would be nice if the emoticons could be drawn from SMF but I guess that makes it more complicated :)
I am seeing a problem with possible security. For something like this to work properly it would need to setup what it will send using BBC code instead of html due to security concerns. ...---> I'd be nice if you give me an example "security risk" when using Rich Text Editor. Hmm. How can people break your board by using Rich Text Editor?
Will this great editor be added to a future SMF release?I believe it will be best left as a mod :-X
Can't wait!
Thanks for the effort!
<!-- //EDITOR INSERT RICH TEXT EDITOR CODE HERE -->
-It would be better if the setting about which editor to use was in the member's control panel, like in vBulletin's WYSIWYG editor.
Download and try it out here:
http://hoteditor.com/how_to_sm.php
Hope you guys will like it. Your feedback are welcome.
No table support or did I miss it?
En apariencia funciona perfecto, pero cuando trato de postear el mensaje, me da este mensaje de error:
The following error or errors occurred while posting this message:
The message body was left empty.
It's quite obvious but... have you actually tried to write ANYTHING in the text box or have you left it blank while you were testint? I have tried the mod in serveral clean SMF boards and I have always made it work. Check you have unzipped all necessary files inside your SMF directory:
I not think that your to take to bad, but I ask for excuses. Sincerely, sorry to all.
I don´t speak english.
* Please, post this topic in the Spanish Board, because we all do not speak English. ;)
** You are a moderator or member of the SMF team?
*** What I originate my error was that its domain colegiodelaesperanza.com is Spanish
Obvious I have fulfilled all these steps before asking for aid. You do not worry, I will fix it.
I not think that your to take to bad, but I ask for excuses. Sincerely, sorry to all.
I don´t speak english.
* Please, post this topic in the Spanish Board, because we all do not speak English. ;)
** You are a moderator or member of the SMF team?
*** What I originate my error was that its domain colegiodelaesperanza.com is Spanish
Obvious I have fulfilled all these steps before asking for aid. You do not worry, I will fix it.
Also would it be possible to have English Tooltips when the mouse is held over the buttons?
I really like this mod but as mentioned above it only works in the "SMF Default Theme" and not the "Classic YaBB SE Theme" which I use. Otherwise you get the The message body was left empty error message.
For those cases I just suggest reading the Hoteditor_Mod_SMF.txt file you will find inside the previous link and follow the instructions to change your theme files by hand
Updated 14/02/07:
Based on the info published on this post (http://www.simplemachines.org/community/index.php?topic=149241.0) I have created a mod to install hoteditor on SMF 1.1.2
Before you install the mod you need to unpack the following file in your board directory:
http://www.colegiodelaesperanza.com/descargas/varios/smf/hoteditor_files_for_SMF.1.1.2.zip
This will make your SMF installation looks like this:
attachments
avatars
Packages
richedit
Smileys
Sources
Themes
agreement.txt
changelog.txt
set_default_editor.php
index.php
...
After that you can proceed with the mod installation, which you can download here:
http://www.colegiodelaesperanza.com/descargas/varios/smf/hoteditor_smf.1.1.2.tar.gz
Install it as any other mod using the package manager
Please, take note that this mod works with SMF 1.1.2 ONLY and that it will NOT work on any other version
For further support, please, use the thread previously mentioned as it will probably contain more updated info:
http://www.simplemachines.org/community/index.php?topic=149241.0
Best regards
syntax error, unexpected $end
if(document.forms.postmodify.elements["message"].value==""){
// if(document.getElementById("HotEditor")){
// document.getElementById("HotEditor").style.border="2px solid red";
// }
// if(document.getElementById("No_HotEditor")){
// document.getElementById("No_HotEditor").style.border="2px solid red";
// }
// return false;
}
[CENTER ALIGN=CENTER]Kernel Debugging with WinDbg<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>[/CENTER ALIGN]
Some formattings come just fine, some doesn't.It still should support bbcode instead of html so it would obey rules set in settings...
I didn't investigate further but I assume that your MOD does not still use bbcode instead of html and it propably then won't support these rules then
Also I guess smiley set rules aren't also supported.Come and visit SMF Hoteditor demo again http://www.ecardmax.com/smf_111/ - when you go to post new message, you will see original smiley icons on top of Hoteditor. Click smiley icon will insert it to Hoteditor.
Also you should make it focus the cursor to field when buttons are being clicked, it's really annoying to set bold text on and then click text field again before writing..I think that's wrong to do it your way because sometime ppl need to select Bold, then Italic, then set Font Face. You can't just un-select text after user click Bold button (this is really annoying).
And someone was asking if this MOD will be compatible with in-far-future-arriving SMF 2.x.. I think this MOD is not needed with SMF 2.x as it already has a WYSIWYG editor (yeah really, check your settings to enable it), although there's a nice feature on your MOD that SMF 2.x does not YET hold, in your MOD there's a button where user can easily turn wysiwyg editor on/off when with smf 2.x you need to go to settings to change it's state(or maybe I just suck with this as I can't find anything similar from one that ships with smf 2.0)I've seen SMF 2 WYSIWYG Editor. It now has a button (http://www.simplemachines.org/community/Themes/smsite/images/bbc/toggle.gif) to let you switch from BBcode to WYSIWYG. Please don't take it a wrong way, SMF WYSIWYG Editor still has some major bugs when you switch from BBcode to WYSIWYG and vice versa. It doesn't work right in FireFox. There are a lot of work to do with current SMF WYSIWYG Editor, properly they are working on it and maybe this is a reason to slow down the day to release final SMF 2.0.
Anyway, you have done some really nice work with your MOD, even though that I commented the way I did about it.. Keep up the good work buddy..
I don't want to use BB code at all for our small community forum, just want to use html, i know that it isn't very secure, but it doesn't matter in our little community as it is restricted access.As far as I know, this mod does not convert it to BBCode (although I'm not too certain about this). The only one I've seen convert the posts to BBCode is the one currently in development for SMF 2.0 :)
As far as I know, this mod does not convert it to BBCodeYes, it is. It will convert WYSIWYG HTML to BBCode. The convert engine works pretty well on all browsers (including Safari). Did you try to the command [Switch On/Off WYSIWYG Mode] - that's how Hoteditor converts WYSIWYG HTML to BBCode and BBCode to HTML. When user click Submit/Preview Hoteditor will out BBCode so you can use it with SMF.
It will convert WYSIWYG HTML to BBCode. The convert engine works pretty well on all browsers (including Safari). Did you try to the command [Switch On/Off WYSIWYG Mode] - that's how Hoteditor converts WYSIWYG HTML to BBCode and BBCode to HTML.Oops, sorry, I must have been thinking of your old mod (the one from ages ago) :). I've not yet tested this one out. SMF 2.0's one also converts the post to BBCode, but I haven't seen how it does this (probably with a method very similar to yours)
Yes i trie every thing it only lets you insert BB Code into the database , i want to insert and retrieve plain html code from my posts.If you're an admin, you may put stuff in [html] tags (however, this would probably not work with the WYSIWYG editor)
[html]
Place your HTML here
[/html]
#
#-----[ OPEN ]------------------------------------------
#
Sources/Subs.php
#
#-----[ FIND ]------------------------------------------
# ~ line number 1081
$codes = array(
#
#-----[ AFTER, ADD ]------------------------------------------
#
//HotEditor MOD
array(
'tag' => 'highlight',
'type' => 'unparsed_equals',
'test' => '(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[A-Za-z]{1,12})\]',
'before' => '<span style="background-color: $1;">',
'after' => '</span>',
),
array(
'tag' => 'strike',
'before' => '<strike>',
'after' => '</strike>',
),
#
#-----[ FIND ]------------------------------------------
# ~ line number 1559
'before' => '<table style="font: inherit; color: inherit;">',
#
#-----[ REPLACE WITH ]------------------------------------------
#
'before' => '<table align=center style="border-collapse: collapse;border-spacing: 0px;border: 1px solid #6CAFF7;background-color: #F4F4F4;width:98%;font-family:Verdana,Arial,Sans-Serif,Tahoma;font-size:12px;color: black;">',
#
#-----[ FIND ]------------------------------------------
# ~ line number 1578
'before' => '<td valign="top" style="font: inherit; color: inherit;">',
#
#-----[ REPLACE WITH ]------------------------------------------
#
'before' => '<td style="height:25px; border: 1px solid #6CAFF7">',
For those who are running this MOD please update as soon as you can. The latest update (June 16, 2007) will support Safari 3 (1.3.2 and 2.0 as well) and also add new "Insert Table" feature + fix some minor bugs. Below is what you need to do to get the update:
- Go back to my site http://ecardmax.com/ehelpmax/download.php to download HotEditor MOD zip file for smf again.
- Unzip the zip file and use FTP to upload these files (and folder) below to your server (to replace the current files/folder)
+ [richedit]/[styles]/[office2007]/*.*
+ [richedit]/editor.js
+ [richedit]/keyboard.php
If you want to support Table, then use text editor to editCode: [Select]#
#-----[ OPEN ]------------------------------------------
#
Sources/Subs.php
#
#-----[ FIND ]------------------------------------------
# ~ line number 1081
$codes = array(
#
#-----[ AFTER, ADD ]------------------------------------------
#
//HotEditor MOD
array(
'tag' => 'highlight',
'type' => 'unparsed_equals',
'test' => '(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[A-Za-z]{1,12})\]',
'before' => '<span style="background-color: $1;">',
'after' => '</span>',
),
array(
'tag' => 'strike',
'before' => '<strike>',
'after' => '</strike>',
),
#
#-----[ FIND ]------------------------------------------
# ~ line number 1559
'before' => '<table style="font: inherit; color: inherit;">',
#
#-----[ REPLACE WITH ]------------------------------------------
#
'before' => '<table align=center style="border-collapse: collapse;border-spacing: 0px;border: 1px solid #6CAFF7;background-color: #F4F4F4;width:98%;font-family:Verdana,Arial,Sans-Serif,Tahoma;font-size:12px;color: black;">',
#
#-----[ FIND ]------------------------------------------
# ~ line number 1578
'before' => '<td valign="top" style="font: inherit; color: inherit;">',
#
#-----[ REPLACE WITH ]------------------------------------------
#
'before' => '<td style="height:25px; border: 1px solid #6CAFF7">',
for more info about Safari 3 visit http://apple.com/safari
testing Hoteditor latest version with SMF here
http://www.ecardmax.com/smf_111/index.php
Good luck
I have updated my previous post:
http://www.simplemachines.org/community/index.php?topic=22468.msg926573#msg926573
I have created a new mod for installing hoteditor 4.2
http://www.colegiodelaesperanza.com/descargas/varios/smf/hoteditor.4.2_smf.1.1.2.zip
I hope you find it useful
IMPORTANT: If you have any previous version, UNINSTALL IT FIRST!!!
I have updated my previous post:
http://www.simplemachines.org/community/index.php?topic=22468.msg926573#msg926573
I have created a new mod for installing hoteditor 4.2
http://www.colegiodelaesperanza.com/descargas/varios/smf/hoteditor.4.2_smf.1.1.2.zip
I hope you find it useful ;)
IMPORTANT: If you have any previous version, UNINSTALL IT FIRST!!!
Over all a wonderful tool, which is hopefully integrated in a similar way in the 1.2 Version of SMF!We're working on our own one for SMF 2.0 :).
It should be activated by default after the registrationIt's still in development, and has several bugs ;)
document.write("<div style='width:100%;text-align:center;font-family:Verdana;font-size:11px;'><input "+him_auto_checked+" id=him_auto onclick=setMethod(0); type=radio name=viet_method> Auto :: <input "+him_telex_checked+" id=him_telex onclick=setMethod(1); type=radio name=viet_method> Telex :: <input "+him_vni_checked+" id=him_vni onclick=setMethod(2); type=radio name=viet_method> VNI :: <input "+him_viqr_checked+" id=him_viqr onclick=setMethod(3); type=radio name=viet_method> VIQR :: <input "+him_viqr2_checked+" id=him_viqr2 onclick=setMethod(4); type=radio name=viet_method> VIQR* :: <input "+him_off_checked+" id=him_off onclick=setMethod(-1); type=radio name=viet_method> Off<br><img src="+styles_folder_path+"/vietnamese_symbol.gif></div>");
document.write("<div style=\"width:100%;text-align:center;font-family:Verdana;font-size:11px;\"><input \"+him_auto_checked+\" id=him_auto onclick=setMethod(0); type=radio name=viet_method> Auto :: <input \"+him_telex_checked+\" id=him_telex onclick=setMethod(1); type=radio name=viet_method> Telex :: <input \"+him_vni_checked+\" id=him_vni onclick=setMethod(2); type=radio name=viet_method> VNI :: <input \"+him_viqr_checked+\" id=him_viqr onclick=setMethod(3); type=radio name=viet_method> VIQR :: <input \"+him_viqr2_checked+\" id=him_viqr2 onclick=setMethod(4); type=radio name=viet_method> VIQR* :: <input \"+him_off_checked+\" id=him_off onclick=setMethod(-1); type=radio name=viet_method> Off<br><img src=\"+styles_folder_path+\"/vietnamese_symbol.gif></div>");
if(my_what =="smileys"){
my_document.InsertSymbol("<img border=0 src='" + data + "'> ");
}
<!--//HotEditor MOD - Quick Reply -->
<textarea style="visibility:hidden;position:absolute;top:-20;left:-20;width:1px;height:1px" cols="75" rows="7" id="message" name="message" tabindex="1"></textarea>
<style type="text/css">@import url(richedit/styles/office2007/style.css);</style>
<script language="JavaScript" type="text/javascript" src="richedit/editor.js?version=4.2"></script>
<script language="JavaScript" type="text/javascript">
var getdata =document.getElementById("message").value;
Instantiate("min","editor", getdata , "100%", "150px");
//For Vietnamese User. Edit file editor.js to enable vietnamese keyboard
if(enable_vietnamese_keyboard==1){
document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\"richedit/avim.js\"><\/script>");
var hoteditor_avim_method = hot_readCookie("hoteditor_avim_method");var him_auto_checked="";var him_telex_checked="";var him_vni_checked="";var him_viqr_checked="";var him_viqr2_checked="";var him_off_checked="";if(hoteditor_avim_method=="0"){him_auto_checked="checked";}else if(hoteditor_avim_method=="1"){him_telex_checked="checked";}else if(hoteditor_avim_method=="2"){him_vni_checked="checked";}else if(hoteditor_avim_method=="3"){him_viqr_checked="checked";}else if(hoteditor_avim_method=="4"){him_viqr2_checked="checked";}else if(hoteditor_avim_method=="-1"){him_off_checked="checked";}
document.write("<div style='width:100%;text-align:center;font-family:Verdana;font-size:11px;'><input "+him_auto_checked+" id=him_auto onclick=setMethod(0); type=radio name=viet_method> Auto :: <input "+him_telex_checked+" id=him_telex onclick=setMethod(1); type=radio name=viet_method> Telex :: <input "+him_vni_checked+" id=him_vni onclick=setMethod(2); type=radio name=viet_method> VNI :: <input "+him_viqr_checked+" id=him_viqr onclick=setMethod(3); type=radio name=viet_method> VIQR :: <input "+him_viqr2_checked+" id=him_viqr2 onclick=setMethod(4); type=radio name=viet_method> VIQR* :: <input "+him_off_checked+" id=him_off onclick=setMethod(-1); type=radio name=viet_method> Off<br><img src="+styles_folder_path+"/vietnamese_symbol.gif></div>");
}
function get_hoteditor_data(){
if (HTML_ON == "no"){
alert ("Please uncheck the HTML checkbox");
return false;
}
else{
setCodeOutput();
var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode
document.getElementById("message").value = bbcode_output;
}
}
</script><br />
<!--//HotEditor MOD Quick Reply -->
<!--//HotEditor MOD - Quick Reply -->
<textarea style="visibility:hidden;position:absolute;top:-20;left:-20;width:1px;height:1px" cols="75" rows="7" id="message" name="message" tabindex="1"></textarea>
<style type="text/css">@import url(richedit/styles/office2007/style.css);</style>
<script language="JavaScript" type="text/javascript" src="richedit/editor.js?version=4.2"></script>
<script language="JavaScript" type="text/javascript">
var getdata =document.getElementById("message").value;
Instantiate("min","editor", getdata , "100%", "150px");
//For Vietnamese User. Edit file editor.js to enable vietnamese keyboard
if(enable_vietnamese_keyboard==1){
document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\"richedit/avim.js\"><\/script>");
var hoteditor_avim_method = hot_readCookie("hoteditor_avim_method");var him_auto_checked="";var him_telex_checked="";var him_vni_checked="";var him_viqr_checked="";var him_viqr2_checked="";var him_off_checked="";if(hoteditor_avim_method=="0"){him_auto_checked="checked";}else if(hoteditor_avim_method=="1"){him_telex_checked="checked";}else if(hoteditor_avim_method=="2"){him_vni_checked="checked";}else if(hoteditor_avim_method=="3"){him_viqr_checked="checked";}else if(hoteditor_avim_method=="4"){him_viqr2_checked="checked";}else if(hoteditor_avim_method=="-1"){him_off_checked="checked";}
document.write("<div style=\'width:100%;text-align:center;font-family:Verdana;font-size:11px;\'><input "+him_auto_checked+" id=him_auto onclick=setMethod(0); type=radio name=viet_method> Auto :: <input "+him_telex_checked+" id=him_telex onclick=setMethod(1); type=radio name=viet_method> Telex :: <input "+him_vni_checked+" id=him_vni onclick=setMethod(2); type=radio name=viet_method> VNI :: <input "+him_viqr_checked+" id=him_viqr onclick=setMethod(3); type=radio name=viet_method> VIQR :: <input "+him_viqr2_checked+" id=him_viqr2 onclick=setMethod(4); type=radio name=viet_method> VIQR* :: <input "+him_off_checked+" id=him_off onclick=setMethod(-1); type=radio name=viet_method> Off<br><img src="+styles_folder_path+"/vietnamese_symbol.gif></div>");
}
function get_hoteditor_data(){
if (HTML_ON == "no"){
alert ("Please uncheck the HTML checkbox");
return false;
}
else{
setCodeOutput();
var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode
document.getElementById("message").value = bbcode_output;
}
}
</script><br />
<!--//HotEditor MOD Quick Reply -->
Hi,
Error:The message body was left empty ???
Hi,
Error:The message body was left empty ???
HI. Anyone knows how fix it ??
Thanks.
I have just installed the editor in my forum (1.1.5) and all is correct :D:D
Anyone know how to delete the copyright?? xD
I have just installed the editor in my forum (1.1.5) and all is correct :D:D
Anyone know how to delete the copyright?? xD
Really? great ! hmm why hasn't this been made into a package? its a great mod..
Parse error: syntax error, unexpected '=' in .../Themes/default/Post.template.php on line 633
624:
625: if(editor_type=="0"){//BBCode Editor
626:
627: WriteTEXT(text,"editor");
628:
629: }
630:
631: else{//WYSIWYG Editor
632:
633: text=BBCodeToHTML(text);
634:
635: WriteHTML(text,"editor");
636:
637: }
Is There SMF 2RC2 Version ?