1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I automatically switch to the BB Code Editor if browsing with an iPad

Discussion in 'XenForo Development Discussions' started by AndyB, Nov 20, 2013.

  1. AndyB

    AndyB Well-Known Member

    How can I automatically switch between the BB Code Editor and the Rich Text Editor depending weather or not the user is browsing with an iPad?

    I hope to be able to extend one of the classes to do this so I could create an add-on for this function.

    Any help greatly appreciated.
     
  2. xf_phantom

    xf_phantom Well-Known Member

    You could use event editor_setup to change the editor options
     
  3. xf_phantom

    xf_phantom Well-Known Member

    PHP:
      $visitor XenForo_Visitor::getInstance();
      if (
    $visitor->isBrowsingWith('firefox')){
      
    $showWysiwyg true;
      
     
    Marcus likes this.
  4. AndyB

    AndyB Well-Known Member

    I got this working.

    Thank you, xf_phantom.
     

Share This Page