Class TinyMceBehavior

    • Constructor Detail

      • TinyMceBehavior

        public TinyMceBehavior()
    • Method Detail

      • wrapTinyMceSettingsScript

        protected HeaderItem wrapTinyMceSettingsScript​(String settingScript,
                                                       Component component)
        Wrap the initialization script for TinyMCE into a HeaderItem. In this way we can control when and how the script should be executed.
        Parameters:
        settingScript - the actual initialization script for TinyMCE
        component - the target component that must be decorated with TinyMCE
        Returns:
        the HeaderItem containing
      • isMarkupIdRequired

        protected boolean isMarkupIdRequired()
      • getComponent

        protected Component getComponent()
      • getTinyMCEReference

        protected ResourceReference getTinyMCEReference()

        TinyMCE javascript resource.

        Note: The TinyMCE source cannot be lazily loaded via ajax. Therefore, adding this in a IHeaderContributor.renderHead(IHeaderResponse) must be done in a component that is not rendered via Ajax. If you wish to load this via Ajax, you can use the very hacky workaround #lazyLoadTinyMCEResource(IHeaderResponse).

        Returns: