[pmwiki-users] How to embed SVG as editable text

Petko Yotov 5ko at 5ko.fr
Wed Aug 16 11:41:16 CDT 2017

You should have, either in local/config.php, or in some cookbook/*.php 
file a line or a block like this:

   Markup(   or  Markup_e(
     'svgedit', or something like this
     '/\\{\\*(.*?)\\*\\}/', or something like this
    'Keep(PSS("$1"))' or "FmtSVGEdit()" or something like this.

The third expression is what should tip you, '/\\{\\*(.*?)\\*\\}/', or 
something like this (it can be written in multiple ways).

If you find such a line, we may be able to rewrite it for PHP 7.

Do you edit actual SVG code directly in the wiki source page, eg

   {*<svg xmlns="..."><path d="m56 56l-52-52"/></svg>*}



PmWeekly Blog  :  http://www.pmwiki.org/News
If you upgrade :  http://www.pmwiki.org/Upgrades

On 2017-08-16 18:03, Lars Eighner wrote:
> I used to have something in {* *} tags that let me edit SVG in a page
> so it would render as an image when saved. I am old now and cannot
> remember how I did it, but the code is not php 7 safe.
> I am not trying to edit svg's uploaded as images, just stuff entered
> as text in the edit page.
> I think this is a one or two liner for someone who understands
> callback, which isn't me anymore.

More information about the pmwiki-users mailing list