sNews Forum

sNews 1.6 (previous version) => 3rd Party Integration and bridges => Topic started by: Joost on June 03, 2007, 07:13:44 PM

Title: [Addon Package] Whizzywig editor
Post by: Joost on June 03, 2007, 07:13:44 PM
updated
Whizzywig editor is a lightweight editor (less than 40kb) developed by Unverse.net (http://www.unverse.net/). Whizzywig editor is also highly customiziable (http://www.unverse.net/customize-whizzywig.html).
- Produces valid xhtml
- Adds [break]
- Cleans up Word code. You don't need that, do you?!  :P  Answer: 'Of course not, It is for someone I know.'
- It works in internet Explorer and Mozilla/firefox

Here is the package (http://www.perceptieman.tomaatnet.nl/whizzywig-snews16.zip)
It is implemented in such way, that it will only load when the administrator is logged in. Visitors won't be able to use it to edit the contact form and it will not interfere with other javascripts used.

Here is a Whizzywig editor (http://www.unverse.net/wysiwyg.html) demo

What you need is:
Whizzywig.js (http://www.unverse.net/whizzery/whizzywig.js) 25,3 kB
xhtml.js (http://www.unverse.net/whizzery/xhtml.js) 4,91 kB
Optional:
Buttons (http://www.unverse.net/whizzery/buttons.zip) 5,45 kB


In snews.php, section '// TITLE' approximately line 327, look for:

Code: [Select]
if ($_SESSION[db('website').'Logged_In'] == token()) {js();}replace it with:

Code: [Select]
if ($_SESSION[db('website').'Logged_In'] == token()) {js();
 echo '<script type="text/javascript" src="whizzywig.js"></script>';
 echo '<script type="text/javascript" src="xhtml.js"></script>';
}
Note: Using this code, you will have to put whizzywig.js and xhtml.js in the directory where index.php resides. If you put the files somewhere else, change the path in the code.

Below // FORM GENERATOR approximately line 1054 look for:

Code: [Select]
case 'textarea': $output = '<p>'.$lbl.':
<textarea name="'.$name.'" rows="'.$rows.'" cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>'; break;
replace it with:
Code: [Select]
# Wyzz Text Editor Mod
    case 'textarea':
        if ($_SESSION[db('website').'Logged_In'] == token()) {
         $output = '<textarea name="'.$name.'" id="'.$name.'" rows="'.$rows.'" cols="80"'.$attribs.' style="width:97%;height:28em;">'.$value.'</textarea>
<script type="text/javascript">buttonPath = "buttons/"; makeWhizzyWig("'.$name.'","all"); </script>'; break;
        } else {
        $output = '<p>'.$lbl.':
<textarea name="'.$name.'" rows="'.$rows.'"cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>';
        }
        break;
note: You can adjust height and width by editing style="width:97%;height:28em;"


To disable sNews Editor's function buttons (line 1325 - line 1335), comment it out using /* This is a comment */. It should look like this like this:

Code: [Select]
/*---------
echo '<p>';
echo html_input('button', 'strong', '', 'B', '', 'button', 'onclick="tag(\'strong\')"', '', '', '', '', '', '', '', '');
echo html_input('button', 'em', '', 'I', '', 'button', 'onclick="tag(\'em\')"', '', '', '', '', '', '', '', '');
echo html_input('button', 'strike', '', 'Strike', '', 'button', 'onclick="tag(\'strike\')"', '', '', '', '', '', '', '', '');
echo html_input('button', 'p', '', 'P', '', 'button', 'onclick="tag(\'p\')"', '', '', '', '', '', '', '', '');
echo html_input('button', 'br', '', 'BR', '', 'button', 'onclick="tag(\'br\')"', '', '', '', '', '', '', '', '');
echo html_input('button', 'break', '', 'Break', '', 'button', 'onclick="tag(\'break\')"', '', '', '', '', '', '', '', '');
echo html_input('button', 'img', '', 'Image', '', 'button', 'onclick="tag(\'img\')"', '', '', '', '', '', '', '', '');
echo html_input('button', 'link', '', 'Link', '', 'button', 'onclick="tag(\'link\')"', '', '', '', '', '', '', '', '');
echo html_input('button', 'include', '', 'Include', '', 'button', 'onclick="tag(\'include\')"', '', '', '', '', '', '', '', '');
echo '</p>';
--------*/
If you want to add  a [break] button, insert this right after the disabled snews buttons
Code: [Select]
echo '<p><input type="button" value="Continue reading (break article)" onclick="insHTML(\'[break]\')"></p>';Of course, you can also insert [break] handcoded and use the function insHTML for something else.

Buttons
Unzip Buttons (http://www.unverse.net/whizzery/buttons.zip) and upload the file to the server.
In whizzywig.js, look for var buttonPath; and change it to var buttonPath = '/buttons/; (replace 'buttons' with the name of the directory, if needed).


Working with Whizzywig editor
This you should know, other functions are obvious.
Quote
If you want a new line without a paragraph break hold down the shift key:

Simply pressing Enter...

…gets a new para. But pressing Shift+Enter...
…gets a line break without a new paragraph.
Note: There is no such thing as a perfect editor. Whizzywig editor depends on the browser that is used. Unfortunately, there is no such thing as a perfect browser either, meaning: There might be, NO, GUARANTEED THERE ARE!! :P   some minor bugs.

(thanks to Sewen, who did the first mod for 1.5. and  Keyrocks. )
Title: [Addon] Whizzywig editor
Post by: tarmithius13 on June 03, 2007, 08:47:55 PM
Nice addition joost :D
Title: [Addon] Whizzywig editor
Post by: stephane on June 06, 2007, 02:54:35 PM
Hi,
I'm actually try this text editor, work's fine.
But I think there is some mistake in your "how to configure" !

To add buttons link, it's not in the whizzywig.js but in snews.php file
Code: [Select]
# Wyzz Text Editor Mod
    case 'textarea':
        if ($_SESSION[db('website').'Logged_In'] == token()) {
         $output = '<textarea name="'.$name.'" id="'.$name.'" rows="'.$rows.'" cols="80"'.$attribs.' style="width:97%;height:28em;">'.$value.'</textarea>
<script type="text/javascript">buttonPath = "buttons/"; makeWhizzyWig("'.$name.'","all"); </script>'; break;
        } else {
        $output = '<p>'.$lbl.':
<textarea name="'.$name.'" rows="'.$rows.'"cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>';
        }
        break;
Here --> script type="text/javascript">buttonPath = "buttons/";  Replace path by yours.

I first try in your way, but that doesn't work on my sNews 1.6. so I take a look further and I try in my way, that work fine  :P

To add french.js, or other  just copy from the language.js ans paste it in the whizzywig.js after var whizzies = new Array();
That all.

Another question about this text editor. I notice that when you hit "Enter" on your keyboard you ad a <p>
</p>  Why did he put a
 between the <p> ?? Ands this br balise is not valid xhtml ! Dam.
Any idea to take this
 off ?

Stéphane
Title: [Addon] Whizzywig editor
Post by: Joost on June 06, 2007, 06:21:21 PM
I discovered xhtml.js is not found always using different browsers. I will change that by linking directly through the template (index.php). I found uppercase tags in IE and lowercase (correct) in Firefox.
Which browser do you use, Stephane?
About buttons. Discovered I also link to them through snews.php . Mixup with another tutorial. I will correct this.
Title: [Addon] Whizzywig editor
Post by: stephane on June 06, 2007, 06:52:16 PM
I'm using FF & Safari on MacOS X.
But I expect that work's well also on IE, end user mostly visit website with IE  :(

I can't find where is this function to tell <p>
</p> ?? when you hit Enter on the keyboard. Strange code anyway !
Title: [Addon] Whizzywig editor
Post by: Artos Viros on June 06, 2007, 10:24:54 PM
There won't be a problem with your visitors, because this addon will only work for administrators, checkout the modifications

Quote
# Wyzz Text Editor Mod
    case 'textarea':
       if ($_SESSION[db('website').'Logged_In'] == token()) {
         $output = '<textarea name="'.$name.'" id="'.$name.'" rows="'.$rows.'" cols="80"'.$attribs.' style="width:97%;height:28em;">'.$value.'</textarea>
<script type="text/javascript">buttonPath = "buttons/"; makeWhizzyWig("'.$name.'","all"); </script>'; break;
        } else {
        $output = '<p>'.$lbl.':
<textarea name="'.$name.'" rows="'.$rows.'"cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>';
        }
        break;
Title: [Addon] Whizzywig editor
Post by: stephane on June 07, 2007, 12:28:02 AM
Oups  :/
you right Artos Viros.

But still doesn't explain the <p>
</p> code !
Title: [Addon] Whizzywig editor
Post by: stephane on June 09, 2007, 01:06:21 PM
xhtm.js is not found ! So I just put it in snews.php :

Code: [Select]
if ($_SESSION[db('website').'Logged_In'] == token()) {js();
echo '<script type="text/javascript" src="whizzywig.js"></script>';
echo '<script type="text/javascript" src="xtml.js"></script>';
}
Work fine with FF, and pages are valid  :|

I notice that whizzy editor didn't work well with Safari. Some buttons doesn't work. Anyway, It's not really important.

S.
Title: [Addon] Whizzywig editor
Post by: Joost on June 09, 2007, 05:31:55 PM
Thank you Stephane for testing, I have updated de mod. Actually it is the same code I used in 1.5. Don't know why I changed it for 1.6.  ::)
Title: Re: [Addon] Whizzywig editor
Post by: aronka on October 06, 2007, 09:33:52 PM
Is it possible to disable the editor in the contact page?
Title: Re: [Addon] Whizzywig editor
Post by: Joost on October 06, 2007, 10:43:43 PM
The editor is supposed to be only visible when logged in.So the visitors who cannot log in, will not see it.
It doesn't work for you that way?
Title: Re: [Addon] Whizzywig editor
Post by: dummy on October 12, 2007, 12:42:09 AM
This sounds awesome!!!
I always loved whizzywig  :)

Hey Joost,  Would it be possible for you to include the customized files and the whizzywig editor in new zip file for us to downnload so that we can have a current version of sNews with whiizzywig editor included?

This way it would be an out of the box installation. Maybe the developer could include it on the downloads page as an option?

Thanks much for your work here,
Jeff

PS: If you are not allowed to do that, maybe you could just email it to me?  ;)
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on October 12, 2007, 04:55:42 AM
Ok, here it is. sNews for dummies ;):
http://www.perceptieman.tomaatnet.nl/whizzywig-snews16.zip
The license (http://www.unverse.net/whizzery/licence-mit.txt) allows to do so: Copyright (c) 2005 John Goodman

This should work when uploaded to the same directory. Xhtml is generated and buttons included.
Update: whizzywig-snews.php must be changed to snews.php
Title: Re: [Addon Package] Whizzywig editor
Post by: dummy on October 12, 2007, 05:37:56 AM
sweet! ...is whizzywig eitor in there too? ...that's kind of a small doenload. ???
I hope it is???  ;D

Thank you!



Ok, here it is. sNews for dummies ;):
http://www.perceptieman.tomaatnet.nl/whizzywig-snews16.zip
The license (http://www.unverse.net/whizzery/licence-mit.txt) allows to do so: Copyright (c) 2005 John Goodman

This should work when uploaded to the same directory. Xhtml is generated and buttons included.
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on October 12, 2007, 06:16:44 AM
Yep, it is a lightweight editor.

Update: whizzywig-snews.php must be changed to snews.php
Title: Re: [Addon Package] Whizzywig editor
Post by: dummy on October 12, 2007, 02:59:54 PM
Got ya'  ;)

OMG dude! ...I just installed it and it is so cool!
Thanks so much for this!  :)
This makes sNews so better in my opinion. That was the only thing I felt sNews was lacking was a good WYSIWYG editor. I feel that they are a must in any cms today because without them, people who don't know html would be lost.  And I like simplicity when it comes down to a cms or sitebuilder.

This so Rocks!!! ...you have made my day Joost!


Update: whizzywig-snews.php must be changed to snews.php
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on October 12, 2007, 05:53:34 PM
Thank yo four your kind words Jeff. I agree that the average user needs an editor. However, sNews is a developers tool and the core engine is supposed to remain simple and small. So it is up to us to implement the tools needed. I've chosen Whizzywig editor, because it is small, others prefer the default editor, FCKeditor, Wym or TinyMCE.

Releasing out of the box (unofficial) packages has become a trend on the forum. Although I am reluctant to do so, when only small modifications are needed, maybe it is a good idea, when it concerns editors. When people need an editor, they surely are uncomfortable with making modifications to the engine.
Title: Re: [Addon Package] Whizzywig editor
Post by: jlhaslip on October 12, 2007, 08:36:14 PM
Quote
Arial, Arial Black, Comic, Courier, Georgia, Impact, Times New Roman, Trebuchet, Verdana

These Fonts show as being available at the site referenced in the Opening Post.
Can they be easily added to the Package?
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on October 13, 2007, 07:15:38 AM
Quote
Arial, Arial Black, Comic, Courier, Georgia, Impact, Times New Roman, Trebuchet, Verdana

These Fonts show as being available at the site referenced in the Opening Post.
Can they be easily added to the Package?


Websites don't send fonts to the browser, they tell the browser which fonts to use. So the fonts don't have to be included in the package. You can read more about fonts here: Fonts for the Internet: A list (http://snewscms.com/forum/index.php?topic=5423.msg35210#msg35210)
Title: Re: [Addon Package] Whizzywig editor
Post by: tyee on October 15, 2007, 08:42:54 PM
Will this mod work with Keyrocks "snews16mesu" version?? I would really like to add it in.

Thanks
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on October 15, 2007, 09:06:53 PM
Cannot help you. I don't know what's included in the memu package, how the backend (admin) works. The preview will be disabled for sure.
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on October 15, 2007, 11:04:11 PM
Will this mod work with Keyrocks "snews16mesu" version?? I would really like to add it in.
Thanks
It will probably work with both the MEMU and MESU packages... provided you follow the directions closely and know your way around your package pretty good. The sections for disabling the Editor button functions noted in Joost's directions are also in the MEMU and MESU packages... they just have a lot more stuff in them than in the default sNews package.
Title: Re: [Addon Package] Whizzywig editor
Post by: tyee on October 17, 2007, 05:10:42 PM
@Keyrocks
    Is this the part to disable the editor buttons --

Code: [Select]
/* -------------------- TEXT EDITOR FUNCTION BUTTONS (keyrocks) -------------------  */
### icon-button links to the Editor functions. Default strings commented out with // .
# Bold text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_bold.gif" alt="'.l('button_bold').'" name="strong" value="strong" onclick="tag(\'strong\'); return false;" />';
#Italic text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_italic.gif" alt="'.l('button_italic').'" name="em" value="em" onclick="tag(\'em\'); return false;" />';
# Strike-through text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_strikethrough.gif" alt="'.l('button_strike').'" name="del" value="del" onclick="tag(\'del\'); return false;" />';
# quad-left text, paragraph
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_left.gif" alt="'.l('button_textleft').'" name="p" value="p" onclick="tag(\'p\'); return false;" />';
# Centered text, paragraph
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_center.gif" alt="'.l('button_textcenter').'" name="centered" value="centered" onclick="tag(\'centered\'); return false;" />';
# Quad Right Text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_right.gif" alt="'.l('button_textright').'" name="right" value="right" onclick="tag(\'right\'); return false;" />';
# Justified text, paragraph
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_justify.gif" alt="'.l('button_justify').'" name="justify" value="justify" onclick="tag(\'justify\'); return false;" />';
# Position image right, with text-wrap
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/image-right.gif" alt="'.l('button_imageright').'" name="imageright" value="imageright" onclick="tag(\'imageright\'); return false;" />';
# Position image right, with text-wrap
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/image-left.gif" alt="'.l('button_imageleft').'" name="imageleft" value="imageleft" onclick="tag(\'imageleft\'); return false;" />';
# Return, new line - <br />
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/return.gif" alt="'.l('button_return').'" name="br" value="br" onclick="tag(\'br\'); return false;" />';
# [Break] article text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/break.gif" alt="'.l('button_break').'" name="break" value="break" onclick="tag(\'break\'); return false;" />';
# Insert image file-path, replaced by mattonik's Image Insert Panel
//echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/image.gif" alt="Insert Image Path" name="img" value="img" onclick="tag(\'img\'); return false;" />';
# Insert URL link
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/link.gif" alt="'.l('button_link').'" name="link" value="link" onclick="tag(\'link\'); return false;" />';
# Include File file-path
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/include.gif" alt="'.l('button_include').'" name="include" value="include" onclick="tag(\'include\'); return false;" />';
# Insert SEF link to Hidden Article content: (Mod Philmoz insertHA)
echo '<input type="image" '.db(website).'src="'.gl(sub_dir).'sn_icons/hidden_art.gif" alt="'.l('button_hiddenarticle').'" name="insert" value="insert" onclick="tag(\'insert\'); return false;" />';

# Insert Event Block (keyrocks)
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/block.gif" alt="'.l('button_block1').'" name="eventblock" value="eventblock" onclick="tag(\'eventblock\'); return false;" />';

I think that's all, please confirm.
tyee
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on October 17, 2007, 05:26:09 PM
Yessiree tyee... exacto-mundo. You will also want to comment out the echo '<p>'; string just before this section... and the echo '</p>'; that follows it (the paragraph tags). And... chances are you won't need to keep function tag(tag) active any longer either. It is located within the javascript functions section near the bottom of the core.php file... and you can locate it by searching for - // basic html textarea editor  . I suspect... although I haven't tried it... that you could remove the whole function as it appears that its' only purpose is to generate tags for the sNews Editor system.

Modding Tip: I don't know how you go about doing mod surgery like this. I suggest you make sure you have a back-up of your core.php file... at least your un-touched 'master' file-set... so you can always start over with a fresh file if you screw up along the way. I also create a "spare parts" folder somewhere... and create a new "spare-parts.php" file. I then copy into it... the code sections I am removing... and leave comments where I removed them to remind me of what I did... and I make a comment note at the top of the file to remind me of where the mod or removal location was in the file. Logging well along the way makes troubleshooting much easier later on.  ;)

Title: Re: [Addon Package] Whizzywig editor
Post by: tyee on October 17, 2007, 05:45:35 PM
@Keyrocks
     I just tried it by just doing what I listed above and it seems to work except I get huge buttons for the new Whizzywig editor. Do you know what controls the size of the editor buttons or do I just have to search for it in one of the .js files?

I will also try what you just suggested too!

Thanks
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on October 17, 2007, 05:59:48 PM
You have either something in your stylesheet that make the buttons big or accidentally deleted the endtag of a header (</h2>) or something alike.
Title: Re: [Addon Package] Whizzywig editor
Post by: BoltX on October 18, 2007, 08:05:44 PM
joost, I don't know if it is me or what, but after getting your 4Dummies version, and after doing it myself same result occured:

my PREVIEW didn't work. Anyhow, I looked at the snews code to generate code for TOGGLE(DIV) and I found a bizzare error where "PREVIEW" was labaled as CUSTOMIZE which in turn shows up 2 lines of code below.

Anyhow, I changed that to l.('preview') from l.('customize') and then had to go into updatePreview() javascript function to add a check for TEXT instead of TXT (lowercase) for getElementById(_text_).

That worked for me - so I went back to see what might be causing the confusion there (Firebug shows that ID for the text area is called TEXT, but in snews statement (where you replace textarea) there is NO id declaration (and since it's probably getting it from whyz, I added those getElementbyID checks in the func, and preview started working for me).

If more details are needed... feel free to post.

BTW, I love your add-on.

EDIT: will add affected code code here later.
Title: Re: [Addon Package] Whizzywig editor
Post by: tyee on October 23, 2007, 09:46:02 PM
Joost, you were right. Something in my css is making the buttons and the frame their in too large. I veritfied this by installing the snews-whizzywig mod only into the clean snews and get the same thing! I've tried to use firebug (Firefox css plugin) to analyze what is causing this but I'm not a css expert. Can't seem to find what's causing it. Any tips you can suggest  would be much appreciated.

I can see where the frame is being generated but can't locate any pixels dimensions anywhere except for the width (97%). Can't find anything about the height of the frame or buttons.
Title: Re: [Addon Package] Whizzywig editor
Post by: brauck on October 24, 2007, 04:09:08 PM
Quote from: BoltX
I found a bizzare error where "PREVIEW" was labaled as CUSTOMIZE which in turn shows up 2 lines of code below.

see this (http://snewscms.com/forum/index.php?topic=5621.msg36190#msg36190) post

Quote from: BoltX
my PREVIEW didn't work.

see this (http://snewscms.com/forum/index.php?topic=5603.0) post.

Hope this helps  :)
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on October 25, 2007, 04:12:23 AM
@Brauck / BoltX

Preview is not needed, when a wysiwyg editor is used, as both show the same content. You might want to update your code (http://snewscms.com/forum/index.php?topic=5603.msg36160#msg36160) (save the post without editing).

@tyee

In snews.php there is no styling for the buttons present. So it is in your stylesheet or there is a conflict with another jscript (Whizzywig editor works with default snews jscript). It is also possible, that your browser cannot handle Whizzywig editor its focus is on IE and Firefox.
Title: Re: [Addon Package] Whizzywig editor
Post by: brauck on October 26, 2007, 10:26:27 AM
Quote from: joost
Preview is not needed

You're right of course  ;D :P
Title: Re: [Addon Package] Whizzywig editor
Post by: Martin2007 on November 06, 2007, 11:07:59 AM
I installed the editor and its great. I just wanted to know if there is a way to switch between the editor and the standard sNews 1.6 word editor where you can manually enter codes. I was thinking along the lines of being able to enter customized <divs> in my stylesheet.

I really appreciate any help. Thanks.

Martin
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on November 06, 2007, 09:22:25 PM
As you can see in the first post (http://snewscms.com/forum/index.php?topic=4876.msg32220#msg32220) the default buttons are commented out. You could uncomment them, then click on the sourcecode button in Whizzywig and find out if you can insert tags with the sNews buttons. I haven't tested this.
Title: Re: [Addon Package] Whizzywig editor
Post by: Simon Whittaker on November 25, 2007, 05:44:00 PM
I have tried a number of different html editors for sNews and this one is by far the best!  :)

However, I have just one problem. I wonder if anyone can help me solve it without uncommenting all the normal sNews buttons.

I want to put an iframe on a page, but when I do that with the Whizzywig editor it won't save the page with the iframe in it. The iframe code disappears!

That's all I want to do! Then the Whizzywig editor will suit me just fine!

/Simon
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on November 26, 2007, 04:36:15 AM
You can click on the last button (html or <>) Have you tried pasting  the iframe code directly in the textarea ?
Title: Re: [Addon Package] Whizzywig editor
Post by: Simon Whittaker on November 26, 2007, 03:15:09 PM
Yes I have clicked on the html button and passed the iframe directly into the text area. I am quite used to writing pages directly in code, the whizzywig editor is for the benefit of other user users.

If I paste in the code into the text area and then click the "hide html" button I can see the page in the iframe showing in the editor. But when I press the save button the iframe code disappears.  ???

I have the original snews as snews.bak so I have swopped the two and tested the iframe in the original. The iframe works fine.

Interestingly, I put the iframe tag in <p> brackets. When I look at the whizzywig code I see the <p> brackets are still there but the iframe brackets have gone. Whizzywig doesn't seem to like iframes. That is bad news for me.
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on November 26, 2007, 03:56:49 PM
That's to bad, Simon. Even without editing with Whizzywig after inserting? Or maybe the cleanbutton is activated, when the submit button is pressed. Perhaps you can find out on http://www.unverse.net/ how to disable that 'feature'.
Title: Re: [Addon Package] Whizzywig editor
Post by: Simon Whittaker on November 26, 2007, 04:49:07 PM
Yes, I looked at www.universe.net  (http://www.universe.net) before to see if I could find a solution. What I should have done then was to find their online demo page and tried the iframe tag there.

I have done this now and guess what... when you make the page in html view and press the save button you can see the iframe tag disappear before your very eyes!

This is very bad news for me cos whizzywig is so easy and neat. But I need the iframes.

I have even tried to hide the iframe by using a some iframes_buffer code from www.dyn-web.com (http://www.dyn-web.com). But that didn't work either. All I got was the "your browser doesn't support iframes" message.

 :(
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on November 26, 2007, 05:05:21 PM
It would be nice if we could make it work. I found this:

There is a cleanfunction named gentleClean

Code: [Select]
var gentleClean = "true";  //true: cleanUp preserves spans, inline styles and classes; false: deletes same; ask: asks.As you can see, it is set to true. Set to false, it is even more nasty, set to ask, it will ask you polite, if you want this to happen. Hope that works.

One more note. Try using it in a different browser.
Title: Re: [Addon Package] Whizzywig editor
Post by: Simon Whittaker on November 26, 2007, 05:39:00 PM
Thank you so very much Joost!

Now I've got it to work!

I set the gentle clean to false, but that didn't work... so I commented out case "clean" and case "word" but that didn't work... so I tried again in Firefox instead of IE ... and then the iframe WORKED!

I'm not quite sure at which point it worked in Firefox, but the important thing is that it now works... I can work my way backwards to find the critical point.

I thank you again for helping out with this - for me - important problem. Whizzywig is now the editor of choice.
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on November 26, 2007, 05:54:37 PM
Good old FireFox :D Never let us down.
Title: Re: [Addon Package] Whizzywig editor
Post by: Simon Whittaker on November 27, 2007, 12:44:26 AM
Short lived happiness  :(

Tried to do the same thing again but it didn't work. Tried to look at the code for the page that did work and all the code for that page disappeared. And I mean ALL the code!

Have looked through the whizzywig faqs and forum but found no solution.

The only thing I can think of now is the insHTML function. Have tried a bit but haven't got it to work yet.
Title: Re: [Addon Package] Whizzywig editor
Post by: krko on April 12, 2008, 07:11:20 PM
Hello All,

Just discovered sNews and it's just what I've been looking for.
I'm using the sNewsMU (Multi User) version as this is what I need for my website and I'd very much like to know how can I integrate this addon into the MU version?

Thanks,
Goran
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on April 12, 2008, 07:41:56 PM
Hello All,

Just discovered sNews and it's just what I've been looking for.
I'm using the sNewsMU (Multi User) version as this is what I need for my website and I'd very much like to know how can I integrate this addon into the MU version?

Thanks,
Goran

Welcome to sNews Goran.
Follow the steps in the first post by Joost on the first page of this thread.
It appears that all of the steps are the same for the MU package... except for the first one... as the snewsMU.php file uses a longer login-check string file-wide than the one used in the default 1.6 snews.php file. Also, the line number references in Joost's post are no good to you... so just search for noted string-bits using the search function in your "good" code editing application.

Step 1 for sNewsMU 1.6:
Searching with ## MULTI USER will (should) bring you to all of the locations where scripts have been changed or added in relation to the default `.6 file. I am using an older release of the MU package as reference... but you will find this reference at the bottom of the // TITLE function:

Code: [Select]
<?php

## MULTI_USER
if ($_SESSION[db('website').'Logged_In'] == token() && get_identity($_SESSION['id'], 'level') < '4') {js();}
if ($_SESSION[db('website').'Logged_In'] == token()) {js2();}
## END MULTI_USER

?>


Replace it with:

Code: [Select]
<?php

## MULTI_USER
if ($_SESSION[db('website').'Logged_In'] == token() && get_identity($_SESSION['id'], 'level') < '4') {js();}
if ($_SESSION[db('website').'Logged_In'] == token()) {
js2();
echo '<script type="text/javascript" src="whizzywig.js"></script>';
echo '<script type="text/javascript" src="xhtml.js"></script>';
}
## END MULTI_USER

?>


Then follow the rest of Joost's instructions.  ;)
Title: Re: [Addon Package] Whizzywig editor
Post by: krko on April 12, 2008, 11:11:55 PM
Hello Keyrocks,

Works great! Thanks.
I've contributed a Hebrew translation of the Multi User version.
It's here: http://snewscms.com/forum/index.php?topic=4608.0

All best,
Goran
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on April 13, 2008, 02:18:51 PM
Hello Keyrocks,

Works great! Thanks.
I've contributed a Hebrew translation of the Multi User version.
It's here: http://snewscms.com/forum/index.php?topic=4608.0

All best,
Goran

Adn thank you for contributing your Hebrew translation Goran... I'm sure it will be appreciated by other members who need it.  :)
Title: Re: [Addon Package] Whizzywig editor
Post by: WDA1.com on May 28, 2008, 03:39:29 AM
Being such a new user to sNews, having WHIZZYWIG would do me wonders, but I really can't seem to figure out how to get this installed.  I don't suppose someone would be willing to assist me in the install of this?  I seriously am NOT that versed in this enough yet to do this on my own.  Any assistance would be VERY welcome. 
If someone could email me at wda1@wda1.com or IM me on AIM or YAHOO!  (screen name: triandrew2001)  I would greatly appreciate it.

Thanks...

-andrew
Title: Re: [Addon Package] Whizzywig editor
Post by: Jochum Meester on June 07, 2008, 06:12:10 PM
Hi everyone! Nice to be back here again (since quite some time!),

I've used this editor for sNews 1.6 and I found the following
(hope this hasn't been mentioned in this topic already, didn't really check to be honest... :-[)
on the Contact page, the word that describes the textarea (Message isn't it?) is aligned to the right. Screenshot here:
(http://img79.imageshack.us/img79/882/vdwydeblikcontactax8.th.jpg) (http://img79.imageshack.us/my.php?image=vdwydeblikcontactax8.jpg)

Did anyone else get this? Is there a fix for this?


EDIT: I already found a solution in the following line (which was added to implement whizzywig):
Code: [Select]
$output = '<p>'.$lbl.':<br />That break (<br />) is not in there (though it is visibly written by the coder who wrote it), but should be in there in my case, otherwise the textarea immediately follows the 'message' word. That's probably why the word was aligned as for to the right as possible.


Full code (see 6th line):
Code: [Select]
case 'textarea':
        if ($_SESSION[db('website').'Logged_In'] == token()) {
         $output = '<textarea name="'.$name.'" id="'.$name.'" rows="'.$rows.'" cols="80"'.$attribs.' style="width:97%;height:10em;">'.$value.'</textarea>
<script type="text/javascript">buttonPath = "buttons/"; makeWhizzyWig("'.$name.'","all"); </script>'; break;
        } else {
        $output = '<p>'.$lbl.':<br />
<textarea name="'.$name.'" rows="'.$rows.'"cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>';
        }
        break;
}
echo $output;
}


To find out where the above code needs to go in snews.php, check the topic's first post.
Title: Re: [Addon Package] Whizzywig editor
Post by: oka on July 07, 2008, 04:14:45 PM
thanks for the add on..  ;D




___________________
Oka
www.dayendra.web.id (http://www.dayendra.web.id)
Title: Re: [Addon Package] Whizzywig editor
Post by: Simple on August 18, 2008, 02:49:42 PM
Did anybody tried to put this on sNews 1.7? I treid, but it doesn't work. can anyone give me some hints?
This is what i've done:
- extracted the js's in the js folder.
- at function title(), i've replaced:
Code: [Select]
if ( $_SESSION[_SITE.'Logged_In'] == token()) {echo '<script type="text/javascript" src="js/admin.js"></script>';}with;
Code: [Select]
    if ( $_SESSION[_SITE.'Logged_In'] == token()) {echo '<script type="text/javascript" src="js/whizzywig.js"></script>';}
    if ( $_SESSION[_SITE.'Logged_In'] == token()) {echo '<script type="text/javascript" src="js/xhtml.js"></script>';}
}
- in the // FORM GENERATOR i've replaced:
Code: [Select]
case 'textarea': $output = '<p>'.$lbl.':<br /><textarea name="'.$name.'" rows="'.$rows.'" cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>'; break;with
Code: [Select]
# Wyzz Text Editor Mod
    case 'textarea':
        if ($_SESSION[db('website').'Logged_In'] == token()) {
         $output = '<textarea name="'.$name.'" id="'.$name.'" rows="'.$rows.'" cols="80"'.$attribs.' style="width:97%;height:28em;">'.$value.'</textarea>
<script type="text/javascript">buttonPath = "buttons/"; makeWhizzyWig("'.$name.'","all"); </script>'; break;
        } else {
        $output = '<p>'.$lbl.':
<textarea name="'.$name.'" rows="'.$rows.'"cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>';
        }
break;
And so far it should work, no? :)

EDIT: I figure it out eventually :). If that's ok, i will post the steps on the dedicated forum for sNews 1.7.

Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on August 18, 2008, 05:35:19 PM
EDIT: I figured it out eventually :). If that's ok, i will post the steps on the dedicated forum for sNews 1.7.

Thanks. Yes, post it in 1.7RC once you have it working smoothly.  :)
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on November 12, 2008, 05:12:15 PM
I just downloaded and installed this Editor on my localhost sNews 1.6 Modular project... using Joost's package for reference and files... and noticed that the word.gif image was missing in the buttons images folder. If anyone else has found it missing in their buttons folder... you can go to the Official Demo page (http://www.unverse.net/wysiwyg.html) and right-click on the "Word" button in the Editor Button bar... click "Save Picture as..." and save the word.gif to your folder location.

I haven't given it a full test-run yet but will do so now.
Title: Re: [Addon Package] Whizzywig editor
Post by: funlw65 on November 12, 2008, 05:42:49 PM
I just downloaded and installed this Editor on my localhost sNews 1.6 Modular project... using Joost's package for reference and files... and noticed that the word.gif image was missing in the buttons images folder. If anyone else has found it missing in their buttons folder... you can go to the Official Demo page (http://www.unverse.net/wysiwyg.html) and right-click on the "Word" button in the Editor Button bar... click "Save Picture as..." and save the word.gif to your folder location.

I haven't given it a full test-run yet but will do so now.

I had this experience with it:
 - when you are logged in, the editor is loaded on every comment form, and is slow and annoying. I tested it for clients but I given up. Is not user error proof... I'm curious what is your conclusion.
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on November 12, 2008, 06:15:55 PM
General Overall Impression: It is definitely a very small package - just 35.9KB with the buttons images folder and 2 jscript files in one folder. On the down side... Although it applies to the Contact and Comment forms only while you are logged in as the Admin, performance suffers (slower loading) as a result. And it seems to have some quirky characteristics which make it not-so-convenient to use.

For example... (in IE7) if you have already applied styling and another font to your content and you apply some other buttons to some copy... all of the content reverts back to its default font with no styling... making it necessary to apply all your font and styling choices over again. Perhaps this becomes less of an issue when you develop the habit of getting all your content and images into place and complete all editing and leaving the styling, font and style changes to the end before saving.

I also noticed that - although bullet and numbered lists are applied in the Edit view... they are not applied in the normal display after editing. These tests are with a default style.css file so there should not be any styling conflict.

Including an Image in Content: The image inclusion panel requires you to write or paste in the full URL to the image. This can be a bit inconvenient, since the image must already reside on your (or someone else's) server before you use it. With sNews, you would need to upload the image first using the sNews Files Upload Panel... then go back to your article Edit panel and write in the full URL to the image where it is on your server.

Personally... if I needed a wizzy editor, I would not choose this one.
Title: Re: [Addon Package] Whizzywig editor
Post by: Joost on November 13, 2008, 03:30:44 AM
I had this experience with it:
 - when you are logged in, the editor is loaded on every comment form, and is slow and annoying. I tested it for clients but I given up. Is not user error proof... I'm curious what is your conclusion.

I am sure there's a way to make it load on admin pages only. I didn't find it that important, since I used it on a project where comments is disabled.
Sure it is not user error proof. No editor is. Do you have any idea the "creativeness" of people to mess up? No matter whether you install FCKeditor tinymce,... whatever. They always find a way. ;D
I always discuss fonts, colours, headers, backgrounds, image positioning etc. and implement it in a stylesheet. That way, they won't have to add style by means of the editor.... wrong assumption. ::)
Whizzywig is quite nice for writing text without having to look at html. And you can paste Word in the editor. But don't use it to paint a van Gogh ;)
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on November 13, 2008, 02:48:26 PM
Whizzywig is quite nice for writing text without having to look at html.

Yes it is. Which causes me to wonder if we might be able to modify the sNews Simple Editor so that the user could simply switch the main textarea to "Preview" and back to "Compose" (html view) to view the results quicker than having to click the "Preview" panel and have both open at the same time?
Title: Re: [Addon Package] Whizzywig editor
Post by: zippoxer on March 04, 2009, 05:33:22 PM
Please help me change the Whizzywig textbox's direction to RTL (right-to-left)
I tried but I didn't succeed.. :(
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on March 06, 2009, 09:16:37 PM
Please help me change the Whizzywig textbox's direction to RTL (right-to-left)
I tried but I didn't succeed.. :(

I would not be able to help you on that one.
You might have some luck looking for help on the Whizzywig website and/or help forums for information on how to modify the script.  ;)
Title: Re: [Addon Package] Whizzywig editor
Post by: ewroman on March 31, 2010, 10:06:02 PM
EDIT: I figured it out eventually :). If that's ok, i will post the steps on the dedicated forum for sNews 1.7.

Thanks. Yes, post it in 1.7RC once you have it working smoothly.  :)

i have integrated whizzywig editor to the 1.7 version.

on //TITLE section (line 252) where it says ;

Code: [Select]
if (_ADMIN) {
echo '<script type="text/javascript">';
include('js/admin.js');
echo '</script>';

replace this with:
Code: [Select]
if (_ADMIN) {
echo '<script type="text/javascript">';
include('js/admin.js');
echo '</script>';
echo '<script type="text/javascript" src="whizzywig.js"></script>';
echo '<script type="text/javascript" src="xhtml.js"></script>';

and also on // FORM GENERATOR section (line 1558)
Code: [Select]
/*case 'textarea':
$output = '<p>'.$lbl.':<br />
<textarea name="'.$name.'" rows="'.$rows.'" cols="'.$cols.'"'.$attribs.'>'.$value.
'</textarea></p>'; break;*/

replace with
Code: [Select]
if (_ADMIN) {
         $output = '<textarea name="'.$name.'" id="'.$name.'" rows="'.$rows.'" cols="80"'.$attribs.' style="width:97%;height:28em;">'.$value.'</textarea>
<script type="text/javascript">buttonPath = "buttons/"; makeWhizzyWig("'.$name.'","all"); </script>'; break;
        } else {
        $output = '<p>'.$lbl.':
<textarea name="'.$name.'" rows="'.$rows.'"cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>';
        }
        break;

at the code above where it says = "buttons/" it is the wihzzywig button icon folder, replace it with yours.

it worked for me, (inshaallah I didnt write wrong forum topic, place)  :)




Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on March 31, 2010, 11:08:36 PM
i have integrated whizzywig editor to the 1.7 version.

Thanks for sharing ewroman... here is fine...  8)and welcome to the sNews Project.
Title: Re: [Addon Package] Whizzywig editor
Post by: dissoww on May 19, 2010, 12:37:47 AM
:-[
It won't work for me.

I'm new to "snwes" an the Whizzywig editor will not work for me. Where to put all the files?
Past the line in to snews.php (line number are differed in my file version snews17_may.12.10). Whizzywig editor last version March 12, 2010.

Thanks so
dissoww@hotmail.com
Title: Re: [Addon Package] Whizzywig editor
Post by: kreatur on May 19, 2010, 03:13:43 AM
Past the line in to snews.php (line number are differed in my file version snews17_may.12.10).
This is for 1.6, what you're looking for can be found here: http://snewscms.com/forum/index.php?board=99.0
Title: Re: [Addon Package] Whizzywig editor
Post by: alks on September 23, 2010, 04:11:46 PM
I'm really confused now. Just completed my project only to find (while updating the content for the new site) a bizzare problem that i have no idea how to solve. Everything appears to be fine apart from this.

If i paste content into the editor (from word or just content from notepad) the text goes in just fine ........but when i come to save/edit the new article or page the changes are not saved to the database !!  ??? ???

If i type the text in instead it does!. There is no visual differnce between the two methods, both add text into the editor - when checking html mode there is nothing differn't between the two (the text is there between 2 <p> tages). They are identical.

So why will the page / article not save if i use the paste method? Anybody any ideas?
 I have users waiting to try out their new website and this fault is really badly timed. :'(


alks
Title: Re: [Addon Package] Whizzywig editor
Post by: Fred K on September 23, 2010, 05:22:00 PM
alks, this is just a guess - I have not worked with the Whizzywig editor and I don't use either Word or Notepad so I may be completely wrong - but it could be the old "crap code" problem that appears here for some reason. E.g. the fact that Word at least has a tendency to add extra things when text is copied from it and pasted in other environments. I know for a fact that similar problems to this happen (or happened, not sure if it's been fixed now) in Freeway when pasting text from Word. One way to try and find out is to paste the text in a good text editor - I hear that Notepad++ is better than Notepad for example - and then copy the text in that editor and paste it into an sNews article. Just to see if there's any difference.

Other than that, sorry, I don't have a good idea.
Title: Re: [Addon Package] Whizzywig editor
Post by: alks on September 23, 2010, 08:19:16 PM
Fred k , thanks for your ideas. I tried notepad becuse it would not add any extra junk - but now i have discovered the situation is even more weird.

Ok i typed some text in word then pasted it into whizziwig and it worked - great!! but then i pasted another paragraph from the same word document and suddenly it didnt work. Tried a few times no luck then suddenly it works again. I tried pasting some text directly from another website but this didnt work, but i remember it did work the first time i tried to do this when i was testing the website. So the problem seams to be coming and going which makes it even more diffiuclt to solve. There must be something causing this but all my tests seam to throw up no clues so far - it just seams to randomly occuring at the moment.  ???

update: anything pasted from another webpage defo will not work. Pasting from word seams to be working two thirds of the time now - weird. It must be some extra markup or something effecting things but i cannot see what it is at the moment.
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on September 23, 2010, 09:23:13 PM
@ Alks... a couple of questions...
1. Are you doing the testing offline (locahost) or online?
2. What browsers are you viewing in after each save... IE or F-Fox... or both?

This may or may not apply in your case but... once in a while, when doing edits on my localhost machine, I've experienced edits not showing right away.
In such cases I always keep a browser tab open with my database up in phpMyAdmin and refresh the articles table after each edit to see if the edit has been saved to the articles table... and it was always saved even though it didn't show right away. I assumed this was due to a caching problem.

I never copy and paste directly from a Word file... I copy/paste into a Notepad .txt file to be sure it's 'clean' and then copy/paste from there into the sNews textarea. I've worked a bit with TinyMCE and it always works OK for me... but I have not worked with Whizzywig.
Title: Re: [Addon Package] Whizzywig editor
Post by: alks on September 23, 2010, 11:47:21 PM
Hi Keyrocks, yes i am testing both online and off line.

But.... i have found the problem - trouble is i dont know how to fix it. After testing for hours today i have just discovered that i cannot enter any text (even with just typing in the text) or paste in any text that has a single apostrophe in it.
The problem lies with apostrohe's. I thought it was just a paste problem but it seams its quite a major problem. I have discovered that if i enter two apostrophe's together  i.e. Haven''t then it will work. When i go back to the editor later the second apostrophe has disapeared and only 1 remains. Becuse i'm having multiple users edit this website i really need this to be working correctly. I'm not sure if the problem is with the editor or with snews??

Not sure what to do about it at the moment....

Title: Re: [Addon Package] Whizzywig editor
Post by: Fred K on September 24, 2010, 02:15:42 AM
Aha. I thought the single apostrophe bug had been fixed ages ago, at least when they appear in the title. I personally have not had any problems with single apostrophes in content but that doesn't mean it doesn't happen. To determine whether the problem is with sNews or the whizzy editor, try pasting the same test (including single apostrophes) in one installation that doesn't have the whizzywig editor and in one installation that has it. I appreciate that it's a bit extra work but it should give you proper clues.
Title: Re: [Addon Package] Whizzywig editor
Post by: Keyrocks on September 24, 2010, 02:16:32 AM
After testing for hours today i have just discovered that i cannot enter any text (even with just typing in the text) or paste in any text that has a single apostrophe in it.Not sure what to do about it at the moment....

Hmmm... this seems to ring a bell in my mind but I can't put my finger on what it was at the moment... (titles?).
I haven't experienced the apostrophe issue with the sNews Editor itself though.

Perhaps it has something to do with the database character setting???
When I create new d-bases, phpMyAdmin has a "Collation" field beside the database name field.
I always choose utf8_unicode_ci (at the bottom of the list) ... and be sure that either utf8_general_ci or utf8_unicode_ci is in the mysql connection collation field below it... before hitting the CREATE button.
Title: Re: [Addon Package] Whizzywig editor
Post by: alks on September 24, 2010, 10:31:01 AM
Ok i have done some more testinga nd changes.

@Fred k , I removed the editor from my snews installation and when using the default snews editor there were no problems with using single apostrophe's. It seams there is something going on with the editor ?

@keyrocks, My database collation was set to latin1_swedish_ci this shoud make no differnce as this setting is the same as english anyway and ive always used this collation setting. However i did change my database to utf8_unicode anyway just in case and it made no differnce.

This error must have appeared for everyone using the whizziwig editor and snews i would think?

Any ideas where i go from here?

thanks for your help

alks
Title: Re: [Addon Package] Whizzywig editor
Post by: Fred K on September 24, 2010, 09:14:13 PM
To find out why Whizzy causes the problem I'd suggest talking to the people behind the editor and see if they have any suggestions how to fix it. I've never used it so I can't really say.

One way to get around the problem is to tell your editors that instead of the lazy normal single quote they have to use the typographic single quote (on my Mac keyboard it’s shift+alt+'). However in order for it to work across the board you would do well to set the db collation to utf8_general_ci or utf8_unicode_ci per Keyrocks' suggestion earlier, as well as making sure that all your snews files (index.php, snews.php) are using the UTF-8 charset setting AND that UTF-8 is set as the charset in your Admin panel -> Settings ->Time/Locale. I do this all the time on my own sites. I understand that it may not be entirely easy to get people to do that, at least not if they're used to typing the standard single quotemark, but it would most likely help. Of course you'd have to try it in Whizzywig first to make sure it actually works.

Another approach might be to change to a different editor, TinyMCE for example. I can't say for sure if it would help with the single quotemark problem, but it might. I have a couple of clients where I've used TinyMCE as the editor in sNews and none of them have reported any problems of this nature. Last resort could be to go with the default sNews editor and tell the editors how to use the various buttons to get the basic HTML right.
Title: Re: [Addon Package] Whizzywig editor
Post by: alks on September 25, 2010, 11:43:19 AM
Thanks Fred,

I cant ue the default editor as it was a requiremnet that a wizziwig style editor was used. It also has the advantge of a file upload and browse facility as an extension - making uploading images easy for the user as it automatically puts the correct link in place. I might take a look at fckeditor at some point also. I would try tinyMce but there is no image facilty unless you pay - plus its bigger file.  In fact overall Whizziwig seames very small, fast loading and simple to use so far.

Since the apostrophe does not effect the standard snews editor - it must be the whizziwg thats somehow causing it so i assume that an adjustment in the code for it will work but since its not my program it would take ages to find out what - if at all. Ive had a look at the code but as yet have no clue. The only hack for it so far is to make sure you put two apostrophes togther then when it saves only one will remain.

im assuming that this apostrophe problem has come up before with snews then?

alks
Title: Re: [Addon Package] Whizzywig editor
Post by: Fred K on September 26, 2010, 09:12:20 PM
Quote from: alks
im assuming that this apostrophe problem has come up before with snews then?

Yes, it was an issue way back in the early days but that was when using quotes in article/page titles. I can't recall it ever having been a problem in the article body.
Title: Re: [Addon Package] Whizzywig editor
Post by: alks on February 08, 2011, 01:40:03 PM
Ok, I have been looking at this issue again and found a fix from older post that seams to make apostrophes work with whizziwig on my 1.6MU.

http://snewscms.com/forum/index.php?topic=4629.0

Adding this fix appears to solved the problem. I'm not sure why it would work but if I use the default Snews editor on the same server it doesn't need the fix!! How strange ??. I might double check this at some point but for now it appears (unless anything else crops up due to the fix) that everything is working.

**edit : my single user version does actually have the fix - it just doesn't appear to be on the MU version so therefore the MU package will need to be updated with the fix which is on the 1.6 version**

alks