Showing posts with label WriteArea. Show all posts
Showing posts with label WriteArea. Show all posts

2011/09/03

Toolbar buttons in Writearea

Since version 1.1 it's possible to configure which buttons do you want to use in the toolbar of Writearea. There are in fact two toolbars and you can switch between them with a custom button.

The way to define the buttons is to use the preferences pane of Writearea and put the array of buttons in the corresponding input fields. Note that to try to help a little, you don't need to put the outer [ and ], just the groups separated by commas and with a '/' if you want to start a new row.

These are the default values for each toolbar:

Full Toolbar:
['Save'], ['SaveFile','LoadFile'], ['Source'],['Cut','Copy','Paste','PasteText','PasteFromWord'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['ShowBlocks','Maximize'],['Image','Flash','Table','HorizontalRule','SpecialChar','Iframe'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['BidiLtr', 'BidiRtl' ],'/',['Styles','Format','Font','FontSize'],['Bold','Italic','Underline','Strike'],['TextColor','BGColor'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv','Code'],['Link','Unlink','Anchor'],['SwitchToolbar']

BasicToolbar:
['Undo','Redo'], ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],['SwitchToolbar']

Most of the commands are the ones available on the default CKEditor install, I don't know if there's any listing of the meaning of all of them, the best thing that I can think of is the user's guide, but it doesn't clearly link the button names with its action.

But beyond those common buttons, there are a few ones with special meaning here:

Custom buttons

'Save': It's available only while in the dialog popup, it will save the content of the editor to the original element. When the editor is integrated into the page you should use the existing save button provided by the page, that way there won't be any problem due to extra event handlers or differences between Save draft, Publish and Preview buttons of the page.

'SaveFile', 'LoadFile': These two options allows you to save/load the content of the editor to a file in your computer, just in case the page doesn't have any auto-save feature or you want to use something more than once.

'SwitchToolbar': These button allows you to switch between the basic and the full toolbar. I would suggest you to use the basic toolbar by default and only switch to full toolbar when there's something extra that you need at that moment. And of course, adjust each toolbar so the basic includes the commands that you usually need and the full toolbar doesn't includes buttons that you know you'll never use.

'Code': it's the SyntaxHighlight plugin available here. I made some little adjustments, but someday I might have to perform some bigger fixes to improve it and make it easier to use.


 

2011/08/13

Upcoming changes for Write Area

It has been a long time, but these days I'm going to try to push a new stable release of Write Area. It will be mostly an upgrade to the current CKEditor 3.6.1, but at the same time I'm gonna try to finish some code that it's available in the betas and provide a simplified version.

The main change will be the removal of the option to select whether to open the editor in a bottom pane or in a dialog. My plan is to finish the behavior of the new "integrated" mode, so that whenever you select to use Write Area with a normal textarea then it will be replaced by a CKEditor instance integrated in the same page. This is similar to what the "bottom pane" provides, but with the advantage of being able to create more than one instance, and the rest of the scripts of the page can get direct access to the contents as if nothing had happened.

If you try to use instead an existing editor that isn't too compatible with the current Firefox or it's missing features, then the editor will be launched in dialog mode. The plan is to do this automatically without the need to select a preference.

Why?

First: Simplify options.
More options means more testing, harder for the user as he has to think about what's better. I can't claim that I know better than him what's better for him, but I know what's more job for me.

Second: Try to avoid future problems due to changes in Firefox.
The bottom pane is a "XUL overlay", that means that it's somehow quite integrated with Firefox, and in the future the plan is to try to move as much extensions as possible to the Addons-SDK. That means that such integrations might be harder or just impossible. If I start removing these blocks I can try to test if it's possible to port the extension to this new world. Anyway that goal is quite far away as I've stated previously that I won't start using the Addons SDK as long as they require to install Python or any other third party libreary/compiler/whatever.

Third: Other browsers.
By using a simpler approach it's possible to create a Write Area version for Chrome, and although I don't use it I understand that other people do, so if there are just a few differences then I can provide a port of the extension. It won't be as feature rich as the Firefox version, but at least is something that people can use.

Conclusion

If you have a strong reason to believe that I'm making a mistake the I would like to hear your concerns. Otherwise I'll go ahead and release the update when it's ready

2011/04/09

New beta for WriteArea with CKEditor 3.5.3

Following the release this week of CKEditor 3.5.3, I've updated the WriteArea extension for Firefox to this latest version to include all the bug fixes and enhacements that have been worked on since the last release (check the change log, it's quite a long list as it's usual for every CKEditor release)

In this version, the only patch applied to the core is the latest from this ticket that allows a new button that you can use to switch toolbar on the fly.

The size of the extension has grown again a little due to several languages that have been updated since the previous checks that I did and so I've restored as new they can be correctly used to localize your CKEditor and not have part of the texts in your language and the other half in English.

Direct download link: WriteArea 1.1beta4

2011/02/01

WriteArea 1.0.1 Beta 1

Today I've uploaded a beta version of WriteArea to AMO, as I said, it has been updated to CKEditor 3.5.1 but besides that it includes (finally) a feature that it's the way that most of us expected the editor to behave: in-page editing.

This means that the editor is integrated into the page instead of a bottom pane or popup dialog. This feature is still experimental and there might be some unexpected problems, so please be careful (by saving drafts or copy&paste of the contents) before submitting the form.

This feature might have some improvements before the final release, but you can already start testing it

Some drawbacks (at least for the moment):

  • It's not possible to revert the action, once the editor is created it only goes away when the page reloads (might not be a big problem)
  • The clipboard operations are again restricted by default.
  • The Open/Save draft features are no longer available. Maybe I'll adapt them to use HTML5 storage instead of saving to file.

Benefits:

  • It's just easier to use and understand
  • There can be multiple editors in the same page
  • A button can be added so all the textareas are converted without using the context menu

Please, test it and tell me if you notice some problem or if you think that this is really the way to go and the other options should go away.

2010/12/28

Christmas present: WriteArea 1.0 is available

Last night, Jorge Villalobos as Mozilla reviewer approved the 1.0 version of Write Area as an update, so now you should start getting update notifications for this version.

What do you get with Write Area 1.0?

With Write Area you can use the best WYSIWYG web editor inside your Firefox: in any site that allows to input HTML, either with a textarea or even from other not-so capable editors, you can launch Write Area using the context menu and that way you'll get full editing capabilities.

This version has been adjusted to avoid the existing problems with Firefox 4, so the upgrade of Firefox should not cause you any trouble. Some other details have been improved like focusing existing instances.

The internal editor core has been changed from the old FCKeditor 2.6 to the latest CKEditor 3.5, so future upgrades should come out sooner now that the used editor is again one under very active development. Nevertheless, updates in an extension requires review by a AMO editor, so instead of releasing an upgrade with every CKEditor release I might publish a "beta channel" version for minor updates and a full one where there's a new milestone or some important bugs fixed.

Besides that, you can keep using the internal Firefox spellchecker in a normal installation of CKEditor if you install the Gecko SpellChecker plugin.

Go ahead, click and install this extension.

(another post powered by Write Area)

2010/12/08

Setting 100% height in CKEditor

In CKEditor the config.height setting doesn't allow  to use percentages, only fixed sizes are supported, but that is not good when you try to provide a dialog that is just the editor without any extra stuff (like in this Write Area pane).

The available option is to use the maximize plugin and execute it using the instanceReady event; that has some little problems:

  • You have to keep the maximize plugin into the code, although you want to execute it just once.
  • If you try to remove the maximize button from the toolbar, you'll get an error.
  • There's a flicker while the editor is first created and then resized.

The way to avoid those problems is to adjust the CSS in your main page, these are the rules that I've included in Write Area to get 100% without the previous problems (keep in mind that I've tested only in Firefox, at the very least you'll have to provide the "cke_browser_gecko" rule also for other browsers (ie, webkit, opera) and test if there are other problems.

span.cke_skin_kama, span.cke_skin_office2003, span.cke_skin_v2 {
 padding:0  !important;
 border:0  !important;
 -moz-border-radius:0  !important; 
 height:100%;
}

span.cke_browser_gecko {
 height:100% !important;
 display:block;
}

.cke_skin_kama .cke_editor, .cke_skin_office2003 .cke_editor, .cke_skin_v2 .cke_editor,
.cke_skin_office2003 .cke_wrapper, .cke_skin_v2 .cke_wrapper {
 height:100%;
}

.cke_skin_kama .cke_wrapper {
 padding:0 !important;
 height:100%;
}

 

2010/12/05

Testing the new Write Area

I think that I've found the problem that caused Write Area to reset the toolbar configuration in Firefox 4.

Let's hope that the rest of adjustments are fine and I can release this version soon (yes, it includes CKEditor, the 3.5 SVN. It weights 483 Kb, so I'm not sure about trying to remove more things that aren't too useful)

Update 1:

I've reduced 90Kb by removing the translations that had over 200 missing entries. It might make sense to even remove translations with over 100 missing entries.

Currently there's a problem as the toolbar Cut and Copy commands don't work like they used to do (without any warning), so I'll have to check what has been changed. I've fixed that problem with a little change, due to the default security settings I don't think that many people have been able to test that code before.

Update 2:

The current work is available in the "beta channel", you can get it in the Write Area page, and scroll down searching for "beta channel". I've removed several plugins, looked for unused files, and everything that I could find to easily reduce the size (changing the core to remove code for other browsers is not a valid option in the long term).

I've applied also some fixes that might not be available in 3.5, but I think that they provide a better experience. Some parts might not work correctly as the 3.5 still isn't finished and there might be unexpected bugs.

2010/07/24

Performance impact by extensions

As suggested by recent the recent post, today I wanted to check the startup performance of my Firefox extensions.

The first step was getting the timing values, and I must say that it's really crazy how every project is always stating "it's easy, you just have to install this", and that means that you have to install php for one project, the different .net frameworks for another, other request Java, then the jdk, jre, ant, ...., in this case they say that you just have to install both Cygwin and Python in order to get the time!!!

I'm tired of installing things, so I opted to use the macbook and fortunately it seems that Python is already installed in MacOsX so I didn't need to install anything and after a few tests I got the timing values (although I wasn't sure about the unmount part and skipped that script because I didn't want to get a big problem).

Ok, around 1500ms with the default profile. So I disabled some add-ons and got down to 1000ms, wow, 50% improvement.

Then I checked both WriteArea and SendToPhone (the current as the next one that includes some drastic changes) and it seems that the startup time was similar, I didn't notice a performance hit due to enabling or disabling the extensions, and that's logical because they don't really do too much things at startup, just some listener for context menus, an overlay here and there,... but no heavy duty. That means that fortunately I don't have to work in order to improve the performance.

Finally I started re-enabling the rest of extensions and checking the times and the culprit for the 500ms hit is.... Firebug!

I don't want to say bad words about Firebug because it's really useful, but on the other hand it really needs some hard work with cooperation by the Mozilla guys to find out the issues and address them correctly.

2010/01/18

Alpha 5 of WriteArea

These days I've kept on working on WriteArea and today I've uploaded the fifth alpha version. This version is quite better with regards to the detection of other Rich Editors and finally removes a little code that I added for their detection but I knew that shouldn't be included in a final version.

Most important: this version includes an option in the preferences to open the editor in a bottom pane of the page. I've borrowed the close button from the AdBlock Plus skin and I will try to confirm that this is OK before releasing the final version.

There's a little problem with this bottom pane: it isn't aware of tabs, so when you switch tabs it remains there and it's a little annoying, because if you close the pane you might lose all the content. I'll try to find a solution to this problem, although I'm getting already a little tired of so much work in this extension for the last few days.

2010/01/14

Alpha release of Write Area

I've uploaded a beta version of Write Area to AMO as a little preview of what's next.

New plugin

It includes the Syntax Highlighter plugin by Darren James. Remember that you must configure your page with the SyntaxHighlighter by Alex Gorbatchev

With this feature you can include code in your pages like this:

  var script =  writearea.injectScript(this.parentWindow.document, command);
  var info = script.getUserData('editorInfo');
  script.parentNode.removeChild(script);
  // undetected framework
  if (!info)
   info = {
    type:"undetected",
    data:element.ownerDocument.body.innerHTML
   };

In the editor you click the "code" button and in that dialog you paste the contents and select the programming language that must be used to highlight it. In the editor it will be shown like other <pre> code (currently in blue, but I might change that), and in the final page it will show the code as you see above if you have properly installed the js and css files as explained by Alex Gorbatchev.

Not just textareas

The second feature is the ability to use the editor even on top of other editors. It tries to detect correctly some editors, but it should be able to handle any system where a WYSIWYG editor is used. Just right click on the content and click the Write Area entry, and the rest is just the same.

I'll explain this a little better: there are lots of places where some kind of rich editor is used: CMS, Forums, WebMail... The problem is that some of those places use old versions or editors that have very few features, so trying to use them can be a little painful.

My first motivation for writing this extension was that kind of situation where I had to deal for example with the editor here at blogspot. Fortunately for me I was able to disable it and use a plain textarea and easily work with it in my extension, but not all the editors have the ability to be switched off or to show the current source in a textarea, and one day I had a simple idea to detect this situation (check if the document has designMode == 'on') and work with the innerHTML of the body.

This works as long as the editor doesn't use special elements (like the icons shown here for anchors) as that means that the innerHTML isn't really the HTML output of the editor, to get that info (or to properly change the content so it shows any special elements) the API of each editor must be used. That means that there's a set of editors that I'm detecting and in the rest of cases the body.innerHTML is used for read/write.

The current sets of editors that I've coded to detect is as follows:

  •     CKEditor
  •     FCKeditor
  •     TinyMCE 2 & 3
  •     CuteEditor
  •     YUI Editor
  •     Xinha
  •     EssentialObjects
  •     HTMLArea

I could go on adding support for any other editor out there, but I think that this is enough to test the mechanism and verify that I could increase it in the future. I'm realizing right now that the detection could be extended even with a configuration option to add the required script, this is for example the part that detects CKEditor:

 if (window.CKEDITOR)
 {
  match = nodeId.match(/cke_contents_(.*)$/);
  if (match)
  {
   return {
    type: "CKEDITOR",
    data: CKEDITOR.instances[ match[1] ].getData(),
    setDataTemplate: "CKEDITOR.instances['" + match[1] + "'].setData(##DATA##)"
   };
  }
 }

The important trick here is that the code inside the extension can't call any method or access any custom javascript object of the web page, this is done in order to protect the browser from any external attack that tries to run code with Chrome privileges.

So by default the if (window.CKEDITOR) check always fails because as I said, the code in the extension can use the window of the document, and standard properties like window.document, but won't return anything that has been set by a script.

As a test phase I used the real window as returned by window.wrappedJSObject and I was able to verify that the ideas worked, and kept on that way for a little while, but finally today I have changed all the detection code so that it's done in a single place (previously the code looked quite different) and it's merged into a big string that it's added to the web document  as a script. That script executes a function that includes all the detection parts and returns an object that it's set as a property of the script DOM node, and then in the other side of the fence, the extension gets back that object with the detected data.

Isn't a little strange that I can't get an element added normally to an object like window, but it's possible to pass an object using node.setUserData?

So back to what's important:
Now you can use this extension almost anywhere, it doesn't matter if it's your blog, your CMS or a WebMail app like Hotmail, GMail or Yahoo, if you want to overcome some limitation of the editor, or a "silly" restriction set by whoever added that editor leaving only a few features, you can right click on it and launch the WriteArea extension to work as you please. Note that you might need to disable the option in the preferences of Firefox to allow the pages to replace the default context menu, and you should be aware that dueto bug 486990 if you are using Firefox 3.5 the page might be able to ignore that restriction (but Firefox 3.6 works nicely).

I plan to do some other enhancements before releasing this as a full new version, but I think that it's worth publishing it as a beta to let people test it.

I might edit this post to explain better how to use each of those two features and why they are useful, but I would like to hear your comments about them meanwhile.

Edit 17th January: I've added an example of the output of the Syntax Highlighter plugin and an explanation of how the detection of other editors work.

2009/04/14

Write Area 0.8.0 released

If you have installed WriteArea then soon you'll get the updated version.

It finally adds tooltips for the toolbar buttons, and two new buttons besides the "save" button.

The first one allows to save the current content to a file in your computer, great if you want to keep drafts of any kind of templates around. The second button is obviously the one to load those files, the icons might not fit exactly with the rest but I'm not a designer and I always rather focus on the most important things.

Now that CKEditor 3 is getting closer everyday I don't know if next update will be based still on the 2.6 line of FCKeditor, or if it will start using that fresh new code. Some of the advantages of the new code doesn't apply the same way inside chrome than it does in a website, but on the other side it might open new opportunities, they might need some time to check and test the ideas so such future update might get delayed quite a while.

There are other ideas for the current code, but they also take time, I wish that there would be a way to code everything that goes through my mind.

2008/12/29

Fixing bugs for Write Area

Finally I've started fixing the most annoying bug in Write Area, the lack of tooltips, and thanks to this post by Zoolcar9 I've been able to fix the problem by using  a xul file that embeds the html page instead of showing it directly.

It has lead to other code changes so now I have to review that everything keeps working.

Meanwhile I've added a save/load pair of buttons, so you can save your drafts on your computer. I've to review here that the encoding of the files is done properly as the docs state that it isn't utf safe by default.

For the moment it's saving just the content of the <body>, but I guess that I'll create some full html files just in case anyone wants to doubleclick them.

(for the new icons I've picked the load/save file in the Crystal pack by Emeraldo, but if anyone else has a good suggestion just drop a note here)

2008/12/27

Write Area 0.7.5 available as experimental download

I've uploaded the xpi with the new version of Write Area. Until it's approved you need to go to the "all versions" page in order to see it, by default the AMO it's showing only the 0.7 version even if it's incompatible with the 3.1 betas due to the previoulsy mentioned bug 469203.

At the same time I upgraded the FCKeditor core, so now it includes all the new features and fixes since the 2.6.1 SVN that I grabbed months ago. That means this list for the officially released versions and this list for the current changes in SVN since 2.6.3

I'll leave a few days and if no one reports any special problem I'll request the approval to make it the official version.

2008/12/20

The magic line

Thanks to Robert O'Callahan for providing an easy workaround, now I can start testing WriteArea in Firefox 3.1. All that was needed was a background-color:#FFF for the <html> and now it's working again :-)

Of course, using FCKeditor 2.6.1 is boring, so I've updated to the current SVN, and now some of the modifications aren't even needed anymore because the problem has been fixed directly in the FCKeditor main line. Anyway, working with SVN makes very easy the upgrade process and I had a script ready so it takes care of the packaging and removal of unnecessary files in order to re-package it as an extension for Firefox.

So very soon a new version will be ready, just some testing that nothing is too broken and I'll release it.

 

PD: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20081211 Minefield/3.2a1pre

2008/08/16

Write Area: It's Alive

Finally, after waiting for almost three months since the release of version 0.7 , the extension has been approved in AMO and you can install it in Firefox without the need to be registered!!!.

Wow, I didn't thought that it would take that long since I created the first prototype at the end of 2007. The code itself didn't take too long, there were only a few problems due to the restrictions of being in chrome and a few differences (one problem that still remains is the fact that no tooltip is shown in the toolbar icons, I still haven't tried to find out if it's just a bug or there is some workaround that doesn't means rewritting the toolbar with XUL.

One interesting fact about running inside chrome (besides the fact that the clipboard buttons work without the need of any other special setting) is that images from the clipboard can be pasted inside the content.

Yes, that means that if you have a document with some images inside and try to paste it inside Write Area, those images will be shown while you are editing (trying to do it in any other site won't show anything because it's using a path to your computer). But when you press the save button the images will remain in your Hard Disk, and they won't be shown in the final web.

But let's think about it: Write Area is running as an extension, it has the ability to read local files, so that means that when the Save button is pushed, I can check if there's any image in the content that it's pointing to the local disk, and send it to a web server, get the proper path to use that image and replace the original reference with this one.

Interesting...

It needs a little coding and a way to know where to send the pasted files.

Wouldn't it be really nice? You just write your content, prepare any screenshot and paste directly there, and when you press Save everything is uploaded (or maybe even after pasting, the file is automatically uploaded while you keep on writing)

Ok, let's not digress any longer and install Write Area right now!

2008/05/20

Next version of the GoogleMaps plugin

Lately I've worked to do some improvements in the Google Maps plugin, you can already check the current status in the live demo.

One of the new features is that now the map remembers the type of map that has been selected, and now it's possible to select also the Terrain view. I guess that this isn't anything special, some might even wonder why I didn't add it earlier, but there are so many things to do that I just can't afford them all.

A more interesting change (mainly due to the opportunities that it can offer) is the usage of the Static maps. When you add a map you'll no longer see the white area with the Google logo, instead it will show a preview of the map. I haven't added the markers of polyline to the static map, and that's because I'm not fully satisfied with the current status.

First, it isn't possible to select the type of map, so the user will think that I'm gonna generate a wrong map because they see the map view instead of satellite as they have selected.

And the second problem is that the generated images can't be any larger than 512x512, so if I try to request a preview for a map of 600x400 Google sends an error message. In the end I've checked the dimensions of the map and restricted them in the static preview to those 512x512, so the image will be shown distorted, but at least the user won't see a X.

If those problems are solved (I think that only Google can provide a fix, I don't foresee any workaround), I have some other nice ideas (mainly one: load just a image and then the rest of the JS API on demand), but I don't see any reason to start coding them if people will complain that they won't work correctly.

The last important change for the FCKeditor plugin (besides some bug fixes related to the comments in the markers) is an idea from Enrico Danilo Visciola, allowing to have 2 different API Keys, and even asking to the user in the moment what's the key that they want to use. Based on this change I think that it will be possible to include the plugin inside the Write Area extension and as long as the web where you are using it doesn't filter out javascript you'll be able to include GoogleMaps with a few clicks.

Of course, there are many other things waiting to be done, if you want to sponsor some development just contact me, or if you want to cooperate with some code I will be grateful for your contribution.

2008/05/18

WriteArea 0.7 and GeckoSpellChecker extension

Finally, now that the RC1 for Firefox 3 has been released I've uploaded a new version of WriteArea updated to the current nightly and have requested its approval so it's no longer necessary to be registered in order to install it.

With this release I've updated from the 2.5 series to the new FCKeditor 2.6, meaning that the dialogs are now inline, but when they are used inside chrome they show a Firefox 2 bug, meaning that the content isn't blocked while the dialog is active, but everything works fine in Firefox 3.

Now there's another incentive to install this version of the extension, and it's a plugin that I have mentioned previously: the GeckoSpellChecker that integrates the spelling into the normal context menu.

You can see how it's shown in this screenshot:
Spell suggestions for Youu

but I would really encourage you to install the WriteArea 0.7 and then check it live in the playground.

2008/03/15

WriteArea 0.6 now with Spellchecker

I've uploaded to the Sandbox the version 0.6 of Write Area. This version (besides the bump to support FF3b4) does add the ability to use the spellchecker from inside the editor.

Thanks to the chrome privileges it's possible to access directly to the internal data about the spellcheck and that way I can add it to the context menu, just as easy as in any other textarea, there's no need to choose between the FCKeditor context menus to manipulate the content or the Firefox default menus to use the spellcheck.

I'm gonna leave it a few days and if everything is fine then I'll review a few details and then I'll ask to make the extension public, so I would ask that anyone that it's reading this, please, go to the Firefox extensions site, if you don't have an account, then apply for one, it takes no time at all, when you are registered then login and install the Write Area extension.

Now go to a site where you can use HTML in a textarea, (for example this Blogger site, Slashdot or any other of the thousands of sites available), open the context menu and select "Edit with Write Area", and you'll see the editor. Play with it, give it a go and when you are done, then go back to the Write Area page and write a review (if it's nice I'll be happier, but any review is good as long as it's done with good will)

Enjoy it.

2007/12/15

Another release of Write Area

The highlights about this new version are the inclusion of two plugins for FCKeditor and setting up the hooks to reuse the ImageBot extension from the image dialog.

The plugins

The first one is the the dragresizetable, I had to change the way that it works because due to a bug in the way Gecko does handles iframes placed in chrome, the resizing handles were not visible at all, so the plugin wasn't working.

I've added a workaround that should work for the moment, although it's not a perfect solution.

This is a screenshot of how it works

table with blue divider

As soon as the cursor gets close to the central divider it turns into a horizontal double arrow, and you can use it to move the columns (a blue line appears showing how it will look like)

The second plugin is the Image Mapping plugin, I don't think that I have new info for the moment, just read the previous entry that explain its use.

Integration with ImageBot

As shown in this post, usually is necessary to add some images, and previously the only option was to upload them with a separate system and then insert in the image dialog the url that it was generated. But using two windows is boring, it's better to be able to do everything from the same enviroment.

So I had the option to create a image uploader and manager, or use an existing one.

Of course I choosed to reuse existing code, so if you have installed the ImageBot extension in Firefox, then the Image dialog will show the "Browse server" button next to the URL.

With that button you can open the ImageBot upload center, and you can add new images or use one that you did upload previously. Double click on it and it will be placed in the URL field for the image in FCKeditor.

Other changes

The preferences dialog has been coded so that it's easy to translate it (there was some strings missing), and it has been splitted in two panels to separate the code generated by FCKeditor from the aesthetics and behavior of the editor.

As with the previous versions, this one is still sandboxed, so you have to register first in addons.mozilla.org , then enable that account and mark that you want to see the items in the sandbox. Then you'll be able to see the Write Area extension and install it.

I hope that you like this changes.

2007/12/10

Why should I use Write Area?

I'm gonna try to reply as best as I can to the answers about this extension, giving at the same time some hints about its usage and future plans.

Why use Write Area?

It all depends on where you want to use it.

If you are using a CMS and you can control it then probably you have already installed a WYSIWYG editor of your choice, and it's tuned up exactly to work with your style sheet, your templates, images etc... Then Write Area is not for you.

On the other hand, if you are using something like this Blogger, you have only two choices: use a plain textarea or use the editor that they have choosed to implement. Writing HTML in a textarea is quite boring and even if you are used to it you can make mistakes. But if you try to use their editor and want to write something as simple as <select> (as I did in a previous post), then you might find suddendly that all of your content after that "tag" has been lost!!

I'm not kidding, it's so ugly that from that point I went inmediately to the preferences pane and disabled that editor. Writing again the content is so unpleasant that I can't believe how other people have dealed with that.

My reaction was that I needed a solution for that problem, and using FCKeditor combined with the Firefox extension system looked like a nice idea. From that point I've worked in order to integrate it, fix some minor issues due to the way the scripts run inside chrome and package it so other people might use it.

Also, even if the Blogger post editor didn't have such horrible bug, it still lacks so many things like header formatting that it looks almost like a toy to someone used to work with a powerful editor.

So besides Blogger, what other uses does it have?

The implementation doesn't have anything specific to Blogger (for the moment), it enables you to easily write HTML in any textarea (for example there are many systems where you can write certain HTML tags in the comments, but they don't provide any nice editor for that). As the extension improves it will be adjusted so it can adapt better to the different situations, now you just have to try it and don't try things too complex where it's clear that only a subset of HTML is accepted.

What about Forums?

Most of the forums out there won't accept HTML at all due to the problems trying to clean it all and don't suffer from any kind of attack, so you can't use Write Area on them. They accept what's know as BBCode, and although there's a plugin for FCKeditor that enables the use of BBCode it isn't still full developed so I've choosed not to include it until I can know for sure that it will handle properly the most commong situations (fancy BBCode extensions probably will never be handled, but I'll try to cover the common functions in most forums before including it).

Does it fully replace the Blogger post editor?

Sorry, for the moment there's one big issue remaining: upload of images. Write Area can help you to give the proper formatting for your text and images, you can include images as long as you know the URL of a web server where they are hosted, but it lacks the hooks to upload a picture from your computer to your account. I'll try to work on this issue before releasing the next version as that's from my point of view the only issue that forces me to switch between the Blogger system and Write Area.