When applying the use of the Rich Text Editor on a small screen, it's obviously very useful having those little 'side arrows' around, so you can 'scroll' through all the options the RTE provides. But when I create a custom RTE with only a few three options applied to it, those arrows still remain.
How can I hide these user unfriendly arrows, which are suggesting there are more (hidden) options than the ones visible?
There is an event called AfterContentControlLoad (in Umbraco.controls.ContentControl) and I've once been able to hide the complete menu. Here is the code I used:
public void ContentControl_AfterContentControlLoad(ContentControl contentControl, ContentControlLoadEventArgs e)
{
//Get the id of the document.
int id = Convert.ToInt32(HttpContext.Current.Request.QueryString["id"]);
//Get the document.
Document document = new Document(id);
//Get the userId of the current user.
int userId = UmbracoEnsuredPage.GetUserId(UmbracoEnsuredPage.umbracoUserContextID);
//Check if the current user is the creator of the document. If he's not the menu will be disabled and the user can't save the data.
//If the userId is 0 the user is the admin and this code must be skipped because the admin must be able to edit everything.
if ((document.Creator.Id != userId) && (userId != 0))
{
foreach (Control control in contentControl.Controls)
{
//Search all the TabPage controls in the contentControl.
if (control is TabPage)
{
//Hide the menu.
((TabPage)control).Menu.Attributes["style"] = "Display: none;";
}
}
}
}
Maybe you can use something like to this to hide those arrows.
O wow, that's looking interesting! Though a bit too hard too build for me, I'm afraid ;-) Thanks anyway, I guess I assumed there would just be a simple check box to hide those arrows ;-)
Hide arrows
When applying the use of the Rich Text Editor on a small screen, it's obviously very useful having those little 'side arrows' around, so you can 'scroll' through all the options the RTE provides. But when I create a custom RTE with only a few three options applied to it, those arrows still remain.
How can I hide these user unfriendly arrows, which are suggesting there are more (hidden) options than the ones visible?
Hello,
There is an event called AfterContentControlLoad (in Umbraco.controls.ContentControl) and I've once been able to hide the complete menu. Here is the code I used:
Maybe you can use something like to this to hide those arrows.
Jeroen
O wow, that's looking interesting! Though a bit too hard too build for me, I'm afraid ;-)
Thanks anyway, I guess I assumed there would just be a simple check box to hide those arrows ;-)
is working on a reply...