Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
654 views
in Plugins by
the problem is the markdown editor can not be responsive. is it possible to destroy markdown editor on a small device like destroying ckeditor here http://amiyasahu.com/how-to-destroy-ckeditor-in-small-screen-devices/???

Or you can suggest me what should i do....
Q2A version: 1.7.4
by
I have same problem.
by
Have you solve it?

1 Answer

+2 votes
by
selected by
 
Best answer

You could add this to the get_field function in qa-markdown-editor.php

if (qa_is_mobile_probably()) {
    $html = '<textarea name="'.$fieldname.'" id="wmd-input-'.$fieldname.'" class="wmd-input">'.$content.'</textarea>' . "\n";
}
else {
    // the code that's already there
}

return array('type'=>'custom', 'html'=>$html);

I'll look into this for the plugin. I haven't updated the components for a while so I may be able to improve the speed there.

by
Thank for your answer. It's work... , but there any problem in ask questtion page, category list can't be load.... whats wrong?
by
it's work fine thank you....
I just replace function load_script here :
<pre>
public function load_script($fieldname)
    {
        $data ='';
        if (qa_is_mobile_probably() == false) {
        $data = 'var converter = Markdown.getSanitizingConverter();' . "\n" .
            'var editor = new Markdown.Editor(converter, "-'.$fieldname.'");' . "\n" .
            'editor.run();' . "\n";
        }
        return  $data;
    }
<pre>
...