NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: olu 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.
-
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/
-
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.
-
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
-
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.