Can I conditionally display another WYSIWYG-editor depending on if the client is mobile?
Hi
I use the cleditor-plugin but it doesn't work for the mobile clients. Is there some way to conditionally display the original editor for mobile clients and the cleditor for everyone else?
Alternatively, is there a nice looking WYSIWYG-editor that works for mobile clients?
Best Answers
-
peregrine MVP
@stemid said:
HiI use the cleditor-plugin but it doesn't work for the mobile clients. Is there some way to conditionally display the original editor for mobile clients and the cleditor for everyone else?
Alternatively, is there a nice looking WYSIWYG-editor that works for mobile clients?
as a general rule, only plugins with the line below in the plugininfo (in the default.php file or other class php file in the plugin) work with mobile.
'MobileFriendly' => true,
Some plugins do not have 'MobileFriendly' => true, because they will not work properly in mobile.
cleditor does not have 'MobileFriendly' => true, . my guess is, if you add it the plugin may not work correctly, but you could try adding the line for an experiment.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
5
Answers
as a general rule, only plugins with the line below in the plugininfo (in the default.php file or other class php file in the plugin) work with mobile.
'MobileFriendly' => true,
Some plugins do not have 'MobileFriendly' => true, because they will not work properly in mobile.
cleditor does not have 'MobileFriendly' => true, . my guess is, if you add it the plugin may not work correctly, but you could try adding the line for an experiment.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
No that didn't help @peregrine. The problem is that the Android keyboard comes up but then goes away immediately with the cleditor. This problem persists with MobileFriendly set to True in the plugins default.php file.
Adding
'MobileFriendly' => false,
to CLEditor should suppress its usage on mobile.I meant to mark @R_J as the answer but I guess it doesn't matter. The key to the problem was MobileFriendly setting to FALSE in the cleditor plugins default.php.
mobile friendly should default to false if it MobileFriendly is not in the plugin.
and the default cleditor doesn not have MobileFriendly!
setting it to True gives you the cleditor in mobile friendly.
any plugin with that has the word "Plugin" attached to the name works this way.
class cleditorPlugin extends Gdn_Plugin {
some plugins like like this
vs.
since there is a bug relating to this in vanilla, it does not work by the same rules.
somewhere along the line you must have modified cleditor - hence the confusion...
https://github.com/vanilla/vanilla/blob/2.1/plugins/cleditor/default.php#L53
the default unmodified cleditor will not show up on mobile. I bet you modifed the plugin and created the issue.
if you want to use buttonbar with only mobile and cleditor only with non mobile.
use the cleditor that come with the core.
and check for mobile in the buttonbar in the buttonbar plugin im the methods.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
That's the default behavior.
CLE editor does not show up in mobile, the regular editor does.
What he said.
Try the CKEditor... not perfect, but in my opinion the best wysiwyg Plugin for mobile and nonmobile...