2

is there a way to load the RTE javascript in a module for the cpanel?

I have tried the following, but keep getting an error when refreshing the page:

ee()->load->library(array('javascript', 'rte_lib'));

ee()->javascript->output(
  ee()->rte_lib->build_js(0, '.WysiHat-field', NULL, TRUE)
);

error: Unable to load the requested class: rte_lib

any ideas?

thanks in advance.

1

You have to add the package path for the RTE module first:

ee()->load->add_package_path(PATH_MOD.'rte/');
| improve this answer | |
  • i figured that out just before you posted this, but thanks :) – 4razmus Nov 1 '13 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.