Expose config settings to JavaScript

Garrett Albright - July 16, 2008 - 18:45
Project:FCKeditor - WYSIWYG HTML editor
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Issue tags:javascript rewrite
Description

I'm using JavaScript to dynamically add a new row of controls (including a textarea) to a table when the visitor clicks an "Add row" button. I would like for FCKeditor to handle these textareas after they are dynamically created. I've successfully figured out how to do this; however, since the various configuration settings are not exposed to us with JavaScript, it doesn't work like the "proper" FCKeditor fields.

The way that the module currently passes its settings to FCKeditor -- by basically concatenating together a very long string with all the settings in it for each text area that it handles on the page, then shoving it in to the page code wrapped in a <script> tag -- is not ideal. It would be great if these settings were instead passed along to JavaScript -- maybe by extending Drupal.settings; see http://www.raincitystudios.com/blogs-and-pods/katherine-bailey/the-lowdo... -- so that I could access them when I dynamically create my text area; and the module's own JavaScript could use it as well.

I started to do some initial hacking on this, but saw that it would just take too much time at this point. I may be able to work on this on the weekend…

#1

Jorrit - July 18, 2008 - 11:29

Interesting idea, we'll look into this.

#2

Jorrit - July 25, 2009 - 08:23
Version:6.x-1.3-beta2» HEAD
Status:active» postponed

Might be a good idea to reorganize Javascript in a later version.

#3

Jorrit - July 25, 2009 - 13:50

Typo in tag

 
 

Drupal is a registered trademark of Dries Buytaert.