SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question TinyMCE 3.4 and textarea:focus issues...

    Has anyone here ever used TinyMCE? If so, would you happen to know how to, say, change the :focus border of the textarea? I've been banging my head against this for a few hours now and while I've seen all sorts of "solutions" from Google talking about using jQuery and certain CSS rules, it just seems like none of them work.

    Any feedback is appreciated.

  2. #2
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,525
    Mentioned
    52 Post(s)
    Tagged
    1 Thread(s)
    I went through the same thing with this issue. This was the closest I got, though it only seems to work in firefox (or did at the time, at least):

    http://stackoverflow.com/questions/4...ors-of-tinymce

    I gave up on it after that as it was only a minor item that wasn't really worth all the time I was sinking into it. However, I would be interested if any further progress was made on the issue.
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,525
    Mentioned
    52 Post(s)
    Tagged
    1 Thread(s)
    I revisited this problem, and ended up with a jQuery solution that supports more browsers, since using addEventListener() function on ed.getDoc() was hit-or-miss, and the AddEvent() function didn't work at all on ed.getDoc() ("function not supported on object" error).

    The following is confirmed to work in IE8, Safari 5.1.7, Chrome 19, firefox 3.6 & 12. It does not appear to work in Opera 11.64.

    Code:
                setup: function(ed){
                    ed.onInit.add(function(ed){
                        $(ed.getDoc()).contents().find('body').focus(function(){tinymce_focus();});
                        $(ed.getDoc()).contents().find('body').blur(function(){tinymce_blur();});                    
                    });
                }
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  4. #4
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks FF. I wound up doing something similar in the Drupal install I was trying to get this to work with. I created a WYSIWYG bridge and inside that, added similar code to allow me to do what I wished with the CSS.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •