htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
htmlarea v3.0 smiley addon


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


netaustin
New User

Aug 5, 2003, 2:59 AM

Post #1 of 9 (7907 views)
Shortcut
htmlarea v3.0 smiley addon Can't Post

i wrote a free blog hosting site designed to compete with xanga, lj, blogger, etc. at http://www.jablog.com - it uses htmlarea 3.0a for blog posts, comments, and user web pages so that it can be mozilla compatible (i know it says don't deploy in production environments, but i've thoroughly tested it and it does everything i need).

anyway, blogs being blogs (and on the advice of my 14 year old sister), i modded htmlarea to include a smiley button that pops up a dialog with 20 license-free smilies. i imagined originally that someone had already bothered to do that, but it doesn't seem so...

i'm also working on a another, albeit more site-specific (PHP) mod. it accepts image uploads and then allows users to pick images from their library.

this mod took me under half an hour due to the exceptionally clear code written in the original 3.0a code, and i'm looking forward to creating more addons in the future.

if anyone is interested, i would be happy to provide all of my code modifications.

-austin


phunkphorce
New User

Aug 8, 2003, 6:18 AM

Post #2 of 9 (7855 views)
Shortcut
Re: [netaustin] htmlarea v3.0 smiley addon [In reply to] Can't Post

Hi! We're also building a blogging solution (not to compete with any, though... or at least, yet! ;)) at http://plog.sourceforge.net. I'd be interested in your modifications to allow people to add smileys to the text of the posts.

If you still don't mind sharing your changes... could you please email them to me at phunkphorce_AT_users.sourceforge.net???

Thanks!!! :)


Tobias
Novice

Aug 11, 2003, 5:39 PM

Post #3 of 9 (7809 views)
Shortcut
Re: [netaustin] htmlarea v3.0 smiley addon [In reply to] Can't Post

I'm interested in the smiley changes as well; I'd like to add them to my Zope integration (currently, old.zope.org might be better than www.zope.org), if it's license-technically possible Angelic.

Thanks!
-- Tobias --


Bart Stutton
New User

Aug 12, 2003, 2:16 AM

Post #4 of 9 (7799 views)
Shortcut
Re: [netaustin] htmlarea v3.0 smiley addon [In reply to] Can't Post

I'm interested in the smiley mod as well. If you're still sharing it, please send your changes to me at jselkins@yahoo.com Smile


mmcw
User

Aug 18, 2003, 4:58 PM

Post #5 of 9 (7737 views)
Shortcut
Re: [netaustin] htmlarea v3.0 smiley addon [In reply to] Can't Post

Could you help me to your modifications also?

Michel (mmcw@gmx.net)


Bart Stutton
New User

Aug 18, 2003, 5:14 PM

Post #6 of 9 (7735 views)
Shortcut
Re: [mmcw] htmlarea v3.0 smiley addon [In reply to] Can't Post

You'll probably need to e-mail Austin to get his smiley mod. That's how I got it. Wink


netaustin
New User

Aug 18, 2003, 7:42 PM

Post #7 of 9 (7731 views)
Shortcut
Re: [netaustin] htmlarea v3.0 smiley addon [In reply to] Can't Post

Here it is, should've just posted it in the first place. Wink

The simplest way to install: just unzip this archive in the root directory. It will replace your current htmlarea.js, add a folder "emoticons" with 20 free emoticons (decent variety, same style), and add insert_smiley.html into the popups section. If you've modified your htmlarea.js, you should go through my code and find the differences (every list at the top, a function about insert_image(), and an event handler towards the bottom... I think).

As with anything, your mileage may vary. Let me know if there are any problems.
Attachments: htmlarea-plus-smiley.zip (17.7 KB)


jean000
New User

Mar 29, 2004, 4:53 AM

Post #8 of 9 (6435 views)
Shortcut
Re: [netaustin] htmlarea v3.0 smiley addon [In reply to] Can't Post

Hi,
I'm trying out your smiley addon and i just can't get it to work.
I'm using v3.0
I've unzipped the zip archive in the root directory.
Next step was getting the javascript code to work in the htmlarea.js. After three attempts i don't get any errors, so think that file is allright now. ;)

The pop-up for the smilies is working fine, but the action for inserting the URL doesn't work.

function onOK(url) { if (document.all) { IEwindow.returnValue = url;} else {opener.Dialog._return(url);} } }


back in the htmlarea.js, the url is't defined after clicking on a smiley


HTMLArea.prototype._smiley = function() {
var sel = this._getSelection();
var range = this._createRange(sel);
var editor = this; // for nested functions
this._popupDialog("insert_smiley.html", function(url) {
alert(url); <--- i've added this, to check the url parameter, it is empty after clicking on a smiley
if(!url) {return false;}
etc etc etc..


Viperal
Novice

Aug 30, 2004, 7:34 PM

Post #9 of 9 (5530 views)
Shortcut
Re: [jean000] htmlarea v3.0 smiley addon [In reply to] Can't Post

here is the change that i did that made it work

Code
<script type="text/javascript"> 

function onOK(url) {
opener.Dialog._return(url);
window.close();
return false;
};
</script>

and in the htmlarea

in the this.btnList = { section

Code
		smile: [ "Insert an Emoticon", "ed_smile.gif", false, function(e) {e.execCommand("smile");} ]

in the HTMLArea.prototype.execCommand = function(cmdID, UI, param) {
section below like case "inserttable": this._insertTable(); break;

Code
case "smile": this._smile(); break;


HTMLArea.prototype._smile = function() {
var sel = this._getSelection();
var range = this._createRange(sel);
var editor = this;
this._popupDialog("insert_smiley.html", function(url) {
//alert(url);
if(!url) {
return false;
}
//editor._execCommand("insertimage", false, url);
editor._doc.execCommand("insertimage", false, url);
var img = null;
if (HTMLArea.is_ie) {
img = range.parentElement();
if (img.tagName.toLowerCase() != "img") {
img = img.previousSibling;
}
} else {
img = range.startContainer.previousSibling;
}
}, null);
};


Will be doing a new one but in php and fix xhtml stuff but i hope this helps you.


(This post was edited by Viperal on Aug 30, 2004, 7:36 PM)

 
 
 


Search for (options)