CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

How to remove the "file" menu

by davenovo » 24 Apr 2018 06:31

Hello,
How do I remove the file menu item from the tinyMCE editor? Right now it only has "New Document" under there and I dont want to see that, or the file menu.
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by Jorge Sousa » 24 Apr 2018 11:32

TinyMCE.TinyMCEOptions.EditorAppearance.MenuBar

more info @

https://stackoverflow.com/questions/16033321/remove-menu-and-status-bars-in-tinymce-4

TinyMCE.TinyMCEOptions.EditorAppearance.Menu
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by davenovo » 24 Apr 2018 22:34

Hello Jorge,

Maybe I am missing something. In the EditorAppearance I just have the following

Capture.PNG


Under the Items menu the combo box is empty, even if I drop it down. If I type anything into the "items" or "title" under file, it makes the entire menu go away, both in the IDE and at runtime.

I had expected to see a visible property or something but there is nothing there. It is not obvious how to make the file menu go away. Sorry, I am not a javascript programmer :o
You do not have the required permissions to view the files attached to this post.
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by Jorge Sousa » 25 Apr 2018 16:01

Hi

The combos shouldn't be there, but have no influence on the code

if you follow the TinyMCE link posted in the link i posted before:

You will find this

https://www.tinymce.com/docs/advanced/editor-control-identifiers/#menucontrols

If you insist that you have to know javascript, to understand it well I'm sorry to hear that. I you feel disappointed just lets us know
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by davenovo » 25 Apr 2018 16:12

H Jorge,

Are you trying to say that I cannot remove the file menu using the Object Inspector in the IDE? That I have to somehow use javascript directly to hide the file menu?

I see from the original post from stack overflow that I can

You can also customise what parts of the default menu bar are visible by specifying a string of enabled menus - e.g. menubar: 'file edit'


I think that has to go in the "tinymce.init"

How do I make a custom tinymce.init?

Also, as a suggestion, if you can give an easy way to turn off/on the default menus, like you give an easy way to turn off/on the plugins, that would be very helpful.
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by davenovo » 25 Apr 2018 16:14

In the screenshot above, what is the title property supposed to do. If I type anything into it, then it makes the entire top menu dissapear.
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by Jorge Sousa » 25 Apr 2018 21:05

Hi

The title property should contain a string with the name of the menu. The items field should contain a space separated list of the controls that should populate the menu.


from

https://www.tinymce.com/docs/configure/editor-appearance/#menu
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by davenovo » 25 Apr 2018 22:44

I am sorry, but there must be a bug. I have entered the text as you describe (show below), and all that happens is that the entire top menu dissapears.

Capture.PNG


However, even if that worked, that only shows me how to customize the menu. I want to make the file menu not appear at all (but leave the other menu items as default). How can I do that?
You do not have the required permissions to view the files attached to this post.
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by Jorge Sousa » 25 Apr 2018 23:29

it would work if you put the allowed strings in items property

[url]https://www.tinymce.com/docs/advanced/editor-control-identifiers/#menucontrols
[/url]

However, even if that worked, that only shows me how to customize the menu. I want to make the file menu not appear at all (but leave the other menu items as default). How can I do that?


I told you before, my first reply

by Jorge Sousa » Tue, 24 Apr 2018, 12:32

TinyMCE.TinyMCEOptions.EditorAppearance.MenuBar


more info @
https://www.tinymce.com/docs/configure/editor-appearance/#menubar
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by davenovo » 26 Apr 2018 00:32

Sorry. I somehow read "Menu" when you said "Menubar". My fault.

However, can you please explain what I am doing wrong here. Note that I have set tmcembFile to false, yet is it still appearing in the IDE and at run time

Capture.PNG


In fact, it is a little confusing because the default for all the MenuBar items are False, even though by default all the Menu bar items appear in the editor.
You do not have the required permissions to view the files attached to this post.
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

Next

Return to CGTinyMCE

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.