jeudi 3 septembre 2015

Laravel 5 Markdown Editor not stripping markdown characters and not displaying the styles

I'm using this package: http://ift.tt/1c3XTF2

On create article, the editor shows and it displays correctly. When I submit it, the text gets submitted into the database like this **this is a bold text** and also displays the same way on the view.

The index() method

public function index()
    {

        $articles = Article::latest('published_at')->published()->get();

        $art = Article::findOrFail(64);

        //dd($art->body);

        return view('blog/index', ['body' => EndaEditor::MarkDecode($art->body)])->with('articles', $articles);
    }

Here I am trying to test it on an article with ID 64 which I just submitted with markdown editor.

And this is the form

@include('editor::head')

        <div class="editor">
            <p>
                {!! Form::label('body', 'Body:') !!}
                {!! Form::textarea('body', null, ['class' => 'form-control', 'id' => 'myEditor']) !!}
            </p>
        </div>

What am I doing wrong here?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1VAsegw
via IFTTT

Aucun commentaire:

Enregistrer un commentaire