Class WysiwygEditorConfigRegistry


  • @Singleton
    public class WysiwygEditorConfigRegistry
    extends Object
    A registry of configurations of the WYSIWYG editor per Silverpeas components. Each Silverpeas components has its own configuration of the WYSIWYG editor and this registry is a way to gather them in a single place in order to retrieve them later in any layer.
    Author:
    mmoquillon
    • Constructor Detail

      • WysiwygEditorConfigRegistry

        protected WysiwygEditorConfigRegistry()
    • Method Detail

      • register

        public void register​(String componentName,
                             WysiwygEditorConfig config)
        Register for the specified component a specific configuration of the WYSIWYG editor.
        Parameters:
        componentName - the name of the component. It can be a personal or a multi-user application.
        config - the WYSIWYG editor configuration to register.
      • get

        public WysiwygEditorConfig get​(String componentName)
        Gets the WYSIWYG editor configuration registered for the specified component. It no particular configuration was registered for the given component, then a default configuration is returned.
        Parameters:
        componentName - the name of the component for which the WYSIWYG editor configuration is asked.
        Returns:
        either the peculiar configuration for the specified component or the default WYSIWYG editor configuration.