NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Hiding Redactor Menus
« previous
next »
Print
Pages: [
1
]
Author
Topic: Hiding Redactor Menus (Read 3463 times)
olu
Sr. Member
Posts: 352
Hiding Redactor Menus
«
on:
August 22, 2013, 06:06:27 AM »
Please is there a way to hide some menus in the redactor text editor that I do not want available for users.
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: Hiding Redactor Menus
«
Reply #1 on:
August 22, 2013, 09:30:59 PM »
Indeed there is.
Go to the WebHandler procedure
.RedactorInit method.
create a variable
options StringTheory
then
before the parent call use
Self.SetOption(options,'something','somevalue')
Self.SetOption(options,'somethingelse','somevalue')
And the the parent call becomes;
Parent.RedactorInit(p_FieldId,p_Flags,options.GetValue())
Return
(be sure to put the Return in before the generated Parent call.)
A list of Redactor settings are here;
http://imperavi.com/redactor/docs/settings/
Here's an example of the option needed to manage the buttons;
http://imperavi.com/redactor/docs/toolbar/
Logged
olu
Sr. Member
Posts: 352
Re: Hiding Redactor Menus
«
Reply #2 on:
August 27, 2013, 11:18:15 PM »
Hi Bruce,
Been trying to figure this out following your instructions, but the only button I have been able to control so far is only the source button. I just can not find the call for the other buttons. Please any help would be appreciated. thanks.
Logged
Matthew
Full Member
Posts: 137
Re: Hiding Redactor Menus
«
Reply #3 on:
August 28, 2013, 12:32:42 AM »
Try this:
In the
p_web.RedactorInit PROCEDURE(String p_FieldId,Long p_Flags=0,<string p_manual>)
declare variable:
loc:options string(Net:MaxBinData)
And before
ReturnValue = PARENT.RedactorInit(p_FieldId,p_Flags,p_manual)
put:
loc:options = clip(p_manual) & ', buttons: [''formatting'', ''bold'', ''italic'', ''deleted'', ''underline'',''|'', ' &|
'''unorderedlist'', ''orderedlist'', ''outdent'', ''indent'', ''|'', ' &|
'''table'', ''|'', ' &|
'''fontcolor'', ''backcolor'', ''|'', ' &|
'''alignment'', ''|'', ' &|
'''horizontalrule'']'
ReturnValue = PARENT.RedactorInit(p_FieldId,p_Flags,loc:options)
RETURN ReturnValue
You can remove or add buttons as You like - names of buttons You can find at
http://imperavi.com/redactor/docs/settings/
Regards,
Matthew
«
Last Edit: August 28, 2013, 02:48:30 AM by Bruce
»
Logged
olu
Sr. Member
Posts: 352
Re: Hiding Redactor Menus
«
Reply #4 on:
August 28, 2013, 02:44:32 AM »
Thanks matthew and bruce , got it working now but just one slight problem I ran into after doing that now my text box width is no more fixed as I told it I only want 10columes but it now allows the width to expand out of the page. And when first open if no text already present the with shrinks.
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Hiding Redactor Menus