问题
I'm working in Drupal, got CKEditor set up and have the tables plugin going on. The design I'm working with requires some visual elements that would be made A LOT easier if I had a div with a class wrapped around the tables in the output (because tables can't have padding on their sides in IE)...
SO.. I'm can think of 2 ways to do it, but don't know and can't figure out how to do either:
1)Use CKEditor to wrap all table elemnts in a div with a class..
2)Use Drupal input filter to wrap all table elements in a div with a class..
Does anyone know how to do either?
I don't want to add the div on page load.. that would cause a jump, and depend on javascript for the output.
This seems promising: How to find and replace text in CKEditor using Javascript? but is it reliable? It seems kinda hackish and if a non-dev type is going be using the Editor it has to be 100% foolproof..
thanks!
来源:https://stackoverflow.com/questions/5696323/wrap-tables-in-div-with-ckeditor-in-drupal-textarea-input