Forum

Thread tagged as: Question

Named Anchors in Mark It Down

I can't seem to create working links to named anchors on the same page using the Mark It Down editor.

I'm using this to do the link:

* [Link](#link)

but nothing I try seems to add the named anchor needed, instead rendering the code out in the browser.

Here's my diagnostic report:

Perch: 3.0.11, PHP: 5.4.45, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.11), assets (3.0.11), categories (3.0.11)
App runtimes: <?php $apps_list = [ ];
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/jonnytme/public_html/windsorgynaecology.co.uk/perch
PERCH_CORE: /home/jonnytme/public_html/windsorgynaecology.co.uk/perch/core
PERCH_RESFILEPATH: /home/jonnytme/public_html/windsorgynaecology.co.uk/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 32M, Max POST 48M, Memory: 64M, Total max file upload: 32M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /home/jonnytme/public_html/windsorgynaecology.co.uk
HTTP_HOST: windsorgynaecology.co.uk
Jon Tarbuck

Jon Tarbuck 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show us your template tag?

<perch:content id="text" type="textarea" label="Text" markdown="true" editor="simplemde" imagewidth="640" imageheight="480" />

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so you're using SimpleMDE, not MarkItUp as your editor.

The example you've given looks like correct markdown syntax. What problem are you seeing?

My named anchor, <a id=”test”></a>test, is being rendered with tags - i.e. just as I have written it here.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you want to allow direct HTML input you need to set html="true" on the template tag.

Ah, thanks Drew, that's done it. :-)