We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23085
    • 9 Posts
    Did anybody manage to teach TinyMCE a default style?
    We want to have a certain style set by default but can’t get it to work.
    Any hints?
      • 29181
      • 480 Posts
      This is very strange as I’m pretty sure I have had it working in the past.

      As an admin I have (previously) under System configuration => Interface and Features setup a Path to CSS file and Plugins, buttons & selectors.

      When I setup a new Manager User shouldn’t it use these settings by default?

      Thanks for any pointers that would save me 5 minutes per User that I have to setup smiley

      Taff
        Adrian Lawley: www.adrianlawley.com
        • 29181
        • 480 Posts
        My short term solution is to do something like this:

        INSERT INTO `modx_user_settings` ( `user` , `setting_name` , `setting_value` )
        VALUES 
        ('3', 'manager_lang_attribute', 'de'), 
        ('3', 'which_editor', 'TinyMCE'),
        ('3', 'manager_language', 'german'),
        ('3', 'tinymce_custom_plugins', 'style,advimage,advlink,searchreplace,print,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras,visualchars,media'),
        ('3', 'tinymce_custom_buttons1', 'undo,redo,selectall,separator,pastetext,pasteword,separator,search,replace,separator,nonbreaking,hr,charmap,separator,image,link,unlink,anchor,media,separator,cleanup,removeformat,separator,fullscreen,print,code,help'),
        ('3', 'tinymce_custom_buttons2', 'bold,italic,underline,strikethrough,sub,sup,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect,separator,styleprops'),
        ('3', 'tinymce_css_selectors', 'Bild mit Rahm und Rand=artikelBild'),
        ('3', 'editor_css_path', 'assets/templates/trendlux_default/editor.css'),
        ('3', 'allow_manager_access','1'),
        ('3', 'manager_direction','ltr')
        ;


        I think the next step will be to integrate that into a plugin.

        I have done something similar in the past with obBeforeWebUserSave but there doesn’t appear to be an equal for manager users?

        Thanks!
          Adrian Lawley: www.adrianlawley.com