Hi,
I use "class" attribute to "bind" FCKeditor to textarea fields.
Example (I use ini files):
; content element
form.elements.content.type = "textarea"
form.elements.content.options.required = true
form.elements.content.options.label = "Content"
form.elements.content.options.attribs.class = "editor"
And in my global JavaScript (jQuery example):
ta = $(".editor"); // find all textareas with editor class
$.each(ta, function(i, textarea){
var oFCKeditor = new FCKeditor(textarea.name);
oFCKeditor.BasePath = baseUrl +"js/fckeditor/";
oFCKeditor.ToolbarSet = "Basic"; // Here you could make some
logic how to
set different toolbarset, maybe adding more classes to the textarea?
class="editor Default"
// if ($(textarea).hasClass("Default")) oFCKeditor.ToolbarSet = "Default"
oFCKeditor.ReplaceTextarea();
})
And of course I add fckeditor.js to my actions where I render forms.
br,
Marko
--
View this message in context:
http://www.nabble.com/FCKEditor-and-Zend_Form-integration-tp19688738p20616806.html
Sent from the Zend Framework mailing list archive at Nabble.com.