Hi
am new to FCKeditor and have found it a great product. I am attempting to use it with ADDT Dynamic Forms and have come up against a bit of a show stopper.
I would be interested to learn if anyone else out there has been able to work out how to configure the editor so that when multiple records are selected in an ADDT Dynamic List for editing/adding, the editor manages the correct fields in each record on update/insert. What I have discovered is that only the first record's FCKeditor's content gets edited and every other record's FCKeditor content gets replaced by the text in the first record.
Thanks.
am new to FCKeditor and have found it a great product. I am attempting to use it with ADDT Dynamic Forms and have come up against a bit of a show stopper.
I would be interested to learn if anyone else out there has been able to work out how to configure the editor so that when multiple records are selected in an ADDT Dynamic List for editing/adding, the editor manages the correct fields in each record on update/insert. What I have discovered is that only the first record's FCKeditor's content gets edited and every other record's FCKeditor content gets replaced by the text in the first record.
Thanks.
Re: FCKeditor with Adobe DW CS3 ADDT
Hi WollombiWombat,
I *knew* I´d meet you here too
However, I´d like to add to Wollombi´s question, because an answer will have quite some relevance to many more folks than you might be aware of.
I´m Adobe Community Expert and keep maintaining the "Adobe Dreamweaver Developer Toolbox" (ADDT in short) forums over there -- as you guys surely know, ADDT is the successor of Interakt´s MX Kollection set of server behaviours. As *many* MX Kollection / ADDT users are actually desparately looking for a viable replacement of Interakt´s discontinued KTML editor for quite some time now, any halfways comprehensible "how to" guide related to what Wollombi mentions will really be much appreciated by quite a huge crowd of users.
So far I´v always been recommending TinyMCE to the "we need a KTML replacement" crowd, just because its integration in multiple records forms (ADDT or not) is a breeze by just adding a certain css class attribute to the to-be-converted textarea, and I´ve also provided a tutorial covering the basic integrability -- but using TinyMCE should certainly not be the only option, all the more FCK is pretty popular for a very good reason.
Any helpful pointers are much appeciated, and I´ll of course be available to write an Adobe/ADDT tutorial about how this can be done
Re: FCKeditor with Adobe DW CS3 ADDT
On the other side, you could express your problems in terms of HTML and Javascript (after all that's basically the FCKeditor) so other people can understand what you mean.
Even better would be to have a demo/testcase showing exactly what you want.
Re: FCKeditor with Adobe DW CS3 ADDT
Hey Gunter - Thanks for the support.
Hi Alfonso - I believe that Gunter has explained admirably the situation. However I shall attempt to ellaborate and no doubt Gunter may add his 2 bob's worth as well.
As Gunter explained, ADDT is "Adobe Dreamweaver Developers Toolbox" which is the replacement for Interakt's product known as MX Kollection. KTML was Interakt's textarea editor product. Both KTML and MX Kollection were supplied as Dreamweaver Extensions. MX Kollection is a collection of PHP/MySQL tools that provides "designers" with some sophisticated capabilities that would otherwise need the skills of experienced "developers" in order to create sites with functionality beyond what Dreamweaver can produce "out of the box". The combo of KTML and MX Kollection were a very powerful asset and were built for use with Dreamweaver 8.
When Adobe acquired Interakt late last year, they made some changes to the product lineup and in the process dropped KTML and reworked MX Kollection which they released under the ADDT brand for Dreamweaver CS3, the current iteration of Dreamwever released earlier this year by Adobe. Thus, "designers" with KTML/MX Kollection who want to stay up-to-date with the replacement of MX Kollection under DW CS3 no longer have the benefit of having at their disposal a Dreamweaver Extention with the functionality of KTML. We have ADDT but no longer have an editor. Thus many of us elected to search for alternatives and FCKeditor looked an obvious choice along with tinyMCE. However neither are Dreamweaver Extensions which can put off those who are not comfortable with setting up the editors manually. Also, neither editor offers the added integration with Adobe's ADDT and both have their limitations.
Now, Alfonso, you made the point that we should seek to find "someone that works in that environment that has a working solution". Well, Gunter is that someone and the nearest he has is tinyMCE with its limitations. My original post here was to see if there was any chance of finding someone within the FCKeditor community that may have a solution to the problem I alluded to, or offer some suggestions. Better still, perhaps this may encourage the FCKeditor folk to expand their opportunities with Adobe and create an Extension that can act as a viable alternative to the defunkt KTML within the new ADDT environment. If there is interest then folks like me (and possibly Gunter) are willing to participate.
If there is no interest in creating an Extension, then how can we explore the problems we face integrating FCKeditor with ADDT to see if the limitations can be overcome.
Regards,
Re: FCKeditor with Adobe DW CS3 ADDT
In order to write such extension you would need someone able to do it, it's not clear to me that Gunter has offered himself to do it, but just to help documenting the basic integration. And idea to find the person would be to start a fund raising between DW users that want the extension, if the amount gets enough I'm sure that someone will step up to do the development.
Meanwhile (or at the same time) we can focus on the basic integration, but again it's not clear to me the problems that you are facing. If you have any question about FCKeditor we can try to answer it or point you to the relevant documentation, but you must state exactly what's the problem that you have in a way that we can understand it.
Re: FCKeditor with Adobe DW CS3 ADDT
-------
it's not clear to me that Gunter has offered himself to do it
-------
no, I won´t and can´t do that, as I´m not an extension developer.
---------
And idea to find the person would be to start a fund raising between DW users that want the extension, if the amount gets enough I'm sure that someone will step up to do the development
---------
That´s as such a nice idea, although Dreamweaver users seem usually pretty reluctant to spend some extra bucks anyway -- this particular crowd will IMHO apparently only be investing in a commercial extension after it´s been made available, and even then no extension developer can really be sure that his work is accepted (read: purchased) by the DW user community.
Good question :: would I throw some bucks towards an extension that´s not even available yet, or would I support an extension developer who´s not a well-known and apparently reputable person in that "scene" ? Don´t think so. And as everyone wants that extension to be a "viable" one that´s expected to be continuously developed and even be available in, say, 4 years from now on, it´s IMHO not the regular freelance extension developer out there who can be expected to even warrant that.
So who´d be the adequate candidate to pick that up, all the more creating a DW extension "around" an existing and (in terms of features and configuration option) pretty "mighty" WYSIWYG editor such as FCKEditor is surely no undertaking that´s able to get absolved in a "by the way" manner ? Either a bunch of experienced freelance developers, capable to combine their forces and willing to act on a "let´s see how it comes out later" pro bono basis -- or an established company that´s already involved in creating (and marketing !) DW extensions, knows the requirements of their prospective customers well, has enough power to survive the usual hard times when the sales revenues are not doing that well as expected, and hence can warrant the desired "viability".
Let´s make no mistake: many (open-source, donationware, low budget) DW extensions out there published by single developers have actually not proven to be "viable", because the amount of development-related work has actually eaten up the respective developer´s resources on the long run, and that´s why quite some otherwise brilliant smaller extensions don´t get maintained any longer or haven´t become updated to e.g. become compatible with the latest DW version.
Dunno if such an extension will be able to address a *substantial* number of DW users. Maybe one would have to make a truly representative survey, but one thing is clear :: a not too small part of the DW users are rather code-savvy and won´t necessarily rely on an extension to implement FCK or other editors, all the more there is some documentation available, even if it not might be the most comprehensible one.
On the other hand: whoever is going to pick up this project, will be able to cover a pretty vacant slot after KTML has vanished from earth and hence *might* have a good chance to establish himself -- however that´s not something for the blue-eyed folks expecting miracles to happen out of nowhere.
Re: FCKeditor with Adobe DW CS3 ADDT
Re: FCKeditor with Adobe DW CS3 ADDT
what are the specific problems that need to be solved?
-------
ADDT has a multiple record insert/update feature, which dynamically creates a form with variable length, depending on what DB records you select on the previous list -- using FCKeditor´s regular textarea replacement won´t work here, because both the number of textareas and their "name" will of course vary.
As ADDT is using a certain "transaction recordset" (in this case PHP/MySQL based) to determine the form´s length on runtime plus keeps looping through e.g. the textarea instances by adding an autoincremental number to the texarea´s name (e.g. textarea name="description_<?php echo $cnt1; ?>"), I tried to mimic this behaviour by adding a similar "do - while" loop (plus an incremental counter not displayed below) around FCKeditor´s regular textarea conversion, example:
var oFCKeditor<?php echo $cnt1; ?> = new FCKeditor('description_<?php echo $cnt1; ?>' ) ;
oFCKeditor<?php echo $cnt1; ?>.BasePath = "../../fckeditor/";
//other stuff here...
oFCKeditor<?php echo $cnt1; ?>.ReplaceTextarea();
This approach basically even worked to some extent, but gave me an "textarea description_2" (just an example) error at other places, so it seems I´ll have to do some research
On the Adobe forums I have now advised WollombiWombat to use FCKeditor´s "ReplaceAllTextareas" function to simply convert all textarea instances in one swoop, what´s an easy way out as long that form doesn´t contain additional textareas which need to remain "as is".
Re: FCKeditor with Adobe DW CS3 ADDT
And if the replacement is the best way to go, then you could adjust the ReplaceAllTextareas function so that it replaces only textareas with a certain attribute (for example .className == 'HTML')
Also, if there are several instances in a single page the loading time will increase, so it's better to use a shared toolbar, the javascript sample 10 shows how to use it (check also the rest of sample as they might provide more ideas)
Re: FCKeditor with Adobe DW CS3 ADDT
Re: FCKeditor with Adobe DW CS3 ADDT
I've been following this interesting topic discussion. Be sure that we at FCKeditor would love to give the best solution for all DW and ADDT developers.
I liked the idea about using a class name to identify the textareas to be replaced. For that, I would propose implementing the ReplaceAllTextareas function in the editor core code (in fckeditor.js), making it more powerful, so it could be called in the following ways:
Do you think this is the best approach for ADDT users (not considering extensions, of course)? Otherwise, I'm missing something here.
If you think it is ok, I'm ready to code it.
Thanks for your support on this.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: FCKeditor with Adobe DW CS3 ADDT
Hi Frederico,
indeed, IMHO this "identify by class name" approach will be a great thing anyway, and probably a looked-for feature by users outside the DW/ADDT realm -- reckon that this approach will make FCKeditor notably more accessible to folks using whatever "application framework" out there that´s handling things similar to ADDT, so implementing this feature can´t be a bad thing to do
However, in particular it´s the "gimme back KTML" folks who might want to go one step further when using FCKeditor in such a scenario, because this particular crowd will sooner or later be looking for a way to integrate FCKeditor´s file manager in such "dynamic" forms. I´m aware that this as such won´t be much of a problem, but each form instance might be pointing to e.g. a different image directory that´s e.g. determined by a session variable or some result derived from a query, and I wonder if and how this would be possible to get integrated in this approach -- again, this might also be of interest to non-ADDT users.
Re: FCKeditor with Adobe DW CS3 ADDT
I just want to say thanks for everyone picking up the issue and helping out with suggestions and ideas.
Will be looking forward to getting a solution and will be happy to do anything I can as a humble "user" to help out.
Gunter - I thought that your earlier suggestion was helpful, but then I discovered that on one of the forms I had, there are three text areas and only one of these needed an Editor. Thats a good point about different directories for media uploads and I do have that situation in a number of sites. One other thing to consider is that when we add an instance of FCKeditor, to a Required Field, the required field prompt next to the Label is lost in the Dynamic Form. I seem to recall however, that if the field is left blank, ADDT puts up a prompt when the page gets reloaded.
Regards,
Re: FCKeditor with Adobe DW CS3 ADDT
I've opened a ticket for the ReplaceAllTextareas idea. I've also attached a patch proposal for it. It is quite a flexible thing now.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: FCKeditor with Adobe DW CS3 ADDT
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: FCKeditor with Adobe DW CS3 ADDT
Many thanks for your interest and positive support. I look forward to adopting and extolling the virtues of FCKeditor once I have had a chance to test out the new functionality.
Best regards,
FCKeditor with Adobe DW CS3 ADDT - trying to understand the
I'm trying to understand the process here to integrate fckeditor into a pre-existing form (with 1 text area) made in ADDT. I have downloaded and successfully installed fckeditor, my samples work fine - what i cant figure out is how to integrate it into the existing form.
As far as I can understand I apply a class to the text area in the form -call it 'myfckarea' and then somewhere in the configuration for fckeditor i can set the editor to be applied to any text area using that class. Am i completely wrong here? If not - where in the configuration for fckeditor do I tell it to apply itself to text areas called 'myfckarea'?
Thank you for any help you can give!
Re: FCKeditor with Adobe DW CS3 ADDT
Will get back to you with an example from the site I am currently working in in about an hour. Your post came thru to me just as I was leaving the office.
Cheers for now.
Re: FCKeditor with Adobe DW CS3 ADDT
I am assuming that you are using ADDT with a PHP/MySQL server model. So my comments apply to that situation. I will not be using the actual text area as I have not yet experimented with that approach. Rather I will be replacing the text area with php code.
The first thing you need to do after downloading FCKeditor is to familiarise yourself with the documentation. It is quite extensive and you need to put in a bit more time than you would with KTML to come to grips with how to use it.
When using FCKeditor in place of KTML you need to do a small amount of PHP and JavaScript hand coding. If you are not familiar with PHP or JavaScript, dont worry. We will go thru the nits and grits and make it as easy as possible - I have to say that because I am not a programmer as Gunter probably knows.
Once you have downloaded and extracted the zip file you will find a directory called unsurprisingly "fckeditor". I suggest that you create a copy of this directory for your site and rename it to FCKeditor which is what the code will be looking for once you have installed it into your site. Within the FCKeditor directory is another directory called _samples. I suggest that at some point you get familiar with these files and examples. But for now, you can actually delete the _samples directory.
Now you are ready to place this new FCKeditor directory into your site directory. So, copy/paste the FCKeditor directory into the root level of your site.
At this point we can start to look at the .php file that has the textarea which is to be used by the FCKeditor. so open up that file. Typically, At on line one of that file your would have a php require_once call to your connection file. You need to insert a new line after that and add an include statement for the FCKeditor's php setup file. In my case I have the following:
Note that you need to have the full path to your FCKeditor directory defined here in line 3. The rest is ADDT associated code which you may already know.
At this point we can go to the code where the textarea is that will be used by FCKeditor. Because I have replaced the text area with php code I have simply commented out the text area HTML and the ADDT/PHP references within it. The following shows you my original textarea that has been commented out plus the PHP code that calls FCKeditor.
OK, so lets step thu this a section at a time.
Firstly, field in my database that contains the input is pageContent_pag.
Next lets go thru the PHP code:
The first line: $oFCKeditor = new FCKeditor("pageContent_pag_$cnt1");
defines a new instance of the editor. Now you may know that ADDT allows the user to select multiple records from a Dynamic List so that mustiple recoreds can be edited or created within one page by multiple instances of the Dynamic Form. ADDT keeps track of these multiple instances by a counter and is referenced by the variable $cnt1. So this counter's value is included with the reference to the FCKeditor instance as shown. I have just last week discovered the significance of this code shown here. Sadly I had not figured out how to code this correctly until then. This is important to have coded correcly because without it you would have a problem when you have the situation where you or your client selects multiple records from the ADDT Dynamic List.
The next line: $oFCKeditor->BasePath = '../../FCKeditor/';
establishes the path to the editor that the script needs to have defined. It is the full path as referenced earlier at the beginning of the page's code.
The next line: $oFCKeditor->Value = $row_rspages_pag['pageContent_pag'];
holds the value of the field from the reecordset. My record set is rspages_pag.
The following lines set the width and height of the area for the editor.
These lines are followed by a reference to a custom toolbar for the editor instance. This is where we start to look at the fckeditor.js file.
If you do not setup a custom toolbar the editor instance will use the default toolbar set which is just about every bell and whistle that the thing can do. So how do we setup a custom tool bar ? Navigate to the FCKeditor directory and at the top level you will find the fckeditor.js file. My copy is Version 2.5.1 of the editor so on line 96 I have the definition of the Default ToolbarSet. The documentation gives some advise on how to create a custom toolbar but for the sake of this exersize I will include my custom ToolbarSet for this editor instance:
If you have a number of files that use the FCKeditor then there is a good possibility you may want to have alternative customisation. You can add additional custom ToolbarSets. I add mine at the bottom of the fckeditor.js file.
Now, that just about gives you enough to setup a FCKeditor inside an ADDT Dynamic Form as an alternative to using MX Kollection with KTML. There are a few other points that I usually have to take care of though so I will cover them here.
There is a small selection of skins available for the editor and you can define the skin to be used in the fckeditor.js file. Around line 44 or 45 is where you can define the path to the desired skin. This example calls the silver skin:
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/silver/' ;
The last point I will cover here is how to customise the styling of the content of the text displayed by FCKeditor in the replacement textarea. For this you need to do two things: setup an ID for the contant and then edit the appropriate CSS file. To setup an ID you have to set a value for like this:
FCKConfig.BodyId = 'fckWindow' ;
In my fckeditor.js file I have edited the line 169 by adding the value "fckWindow". It is possible to use the css file you have defined for the admin section of your site, or you can edit the default FCKeditor css file for the iframe page used by FCKeditor. In my example, I have chosen the latter and have edited the file FCKeditor/editor/css/fck_editorarea.css. There I have set the font family by editing the body tag styles and added the following:
Well, I hope that gives you a good start. If I can help further just let me know.
Re: FCKeditor with Adobe DW CS3 ADDT
I think I understand this - I was able to incorporate the editor into my form.
2 questions though if you don't mind! I noticed that this does not use the 'replace all text areas' feature - although your instructions must be a more precise way to do this do you not recommend using that feature?
Also - I did have trouble incorporating the script for your custom tool set. I could not find where in the existing fckeditor.js file I should insert your script. I believe I am using 2.5.1 of the file but there is no definition of a default toolbarset at line 96. Am I looking in the wrong place?
Thank you again for all your effort!
Dan
Re: FCKeditor with Adobe DW CS3 ADDT
Glad to help out.
Sorry, I thought I covered that. So far I have not attempted to use this new feature. Need to get current job finished first. The lack of KTML keeps causing me great pain as I am sure it will do for many others. However, despite my earlier vow to drop Dw CS3 I am persisting with the best alternative so I hope my efforts can be of some help.
I usually add my custom toolbars at the end of the file. That way I cause the least changes to the file's line numbering. Just create your new toolbarset along the lines of what is provided either in my example or the given examples.
Regards,
Re: FCKeditor with Adobe DW CS3 ADDT
I have tried implementing fckeditor with the PHP/MySQl server model as outlined in your example but discovered that textarea is not showing at all in the multiple insert/update form at all.
If I select just one article to edit, the fckeditor shows but when I select more than one article to insert or update, the fckeditor does no show at all, the form just goes blank where the fckeditor is supposed to show, making it impossible for me to even add text using ordinary textarea.
Please help me, perhaps with the full code from a page in your work.