-
-
Save YannDecoopman/981169d01341e99569a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function update(CreateWebsiteRequest $request, $id) | |
{ | |
// | |
dd($request->input('pitch')); | |
$website = Website::findOrFail($id); | |
$website->name = $request->input('name'); | |
$website->url = $request->input('url'); | |
$website->country = $request->input('country'); | |
// D'habitude je récupère bien le pich ici si j'ai pa de WYSIWYG | |
$website->pitch = $request->input('pitch'); | |
[[BLABLA]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tr> | |
<td><label for="pitch">Pitch</label></td> | |
<td><div class="trumbowyg-box trumbowyg-editor-visible trumbowyg-en trumbowyg"> | |
<ul class="trumbowyg-button-pane"><li><button type="button" class="trumbowyg-viewHTML-button" title="View HTML" tabindex="-1">View HTML</button></li><li class="trumbowyg-separator"></li><li><button type="button" class="trumbowyg-formatting-button trumbowyg-open-dropdown" title="Formatting" tabindex="-1">Formatting</button></li><li class="trumbowyg-separator"></li> | |
<li><button type="button" class="trumbowyg-strong-button" title="Strong (Ctrl + B)" tabindex="-1">Strong</button></li><li><button type="button" class="trumbowyg-em-button" title="Emphasis (Ctrl + I)" tabindex="-1">Emphasis</button></li><li><button type="button" class="trumbowyg-del-button" title="Deleted" tabindex="-1">Deleted</button></li><li class="trumbowyg-separator"></li><li> | |
<button type="button" class="trumbowyg-link-button trumbowyg-open-dropdown" title="Link" tabindex="-1">Link</button></li><li class="trumbowyg-separator"></li><li><button type="button" class="trumbowyg-insertImage-button" title="Insert Image" tabindex="-1">Insert Image</button></li><li class="trumbowyg-separator"></li><li><button type="button" class="trumbowyg-justifyLeft-button" title="Align Left" tabindex="-1">Align Left</button> | |
</li><li><button type="button" class="trumbowyg-justifyCenter-button" title="Align Center" tabindex="-1">Align Center</button></li><li><button type="button" class="trumbowyg-justifyRight-button" title="Align Right" tabindex="-1">Align Right</button></li><li><button type="button" class="trumbowyg-justifyFull-button" title="Align Justify" tabindex="-1">Align Justify</button></li><li class="trumbowyg-separator"></li><li><button type="button" class="trumbowyg-unorderedList-button" title="Unordered list" tabindex="-1">Unordered list</button></li><li><button type="button" class="trumbowyg-orderedList-button" title="Ordered list" tabindex="-1">Ordered list</button></li><li class="trumbowyg-separator"></li><li><button type="button" class="trumbowyg-horizontalRule-button" title="Insert horizontal rule" tabindex="-1">Insert horizontal rule</button></li><li class="trumbowyg-separator"></li><li><button type="button" class="trumbowyg-removeformat-button" title="Remove format" tabindex="-1">Remove format</button></li><li class="trumbowyg-not-disable trumbowyg-buttons-right"><button type="button" class="trumbowyg-fullscreen-button" title="fullscreen" tabindex="-1">fullscreen</button></li></ul> | |
<div class="trumbowyg-editor trumbowyg-reset-css" contenteditable="true" dir="ltr" style="height: 220px;">J'écris dans le wysiwyg</div> | |
<textarea class="pitch trumbowyg-textarea" name="pitch" cols="50" rows="10" id="pitch" tabindex="-1" style="height: 220px;"></textarea> | |
<div class="formatting-trumbowyg-dropdown trumbowyg-dropdown trumbowyg-fixed-top" style="display: none;"><button type="button" class="trumbowyg-p-dropdown-button">Paragraph</button><button type="button" class="trumbowyg-blockquote-dropdown-button">Quote</button><button type="button" class="trumbowyg-h1-dropdown-button">Header 1</button><button type="button" class="trumbowyg-h2-dropdown-button">Header 2</button><button type="button" class="trumbowyg-h3-dropdown-button">Header 3</button><button type="button" class="trumbowyg-h4-dropdown-button">Header 4</button></div> | |
<div class="link-trumbowyg-dropdown trumbowyg-dropdown trumbowyg-fixed-top" style="display: none;"><button type="button" class="trumbowyg-createLink-dropdown-button" title=" (Ctrl + K)">Insert link</button><button type="button" class="trumbowyg-unlink-dropdown-button">Remove link</button></div><div class="trumbowyg-overlay" style="top: 37px; height: 301px;"></div></div></td> | |
</tr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!! Form::model($website, array('route' => array('websites.update', $website->id ), 'method' => 'PUT')) !!} | |
<tr> | |
<td>{!! Form::label('pitch', 'Pitch') !!}</td> | |
<td>{!! Form::textarea('pitch','',array('class' => 'pitch')) !!}</td> | |
</tr> | |
<tr> | |
<td>Update</td> | |
<td>{!! Form::submit('Update Website!', array('class' => 'btn btn-success')) !!}</td> | |
</tr> | |
{!! Form::close() !!} | |
<script type="text/javascript"> | |
$(function() | |
{ | |
$('#pitch').trumbowyg({ | |
resetCss: true | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment