Theresa Arzadon-Labajo

Tab key in Drupal WYSIWYG

Posted by Theresa Arzadon-Labajo (tarzadon) on May 05 2010
Tech Stuff >> Drupal
When typing in Drupal's WYSIWYG editor (i.e. FCKeditor or TinyMCE), the tab key will be seen by the browser as a navigation tool and proceed to the next tab-stop which is outside of the textarea.

I installed the Firefox add-on "Tabinta" (Tabs in Textarea), but this only worked on plain HTML textareas, like this one:

The FCKeditor source documentation on says:


The TabSpaces function determines how many "spaces" will the cursor move or strictly speaking how many " " will appear in the HTML when pressing "TAB" on your keyboard. By default it is set to "0" so no action is taken when pressing the "TAB" button.


FCKConfig.TabSpaces = 5 ;

I inserted the line "FCKConfig.TabSpaces = 5" into sites/all/modules/fckeditor/fckeditor.config.js
I ran "drush updatedb" just to be sure.
Then I tested that the tab key indeed worked in an fckeditor textarea.

No luck with TinyMCE yet.

Last changed: Feb 27 2020 at 4:13 PM