Page 1 of 1

Nicedit

Posted: Sat Jun 02, 2012 10:29 pm
by jetshack
I've been messing with this for the better part of a day.

I've looked at about 30 wysiwyg editors focusing on the smallest footprint possible.

I've found nicedit.

I think this would absolutely rock as they allow the script to be run either from your site OR FROM THEIR SITE...

If you run it from their site that means theoretically you'd add a total of two lines of code to the base wondercms install thus only adding about .01k to the cms download.

If you include the entire package in the download it comes in at less than 23k.

I can't get it to recognize the textarea's in the edit in place editor. So far I've either managed to get it to do nothing (about 5 different ways I've tried) or I've managed to get it not to open up the edit in place function (2 different ways).

For someone knowing what they're doing this would probably take about 2 minutes. So I'm going to leave it here and hope someone else can figure it out.

Re: Nicedit

Posted: Mon Jun 04, 2012 6:19 am
by wiz
Thanks for the great find.

Glad you gave it a try, I'm going to try this, (if xss doesn't do it sooner (or better)). Externally isn't the best idea since they rely on their servers up-time. A good solution would be on the users server and downloading this as a plugin.
Hope to find a solution to this soon.

Re: Nicedit

Posted: Mon Jun 04, 2012 1:44 pm
by jetshack
rob wrote: Externally isn't the best idea since they rely on their servers up-time.
Normally I'd agree with you on this except, this is being hosted on MIT's servers and has been in place for over 5 years.

Re: Nicedit

Posted: Tue Jun 05, 2012 6:35 am
by wiz
I had no idea, but downtime is always possible, no matter who the host is. With some it's just unnoticeable, I'm really glad if they're one of them.
I believe users have more downtime than the MIT's servers, I just think they mind more if the downtime is caused by someone else. They also wouldn't blame WonderCMS for it (the downtime or the CMS itself being dysfunctional).

I guess we would have two options, hosting it on their servers or the option for them to download it and expand WonderCMS by those couple KB's.

I'm yet to test this out as soon as possible.

Re: Nicedit

Posted: Tue Jun 05, 2012 12:47 pm
by jetshack
rob wrote:I guess we would have two options, hosting it on their servers or the option for them to download it and expand WonderCMS by those couple KB's.
That was my thought also.

Re: Nicedit

Posted: Mon Jun 11, 2012 3:21 am
by jetshack
I've managed to get nicedit to work in a simple textarea element by adding these two lines:

Code: Select all

<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>
The Edit in Place file (editinplace.js) section which I think is where the inclusion would need to be worked in looks like this:

Code: Select all

//edit field created
function editBox(actual) {
//alert(actual.nodeName+' '+changing);
if(!changing){
width = widthEl(actual.id) + 20;
height =heightEl(actual.id) + 2;
str = actual.innerHTML;
actual.innerHTML = str.replace(/<br>/gi, "");

actual.innerHTML = "<textarea name=\"textarea\" id=\""+ actual.id +"_field\" style=\"width: "+width+"px; height: "+height+"px;\" onfocus=\"highLight(this);\" onblur=\"noLight(this); return fieldBlur(this,'" + actual.id + "');\">" + actual.innerHTML + "</textarea>";
changing = true;
}

actual.firstChild.focus();
}
I just can't get the two to play together... I'm sure I'm missing a ' or " or some such, but for the life of me a I can't figure it out.

Re: Nicedit

Posted: Sat Jul 14, 2012 7:19 pm
by wiz
Jetshack, thank you very much for making it work, even if not fully, this means a lot to everyone who has contributed to WonderCMS.
I'm going to try this as soon as possible, but I've been so busy lately I didn't even manage to reply.

Thank you again, you're an excellent contributor.
I also updated the list of donors on my personal website.

Re: Nicedit

Posted: Sat Apr 06, 2013 2:24 am
by Deckard
Has anyone gotten Nicedit to work with WonderCMS yet?

Re: Nicedit

Posted: Sun Apr 07, 2013 10:02 am
by wiz
Deckard wrote:Has anyone gotten Nicedit to work with WonderCMS yet?
Maybe someone has, but hasn't posted the solution yet. We're planning on integrating a WYSIWYG editor that will work by the end of the summer.

Re: Nicedit

Posted: Sat Nov 15, 2014 11:55 am
by turboblack
HI jetshack

I recently ran into this problem, try your addon, but it does not work on version 0.6

tell me how to fix this?