We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46448
    • 98 Posts
    First of all, let's have a round of applause for danya_postfactum, author of the CKEditor MODX Extra! Great job on getting CKEditor into MODX!

    Suggestion:
    CKEditor uses several different files to allow developers to customize the presentation and functionality of their rich text editor. Once a web developer using MODX realizes that CKEditor's default behavior in using a CSS file is to use the CSS body {} descriptor, the developer can make up a custom CSS file different than the actual site uses, to get the CKEditor "widget" to display properly - (it may be different that the site's actual body attributes.) Further, the web developer can modify the styles.js file and gain control over the dropdown lists.

    However, in doing these things, CKEditor then uses those parameters universally on the website. For some (many? most?) websites, that is probably OK. For other websites, it would be great to have control over which customization files are used on each MODX template.

    Not all areas of content on a website will use the same CSS (and certainly not the body {} CSS.) That's one of the reasons that web developers create distinct ID and CLASS descriptors that are then applied to specific DIVS. If, for example, we have a DIV we want to be a fixed-width column 200 pixels wide, with a light green background, with blue borders, using a sanserif font, using center justified text, that may be quite different from our main content area.

    Once we turn the website over to the site owner, and their content creators need to use our templates and TVs, it would be great if we were able to provide the content creators with a true WYSIWYG rich text editor that actually displays the content as it will look on the published page. (Going back to our example) think of how difficult it will be for a content creator to add content to a 200 pixel-wide column, when they are in MODX and the rich text editor is as wide as (and allows line length of) the content creator's widescreen monitor. Difficult to visualize the outcome, and certainly not "WYSIWYG."

    So, how could this be implemented in MODX? I'm not sure. Perhaps it would require a MODX core core change to allow each template to access a specific (non-universal) CSS file, and would be done on the Template Properties tab? (I'm not sure how the "Properties" work, and I don't know if this would fall under "Default Properties" or under a new, custom Property.) Somehow, the template creator would need to have control over which CSS file was used for each template (a setting for the template's rich text editor for the [[*content]] area), which would be used as a default for any TVs used that did not override the default. And, the ability to select the CSS file per TV (same functionality as the [[*content]], which is really just a core component TV.)

    I'm putting this post in the Add-ons | Rich Text Editors & File Browser subforum so that danya_postfactum will see it, and determine how it could be done (whether it would require modification to the MODX core code, or whether it could be modified in the MODX Extra code.)

    Imagine true WYSIWYG in each and every area that content creators enter content.

    Dennis
      • 46448
      • 98 Posts
      Hey danya_postfactum, did you ever see this thread?

      Dennis