We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6852
    • 39 Posts
    Hi everyone,

    Im pretty new to Modx, but have use CMS before, im liking it so far but have hit a brick wall of late..

    the problem is im not really ’getting’ the linking a css file to my tiny MCE editor..

    ive gone through as much of the support documents/websites/forums etc as i can but im still not completly clear..

    here’s what ive done:


    Path to css file: /assets/site/style.css (sucessfully tested it with changing the bodybackground text to different colour)

    CSS selectors: ’Small text=smallText;Blue Heading=blueHeading;Bullet Point=bulletPoint;Main Heading=mainHeading;Sub Heading=subHeading;Small Tab=tab1;Large Tab=tab2’

    and the contents of my style.css are:
    
    body{
    
    }
    
    .bulletPoint {
    
    	padding: 0px;
    	margin: 6px 0px 0px 15px;
    	list-style: disc outside url("../assets/images/bullet.png");
    	background-color: #999999;
    }
    
    .blueHeading{
    color: #33FFFF;
    	background-color: #999999;
    
    }
    
    .mainHeading{
    font-size: 18px;
    	background-color: #999999;
    
    
    }
    
    .subHeading{
    
    font-size: 14px;
    	background-color: #999999;
    
    }
    
    .tab1{
    padding-left: 25px;
    	background-color: #999999;
    
    
    }
    
    .tab2{
    padding-left: 50px;
    
    	background-color: #999999;
    }
    
    .smallText{
    
    font-size: 16px;
    background-color: #0033FF;
    }
    



    I thought i had it working at one stage but nope, gone cant quite figure it out and cant seem to find an answer(have a feeling its something very small and silly.)

    thanks for any help anyone can offer

      • 6852
      • 39 Posts
      oh sorry yeah i forgot to mention, the styles ’appear’ in the dropdown menu no problem, but when i try to apply that style to some text nothing happens.... that is the problem i cant figure out, sorry should have mentioned that above smiley
      • What is supposed to happen is the classname gets added to the element in question. Take a look at the HTML source for the field and see if it does that, at least.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 6852
          • 39 Posts
          hey so i was thinking about what you were saying and had a look at the bottom left part of the editor that tells you the selected texts tags,
          seeing as most of mine were ’p’ for paragraph tags i changed my code so that it starts with p { } now and all other elements off my css are classes of this tag.
          but now when select something, and try to change it(unsucessfully) through the css the tag has a ’span’ in it?.
          im attaching an image screenshot of what im talking about, it will probably help explain...
          thank for your help so far

            • 4018
            • 1,131 Posts
            Create a special CSS file that you will use just for TinyMCE and add the classes for the dropdown to it. Then place this CSS file somewhere in the assets directory. Go to the MODx configuration and change the "Path to CSS file" to the location of your CSS file. TinyMCE will then use this CSS file and will give you a preview of these elements. laugh
              Jeff Whitfield

              "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
              • 6852
              • 39 Posts
              Hi Jeff, thanks for the reply, i had done already, continued trying it but just ended up changing the ’format’(h1, h2, h3, h4 etc) css settings to suit what i needed, not conventional i know but it worked.
                • 29181
                • 480 Posts
                I just finished doing the same thing you mentioned. I did add a couple of styles to position imagery left and right depending with the use of the styles dropdown, but am trying to make the client use heading & paragraph tags for everything else, for no other reason than a H1 is better than a .thisWillBeaTitle class.

                The steps I carried out are exactly as you & Jeff mentioned...weird.

                Taff
                  Adrian Lawley: www.adrianlawley.com