New Addon: cra_RTE v0.5b -- First Release

All new Coranto Addons, updates and patches to addons, will be released here...also, get support for addons within!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

New Addon: cra_RTE v0.5b -- First Release

Postby Jahandar » Sun Aug 28, 2005 6:33 am

Hello, I've been working on this off and on for my own use, so it was originally pretty specific just to my needs (For the curious you can see my first frustrations that led me to begin this addon). I've been working to make it more generic, and have completed enough that I think I can share what I have so far.

While it is a great addon, the htmlArea program that WebWriter is based on is not as stable as I would like on all browsers and can be quite difficult to modify, among other things.

This addon uses a modified version of Kevin Roth's Rich Text Editor (which is how the addon got its name), but does much more than just rich text, it is a full WYSIWYG HTML editor.

I've found RTE to be quite stable on all browsers, plus it is very easy edit, and it is public domain software that is actively maintained on Kevin Roth's forum.

The ease of editing is key IMO, because it means more improvements and options, and tailoring the editor for use with Coranto.

The changes I've made to the standard RTE include:

• Improved Image Insertion Dialog
Designed with the categories addon and multipart addon (with NetPBM) in mind, this addon employs a perl fetcher program to find images for each category, distinguishing thumbnails from regular images. From the dialog window, you can chose the category you want to see the images available for that category.
Then you have several options. Display as thumbnail, Link to Fullsize, Create a caption below the image, etc.

• Insert Custom Code Snippet Dialog
If you have a lot of prefab snippets of code that you use over an again, you'll love this. A perl fetcher finds your snippets and makes them available in a select box. Just choose the one you want and insert it into your post.


To see a live working demo of my version of the RTE editor, go here

Note that this is beta, and the setup procedure is a tad rough at the moment, especially since it was originally designed for me and my websites and the way I have things set up may differ from the way you do. There is no Coranto-Style documentation or settings interface yet.

Further development will largely depend on how much interest there is in this addon.



SETTINGS

Again, this version doesn't have a friendly settings interface yet, so you'll have to do things the old fashioned way. Sorry, I know its a pain.

Check for variables at the beginning of the three cra_* files.

If your path to coranto is not /cgi-bin/coranto then modify following SSI calls:
Line #67 inside rte/insert_Snippet.shtml
Line #183 inside rte/insert_Image.shtml


INSTALLATION

Upload to Coranto cgi-bin folder (wherever you normally put addons, eg /cgi-bin/coranto):
cra_RTE.pl
cra_RTE_buildImageSelector.cgi chmod to 755
cra_RTE_buildSnippetSelector.cgi chmod to 755

Upload to Includes folder (usually /content/includes):
rte folder

Upload Wherever:
popup.js


SETUP
• Enable the addon via the Coranto admin interface
• If you plan to use the 'Link to Larger Version' feature when adding images, make sure the popup.js file (or just the function inside it) is made available on your news pages.
The easiest way is to have <script language="JavaScript" type="text/javascript" src="popup.js"></script> in your page header
• Create snippets by placing each snippet in a separate file (txt, html, shtml, htm) inside the snippets folder you specified.
The filename will be used as the snippet's name in the select box.
• NEW In the Coranto News Fields page, click to edit the Text field and set "Convert Newlines" to Off. This will prevent goofy behavior with tables, RTE will handle the newline conversions when needed.



Planned/Possible Improvements:
• All - Documentation (via Coranto)
• All - Settings interface (via Coranto)
• All - Better integration with Coranto (retrieving vars, auto-detecting categories, etc.)
• RTE - Use Coranto's CSS
• RTE - Fullscreen toggle
• RTE - Support for alternative spellcheckers
• RTE - Better support for alternative spellcheckers and a html2xhtml script that is free for commercial use
• RTE Image Inserter - support for alternative thumbnail naming schemes and alternative popup scripts
• RTE Image Inserter - toggle for display of thumbnails in the list; possibly button to toggle this as a filter in the insert image dialog window
• RTE Image Inserter - textarea showing code to be generated for advanced editing
• RTE Image Inserter - Set height and width attributes; perhaps generate pseudo-thumbnails by this method
• RTE Image Inserter - Support for any other attributes I missed.. border, style, id
• RTE Image Inserter - Set default values for all form elements
• RTE Image Inserter - option to disable image selector for those who don't want/need it, for a speed gain
• RTE - Buttons to expedite working in HTML mode (auto-insert tags, etc)
• cra_RTE - Give the option to use RTE for creating/editing styles
• cra_RTE - Adaptability to work with other versions of RTE readily
• All - Code Hooks (under consideration.. would forever separate this plugin's version of RTE from any other, making the adaptability idea above impossible)
• RTE - compress richtext.js
• NEW: RTE - More buttons for working with tables
• NEW: RTE - New Dialog: I don't care for them, but other people may like a smiley inserter
• NEW: RTE - Tutorial on how to add new buttons/dialogs to the RTE editor

Known Issues:
• In IE only, If you add an image then select it then click the add link button, you'll get a javascript error. (RTE problem)

NOTE: The html2xhtml.js is included but untested and currently disabled. It is developed by someone else altogether and free for noncommercial use. See html2xhtml.js for more info.
NOTE: Be careful with the Search and Replace tool, as it replaces markup as well as normal content
NOTE: The image inserter currently distinguishes thumbnails by the "_thumb" suffix, with NetPBM in mind. More flexibility for this is planned.


Test Server:
I did my testing on a linux server with Perl, SSI, Coranto v1.24 and the following addons installed: Maginot, Multipart, News Categories, X MultiSubmit, Modify News: Include Field, Modify News: User Column

Download it here!

I would greatly appreciate any feedback, suggestions, bug reports, fixes, improvements, etc. Please post them or any questions you have to this thread.


I hope I haven't forgotten anything.. starting to get screen fatigue :)
Last edited by Jahandar on Mon Aug 29, 2005 3:10 pm, edited 12 times in total.
Jahandar
 
Posts: 64
Joined: Mon Mar 28, 2005 1:27 am
Location: USA

Postby SrNupsen » Sun Aug 28, 2005 8:35 am

Tried the demo for 5 minutes... I really like this. I was using Webwriter myself, but couldn't get it to work in a stable manner. I also very much like what's on your TODO-list. Unfortunately I'm no coder; I would love to help you out.

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Psykosys » Sun Aug 28, 2005 1:06 pm

I'm really interested in trying your addon, Jahandar (especially because I made a go at using RTE with Coranto for awhile and then gave up - it's a lot more code then I thought it'd be). I can't get it through your link, did you take it down/reupload with a higher version number?
Psykosys
 
Posts: 252
Joined: Tue Apr 15, 2003 10:37 pm
Location: Ithaca, NY

Postby Jahandar » Sun Aug 28, 2005 4:10 pm

Download link fixed, sorry about that. That's what I get for editing posts at 2:30. :)
Jahandar
 
Posts: 64
Joined: Mon Mar 28, 2005 1:27 am
Location: USA

Postby perlman » Sun Aug 28, 2005 8:49 pm

Your addon is really great!
Have been waiting for something more stable, so thank you for making it!
And your list of improvements looks good.
perlman
 
Posts: 64
Joined: Fri Jun 06, 2003 3:29 pm

Postby Von Snellfharer » Thu Sep 01, 2005 9:18 am

Hi.

I'm so happy to see progress on Coranto development; addons, new structure etc.
This addon looks great!

I have one suggestion though. This editor can't 'remember' image paths. I tried placing an image and then i marked it, klicked om the image symbol to change alignment from right to left but the popup didn't contain any code for the present image.

This can be done in HTMLArea 2 (M$ IE only) and Spaw Editor.
Is it possible to use Spaw as an alternative?
Von Snellfharer
________________________________________
last of the fullgrown men
User avatar
Von Snellfharer
 
Posts: 255
Joined: Fri Jun 21, 2002 8:03 am
Location: Semi arctic

Great start please keep up the good work!

Postby kire1master » Wed Sep 07, 2005 11:23 pm

"Further development will largely depend on how much interest there is in this addon. "

I have also had many problems with WebWriter and check for updates often. I love the improvements you have made and would like to see your checklist come to pass.

Keep it up!
kire1master
 
Posts: 1
Joined: Wed Sep 07, 2005 11:16 pm

Postby Jahandar » Thu Sep 08, 2005 6:25 am

Von Snellfharer wrote:I tried placing an image and then i marked it, klicked om the image symbol to change alignment from right to left but the popup didn't contain any code for the present image.


You are right, I will look into fixing this for the next version. (Update: Read next post)

I looked at Spaw, it has a nice feature set, but its a bit slower, requires PHP or ASP, and it isn't free for commercial use.

At this point I've settled on RTE and have it working sufficiently for my own needs. I certainly don't have time to start over with another editor. It is nice though, and I will certainly keep it in mind as I develop RTE.
Last edited by Jahandar on Thu Sep 08, 2005 7:19 am, edited 1 time in total.
Generic Editor Adaptor (GEA) - Use virtually any WYSIWYG HTML Editor in Coranto
cra_RTE - WYSIWYG HTML Editor for Coranto posts
HowTo: Fix Reply Links when using ShadowMail and Private Messenger together
Jahandar
 
Posts: 64
Joined: Mon Mar 28, 2005 1:27 am
Location: USA

Postby Jahandar » Thu Sep 08, 2005 7:17 am

Actually, you can already avoid this behavior using the insert image dialog, just set your alignment to "None." That will allow you to change the alignment using the toolbar buttons.

The reason why it causes problems is because the these editors use the HTML/DHTML JustifyLeft (or whatever) commands, which basically wrap whatever is selected with <P align="X"></P> tags. This is true in RTE, WebWriter and Spaw. My image inserter adds sets the align attribute in the IMG tag, overriding that. So by not specifying the alignment, you'll allow the P tags to determine the alignment.

Keep in mind that the reason I have the align attribute set is so the text will wrap around the image. So if you set the image alignment none, your text will not wrap.

I'm working on expanding the options available for inserting images, this will be one of the things I plan to make more flexible. Although it may be easiest just to leave this to the user to determine through the style class he specifies for the image.
Generic Editor Adaptor (GEA) - Use virtually any WYSIWYG HTML Editor in Coranto
cra_RTE - WYSIWYG HTML Editor for Coranto posts
HowTo: Fix Reply Links when using ShadowMail and Private Messenger together
Jahandar
 
Posts: 64
Joined: Mon Mar 28, 2005 1:27 am
Location: USA

Postby Von Snellfharer » Thu Sep 08, 2005 12:04 pm

Posted this on another old thread but it might be apropriate here:

It seems like there are LOTS of alternatives coming our way when it comes to Wysiwyg editors.

They all have different ways of working but they all have this in common:
All scripts are made to be implementet on a webpage.

Why not make a sort of adapter addon that has an iterface of a webpage but will put this code into the textfield or even any other field.
That way anyone can implement whatever wysiwyg system they like.
This addon can even have profiles that uses different wysiwyg systems.

This function can even be a standard part of Coranto since with no code it will be text only.
Von Snellfharer
________________________________________
last of the fullgrown men
User avatar
Von Snellfharer
 
Posts: 255
Joined: Fri Jun 21, 2002 8:03 am
Location: Semi arctic

Postby Parahead » Thu Sep 08, 2005 4:56 pm

Von Snellfharer wrote:They all have different ways of working but they all have this in common:
All scripts are made to be implementet on a webpage.

Why not make a sort of adapter addon that has an iterface of a webpage but will put this code into the textfield or even any other field.
That way anyone can implement whatever wysiwyg system they like.
This addon can even have profiles that uses different wysiwyg systems.

This function can even be a standard part of Coranto since with no code it will be text only.
I don't think it is quite that easy though, but what do I know... If someone do look into it and present a solution/addon that work as an adapter for different wysiwyg editors *then* I think we can start discuss if it should be in the core or not.
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Re: New Addon: cra_RTE v0.5b -- First Release

Postby muttly » Thu Sep 08, 2005 6:30 pm

Jahandar wrote:I would greatly appreciate any feedback, suggestions, bug reports, fixes, improvements, etc. Please post them or any questions you have to this thread.


I am a primarily an OSX user and can confirm that this doesn't work properly in Safari 1.3. It does appear to work in my Firefox which is the most recent release or close to it.

I haven't ever used one of these in any sites I have done. I think one of the former solutions wouldn't workon my browser and the other had options I didn't want users having access to. I am trying to move away from embedded font size and font color and use external style sheets for everything.

Accessible and consistant CSS font sizing is already an iffy proposition. Allowing authors to use the embedded color/size tags on a pre-styled pages introduces even more uncertainty as to how a font will display across platform and browser choice.

I would be much more interested in adopting this if it had the following features:

The ability to suppress existing styling options
The ability to author my own tag sets that reference an existing stylesheet
The ability to have multiple text fields in an XMS form yet have RTE available on designated textfields.

Maybe these already exist, I wasn't able to spend a great amount of time experimenting and didn't look at the source at all. At the moment, most of my discretionary Coranto time has been spent converting the current Beta to CSS.

PS - It would be sweet if this worked in Safari too, but I'm not really counting on it.
muttly
 
Posts: 178
Joined: Mon Jun 10, 2002 8:19 pm

Postby Jahandar » Fri Sep 09, 2005 7:23 am

I did consider making my addon an adapter to other editors, but the thing is, if you have a single editor to which you can easily add new dialogs and buttons, it is possible to see people start sharing editor addons just as we share coranto addons.

I guess one of my hopes was that by getting a lot of Coranto users to use one flexible editor (RTE), we would start to see this, with RTE addons specialized for use in Coranto being made available by different people with different ideas on what it could do.

For instance, someone could make a Smiley inserter for RTE right now (it could probably be done in about 10 minutes), then distribute it, and other people who want a smiley inserter, can plug it in. So long as the editor is the same, its simple.

Also, to my knowledge the original RTE did work in Safari, there was a modification made by Tim Bell that he believed might break compatibility. It's line 287 in richtext.js, if you want to try it. I haven't done much testing on a mac (and none on safari), so I can't say if it'll work.
Generic Editor Adaptor (GEA) - Use virtually any WYSIWYG HTML Editor in Coranto
cra_RTE - WYSIWYG HTML Editor for Coranto posts
HowTo: Fix Reply Links when using ShadowMail and Private Messenger together
Jahandar
 
Posts: 64
Joined: Mon Mar 28, 2005 1:27 am
Location: USA

Postby Von Snellfharer » Fri Sep 09, 2005 8:04 am

It's not my intention to bias platforms and browser preferenses but consentrating on compatibility with Mozilla based browsers and M$ IE pretty much covers all users.

I also use Os X but with Firefox. The users i have to deal with mostly use Explorer (gah!).
I'd consider Safari (or Konquerer) compatibility a bonus.
Von Snellfharer
________________________________________
last of the fullgrown men
User avatar
Von Snellfharer
 
Posts: 255
Joined: Fri Jun 21, 2002 8:03 am
Location: Semi arctic

Re: New Addon: cra_RTE v0.5b -- First Release

Postby Jahandar » Sat Sep 10, 2005 7:03 pm

muttly wrote:The ability to suppress existing styling options
The ability to author my own tag sets that reference an existing stylesheet
The ability to have multiple text fields in an XMS form yet have RTE available on designated textfields.


Allowing users to specify a style to use isn't hard (I've already implemented that in the image inserter) and by doing that, it would provide the suppression of existing styles. The third item should be possible too.
Generic Editor Adaptor (GEA) - Use virtually any WYSIWYG HTML Editor in Coranto
cra_RTE - WYSIWYG HTML Editor for Coranto posts
HowTo: Fix Reply Links when using ShadowMail and Private Messenger together
Jahandar
 
Posts: 64
Joined: Mon Mar 28, 2005 1:27 am
Location: USA

Next

Return to Addon Release and Support

Who is online

Users browsing this forum: No registered users and 2 guests