Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Disable Wysywig optionally? View modes: 
User avatar
Member
Member
Blasty - 1/7/2011 8:08:05 AM
   
Disable Wysywig optionally?
Ok, it appears the wysywig in forums doesn't work for people viewing sites from mobile apps such as android, or Ipads. I'd like to put a checkbox they could hit to turn the wysywig on or off. Is this possible.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/12/2011 3:00:08 AM
   
RE:Disable Wysywig optionally?
Hello,

I consulted this problem with our TL and this would be a security risk. He would recommend you to don't use the WYSIWYG Editor in this case at all.

Best regards,
Boris Pocatko

User avatar
Member
Member
Blasty - 1/12/2011 1:09:52 PM
   
RE:Disable Wysywig optionally?
would be unfortunate to disable the wysywig for all users just to make the forums friendly for the mobile users.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/13/2011 6:59:09 AM
   
RE:Disable Wysywig optionally?
Hello,

I consulted this issue with an another developer responsible for the WYSIWYG Editor and he confirmed, that this would be a severe security problem, since the user would be able to add any javascript or html code into the message. You could use BB tags instead as in this forum.

Best regards,
Boris Pocatko

User avatar
Member
Member
Blasty - 1/13/2011 10:20:38 AM
   
RE:Disable Wysywig optionally?
Yes, that would be a security risk, the goal of disabling the wyswig optionally would be to put people in the state similar to what kentico does when you disable the wysywig on a forum.

Isn't this what the quick reply control uses? I was thinking of just trying to add the quick reply to the page for the mobile users.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/14/2011 3:18:57 AM
   
RE:Disable Wysywig optionally?
Hello,

I asked our developer if he could dig deeper into this. He checked the security concerns and it seems to be doable. But you need to alter the following files:

~\CMSModules\Forums\Controls\NewPost.ascx.cs
~\CMSModules\Forums\Controls\Posts\PostEdit.ascx.cs

You need to replace the checking of the editor type by a method of your own. For example you can add a field to the user table where you would set if the user uses the WYSIWYG or BB code editor. The method you need to replace is ForumHTMLEditor. The user could choose the editor e.g. in his account settings.

Best regards,
Boris Pocatko