2013-08-19 35 views

risposta

3

È possibile farlo attraverso i CSS

ul.wysihtml5-toolbar li a[title="Insert image"] { display: none; } 
ul.wysihtml5-toolbar li.dropdown { display: none; } 
12

È possibile disattivare le opzioni della barra degli strumenti utilizzando parametri di avvio:

$('#[YOUR INPUT ID]').wysihtml5({ 
    "font-styles": false, //Font styling, e.g. h1, h2, etc. 
    "emphasis": true, //Italics, bold, etc. 
    "lists": true, //(Un)ordered lists, e.g. Bullets, Numbers. 
    "html": true, //Button which allows you to edit the generated HTML. 
    "link": true, //Button to insert a link. 
    "image": false, //Button to insert an image. 
    "color": true //Button to change color of font 
}); 

Questa informazione deve essere incollato nel tag:

<head> 
    <script> HERE </scrip> 
</head> 
13

Se ti capita di usare(che è ad esempio utilizzato dalla gemma bootstrap-wysihtml5-rails), s ince versione 3.0, è necessario nido all'interno della barra degli strumenti:

$('#some-textarea').wysihtml5({ 
    toolbar: { 
    "font-styles": true, // Font styling, e.g. h1, h2, etc. 
    "emphasis": true, // Italics, bold, etc. 
    "lists": true, // (Un)ordered lists, e.g. Bullets, Numbers. 
    "html": false, // Button which allows you to edit the generated HTML. 
    "link": true, // Button to insert a link. 
    "image": true, // Button to insert an image. 
    "color": false, // Button to change color of font 
    "blockquote": true, // Blockquote 
    "size": <buttonsize> // options are xs, sm, lg 
    } 
}); 
+0

Questa è la risposta ....... molte grazie – GhostRider

+0

che ha lavorato anche per me .. grazie –

Problemi correlati