Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
1.3k views
in Plugins by
I would to have the wysiwyg-editor being disabled for mobile users on my site. Is that possible?
Q2A version: 1.6.2

2 Answers

+5 votes
by
selected by
 
Best answer
Yes it is posible. I did that. You need to edit one of those php files in wysiwyg-editor directory. I dont have handy but I will get home in a couple of hours and get back and answer you.

Okay, here is the condition to use in your qa-wysiwyg-editor.php:

if (qa_is_mobile_probably()){...

for example:

                if (qa_is_mobile_probably()){
                    $qa_content['script_lines'][]=array(
                    "qa_wysiwyg_editor_config={toolbar:[".    
                    "['Blockquote'],".
                    "]".
                    ", defaultLanguage:".qa_js(qa_opt('site_language')).
                    ", skin:'v2'".
                    ", toolbarCanCollapse:false".
                    ", removePlugins:'elementspath'".
                    ", resize_enabled:true".
                    ", autogrow:false".
                    ", entities:false".
                    ", width:'90%'".
                    ", height:150".
                    ($uploadimages ? (", filebrowserImageUploadUrl:".qa_js(qa_path('wysiwyg-editor-upload', array('qa_only_image' => true)))) : "").
                    ($uploadall ? (", filebrowserUploadUrl:".qa_js(qa_path('wysiwyg-editor-upload'))) : "").
                    "}"
                );
            } else {
                    $qa_content['script_lines'][]=array(
                    "qa_wysiwyg_editor_config={toolbar:[".
                    "['Bold','Italic'],"."['TextColor','BGColor'],".
                    "['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],".
                    "['Blockquote'],"."['Image'],".
                    "['NumberedList','BulletedList','-','Outdent','Indent'],".                                        
                    "]".
                    ", defaultLanguage:".qa_js(qa_opt('site_language')).
                    ", skin:'v2'".
                    ", toolbarCanCollapse:false".
                    ", removePlugins:'elementspath'".
                    ", resize_enabled:true".
                    ", autogrow:false".
                    ", entities:false".
                    ($uploadimages ? (", filebrowserImageUploadUrl:".qa_js(qa_path('wysiwyg-editor-upload', array('qa_only_image' => true)))) : "").
                    ($uploadall ? (", filebrowserUploadUrl:".qa_js(qa_path('wysiwyg-editor-upload'))) : "").
                    "}"
                );
            }
by
thank you for your answer. I will try that.
by
Please tell me where I am supposed to put that code. On which Should I put it. It brings error.
–1 vote
by
Please tell me where I am supposed to put that code. On which Should I put it. It brings error.
...