I am using tinymce editor, and have an edit menubar item, which I would like to move into toolbar, I have tried with just adding it to toolbar, but that doesn't work obviously:
tinymce.init({
selector: '#content',
paste_data_images: true,
menubar: 'edit',
statusbar: false,
height: 500,
theme: 'modern',
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime media nonbreaking save table contextmenu directionality',
'emoticons template paste textcolor colorpicker textpattern imagetools'
],
toolbar1: 'bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | paste',
As you correctly state menus and toolbars are different so you cannot just throw a menu option (edit) in a toolbar - that will not work.
The Edit menu contains several options:
Undo, Redo, Cut, Copy, Paste, etc...
Look through the TinyMCE documentation for toolbar control identifiers and you will find that most (if not all) of the commands have a toolbar equivalent:
https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
You need to add these control identifiers to the toolbar in TinyMCE.
Related
At the bottom of the text editor in Visual Studio, there's a bar with "resize" and issues. I keep hitting this bar by accident and resizing my window, or invoking a menu that says "show the error list" (which I always have shown anyway". Since this bar is of no use to me, does anyone know a way that I can completely hide it and save myself these annoyances?
/edit: it's this bar here:
Uncheck the 'Show file health indicator' box under Options -> Text Editor -> General -> Display
Options screenshot:
Try on Tools -> Options -> Text Editor -> All Languages -> Scroll Bars, and uncheck the "Show horizontal scrollbar" (the first option on the image):
It does not hide everything on the scrollbar, but it might help!
I know that on instantiation of a Quill editor, there is a toolbar visibility option. Is there a way that I can change this toolbar visibility dynamically after the editor is instantiated?
options = {
debug: 'info',
placeholder: "Place your content here",
readOnly: false,
theme: 'snow',
modules: {
toolbar: toolbarOptions --> i want to change this property as false at runtime
},
};
To clarify the option is not just visibility, it's whether to create a toolbar at all or not. A toolbar cannot be added or removed after the editor is initialized. If you just want to control visibility, one option is just to use CSS to show/hide the toolbar.
Hello you can use display: none/block too it's working. It will create or delete the element. Show/hide is a bit different i let you find why.
you can access the tooltip hide/show function like this:
quill.theme.tooltip.hide() or quill.theme.tooltip.show()
I am building an application where i used tinymce-rails gem.It's a nice text editor i am dealing with.But i am not able to set text's font size.Please help me out.
I have the below code in my tinymce.yml file:
default:
plugins:
- image
- link
alternate:
selector: textarea.table-editor
toolbar: styleselect | bold italic | undo redo | table
plugins:
- table
Add this in your tinymce.yml and try,
setup : function(ed)
{
ed.on('init', function()
{
this.getDoc().body.style.fontSize = '50px';
});
}
And change your font size according to your need and it works in tinymca 4.
I'd like to make the entire cell in a MediaWiki table clickable, and not just the text inside it. I start off with this, for example:
{| style="width:400px;background-color:yellow;"
|-
|[[Article1|Tree]]||style="background-color:green"|[[Article2|Hat]]||[[Article3|Shoe]]
|-
|}
And, as expected, only the text is clickable. Can I rejig something to make it work?
You can make the link fill upp the whole cell using CSS. Unless you turned that functionality off, use MediaWiki:Common.css to add your CSS:
td.clickablecell a {
display:block;
width:100%;
}
and then add the class to your cell:
{|
|-
| [[Article1|Tree]]
| class="clickablecell" | [[Article2|Hat]]
| [[Article3|Shoe]]
|}
I'm using Jquery Ui to make a dialog using the following options:
$("#locations-dialog").dialog({
autoOpen: false,
title: '<input type="text" id="location-name" value="New Location">',
draggable: false,
modal: false,
closeOnEscape: true,
width: 660,
height: 515,
});
As it is visible I'm using an input field as a title.
The issue I'm having is that when I click on top of it nothing happens meaning I can't edit the text.
Don't know if I'm doing anything wrong...but in the jquery ui says:
Any valid HTML may be set as the title
As others have said, that's because the dialog widget disables selection for all the elements in its title bar, even if the draggable option is set to false.
You can add the text box to the title bar after the dialog widget is created, as the answer to the duplicate question suggests, or you can call enableSelection() to re-enable selection on the title bar elements:
$("#locations-dialog").dialog("widget")
.find(".ui-dialog-titlebar")
.find("*").andSelf()
.enableSelection();
The binding of the dialog box is what is causing issue. See this URL for full explanation and a work around example.
jQuery UI Dialog - Input textbox in the titlebar is disabled?