We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22927
    • 19 Posts
    Made a new topic here, didn’t know where else to bring it... wink


    Logic:
    - All editor specific settings in one file, editor.php (or TinyMCE.php or XINHA.php or simular) part of external editor
    - All config settings in modx, stuff like imagepath settings, stylesheets to use etc
    - The editor.php file in subdir (ie: /manager/media/editors/TinyMCE.php etc)
    - All editor specific files in subdir (ie: TinyMCE etc /manager/media/editors/TinyMCE etc)

    Call from within manager:
    - Get all config settings, include the editor.
    - Do the edit hankypanky

    Will work on TinyMCE to make it external, mustn’t be much work as it is allready done from within the manager files, just need to dig the right files wink

    Hope this helps?
    • Quote from: pcwacht at Jun 02, 2005, 05:49 PM

      Made a new topic here, didn’t know where else to bring it... wink


      Logic:
      - All editor specific settings in one file, editor.php (or TinyMCE.php or XINHA.php or simular) part of external editor
      - All config settings in modx, stuff like imagepath settings, stylesheets to use etc
      - The editor.php file in subdir (ie: /manager/media/editors/TinyMCE.php etc)
      - All editor specific files in subdir (ie: TinyMCE etc /manager/media/editors/TinyMCE etc)

      Call from within manager:
      - Get all config settings, include the editor.
      - Do the edit hankypanky

      Will work on TinyMCE to make it external, mustn’t be much work as it is allready done from within the manager files, just need to dig the right files wink

      Hope this helps?


      First, their is an issue in that some files expected in the core editor package have to be edited to make it work in every case so far. So isolating all changes to one file for each editor would be nice, but isn’t practical at this time. Second, all integrations, except for the FCKeditor filemanager plugin, are currently being done using JavaScript, and not using the PHP methods (not sure this is really an issue, but thought I’d metion that).

      There are certainly a lot of settings that could be set with each editor, so having the editor.php define the options to be displayed on the settings tab for the currently selected editor (this could be part of the job of each custom editor.php) would be optimal. We can then extend the user settings tab to allow individual users to customize their own user overrides for each editor using the same list.

      I’d really like to keep the editors directly under /manager/media/ as they are now; we could use another php file in this dir, or a database config setting to track the location of each editor a user has installed and enabled. Then we can offer custom install packages of each editor with the MODx customizations already made, downloadable from our site or, possibly even on the project site for the editor (as with Mambo’s FCKeditor sub-project).
        • 22927
        • 19 Posts
        k, understood


        Next logic

        All what the wysiwyg needs to do is:
        1 init editor
        2 start editor
        3 retrieve edited content

        How about some editor.php file wich get included in wich the following functions are defined?

        function InitEditor {
        // here comes all the stuff needed to fire up the editor
        // globals could be used to pass things like paths etc
        // ?> <some html and javascript> <?php could be used to start javascrpt stuff
        }

        function StartEditor ( $TextArea, $Width, $Height, $Content, ) {
        // Start the editor
        }

        function EndEditor ( $Content ) {
        // Stuff needed to retrieve the content
        }

        When this succeeds, all that is left in manager’s (mutate_content_dynamic.action.php) needs to do is:
        get the needed variables, include the external editot.php and call the functions.

        Every editor needs its own editor.php and base package wich needs to go to manager/media/

        Those who wants a new editor need to make the right editor.php, example, xinha.php, the xinha files needs to go to manager/media/xinha

        Think this is better.

        John