2013-08-19 34 views

Odpowiedz

3

Można to zrobić poprzez CSS

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

można wyłączyć opcji paska narzędzi za pomocą parametrów startowych:

$('#[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 
}); 

Ta informacja powinna być wklejona w tagu:

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

Jeśli używasz bootstrap-wysiwyg/bootstrap3-wysiwyg (który jest na przykład używany przez klejnot bootstrap-wysihtml5-rails), s Ince wersji 3.0, trzeba będzie gniazdo go wewnątrz paska:

$('#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

to jest odpowiedź ....... wiele dzięki – GhostRider

+0

który pracował dla mnie zbyt .. dzięki –

Powiązane problemy