WordPress.org

Forums

[Plugin: TinyMCE Advanced] How do I 'activate' tadv-mce.css (15 posts)

  1. thesavagemind
    Member
    Posted 5 years ago #

    I have changed the permissions for the two css files (tadv-mce and tadv-styles) and they are writeable, but the edit page keeps telling me they are 'inactive'. Moreover the visual editor shows the style effects of the classes I've added to tadv-mce but they don't show up in viewing the page itself.

    How do I activate those two css files?

    http://wordpress.org/extend/plugins/tinymce-advanced/

  2. Snackmaster
    Member
    Posted 5 years ago #

    I have the same question.

    I have: "Import Current Theme CSS classes" checked but no classes are being imported.

    I'm trying to use "Custom CSS styles" but the CSS says it's "inactive"

  3. guileshill
    Member
    Posted 5 years ago #

    I too have this. Just adding my voice to the request for someone who might have a solution to the problem of importing the css classes into the style dropdown. Andrew seems not to be responding to anyone on the plugin blog any more.

  4. zackisaiah
    Member
    Posted 5 years ago #

    Still no fix for the TinyMCE plugin, though I found a way to edit the buttons (and add a style drop-down list) in your functions.php file:

    http://blog.estherswhite.net/2009/11/customizing-tinymce/

    A little more work than I have time for at the moment, but it looks like it could solve the problem.

  5. TRegan
    Member
    Posted 5 years ago #

    I'm having this problem too, but with a different plugin....

  6. drtanz
    Inactive
    Posted 4 years ago #

    having the same problem, any fix please?

  7. artur
    Member
    Posted 4 years ago #

    SAME HERE!
    ** Also **
    i noticed that when i put new styles into the Style.css, THEY DO SHOW UP in the 'Styles' menu list...BUT ONLY ON FFOX/MAC! and dont show up on Safari/MAC.

    please fix asap.. thanks!

  8. mymail
    Member
    Posted 4 years ago #

    i also have this same problem.. still searching for solutions
    i wanna change the dmsguestbook.css
    but it's inactive!
    could somebody share their thoughts?
    greatly appreciated...

  9. cadbloke
    Member
    Posted 4 years ago #

    +1 I have this problem too. It's a real shame that such a simple thing can derail such a useful plugin. I guess we're getting what we paid for. :(

  10. turningpoint79
    Member
    Posted 4 years ago #

    I finally did it - just include following code to your functions.php:

    /* Custom CSS styles on TinyMCE Editor */
    
    if ( ! function_exists( 'myCustomTinyMCE' ) ) :
    
    function myCustomTinyMCE($init) {
    
      	$init['theme_advanced_styles'] = 'Ueberschrift=ueberschrift;Foto=foto';  
    
     return $init;
    
    }
    endif;
    
    add_filter('tiny_mce_before_init', 'myCustomTinyMCE' );
    add_filter( 'mce_css', 'tdav_css' );

    This not only removed all predefined classes from the dropdown box, but lets you declare your own classes within the tadv-mce.css file.

    Only drawback: you will have to declare the classes you want to use within the "$init['theme_advanced_styles'] = 'Ueberschrift=ueberschrift;Foto=foto';" section of the code above. And naturally, your classes should also exist in your default-css for the frontend.

    Also, if you have troubles with Safari/Mac, don't forget to empty your cache after doing any changes.

  11. drtanz
    Inactive
    Posted 4 years ago #

    I tried this code and my class is showing up in the styles dropdown, but its effects are not being implemented. I put the following style in tadv-mce.css and style.css:

    .mytestlass { font-weight: bold; text-transform: uppercase; }

    then put the following in functions.php:

    /* Custom CSS styles on TinyMCE Editor */
    
    if ( ! function_exists( 'myCustomTinyMCE' ) ) :
    
    function myCustomTinyMCE($init) {
    
      	$init['theme_advanced_styles'] = 'Mytestclass=mytestclass';  
    
     return $init;
    
    }
    endif;
    
    add_filter('tiny_mce_before_init', 'myCustomTinyMCE' );
    add_filter( 'mce_css', 'tdav_css' );

    If I change the $init line to
    $init['theme_advanced_styles'] = '';

    the style actually works but I get back all those default styles.

    Am I doing something wrong?

  12. turningpoint79
    Member
    Posted 4 years ago #

    Sounds to me like you didn't empty your browser cache and reload the edit-page after implementing your code and classes...

  13. kiralyandras
    Member
    Posted 4 years ago #

    I got
    this after inserting the suggested code:
    Fatal error: Call to undefined function add_filter() in functions.php on line 39

    And in my case that line is:
    add_filter('tiny_mce_before_init', 'myCustomTinyMCE' );

  14. heidipj
    Member
    Posted 4 years ago #

    Just wanted to say thanks @turningpoint79 - that code worked for me. Took me ages to find this thread though!

  15. Daniele Raimondi
    Member
    Posted 4 years ago #

    @turningpoint79: thanks a lot! It works great and solved my problem in less than 10 seconds!!!

Topic Closed

This topic has been closed to new replies.

About this Topic