Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to parse Images with relative path #4

Open
icaroscherma opened this issue Mar 21, 2016 · 1 comment
Open

Ability to parse Images with relative path #4

icaroscherma opened this issue Mar 21, 2016 · 1 comment

Comments

@icaroscherma
Copy link

It would be awesome to parse images like the Cake's Html Helper...

Like:
![alt_title](/tests/image01.png)

and be linked to:
APP_URL/img/tests/image01.png.

@icaroscherma
Copy link
Author

An "workaround" that I found is to use the Cake's Text Helper, and inside your MarkDown you use :IMGURL and replace it to your img url... like:

<?=
    $this->CommonMark->convertToHtml(
        $this->Text->insert(
            $doc->content,
            [
                'IMGURL' => $this->Url->build('/', true) . \Cake\Core\Configure::read('App.imageBaseUrl')
            ]
        )
    )
?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants