Expose config settings to JavaScript
| Project: | FCKeditor - WYSIWYG HTML editor |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
| Issue tags: | javascript rewrite |
Jump to:
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
Interesting idea, we'll look into this.
#2
Might be a good idea to reorganize Javascript in a later version.
#3
Typo in tag