ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Icon Fieldtype Augmentation (SVG Tag Support)

Open jnbn opened this issue 11 months ago • 1 comments

I think many users may need or expect icon field type to act like an SVG tag by default. Or may need to use the path of the file in an svg tag.

But as the current augmentation returns the SVG file contents directly it's not possible to use extra classes etc with the required stylings on the front end.

public function augment($value)
    {
        [$path] = $this->resolveParts();
        // return ($path.'/'.$value.'.svg');

        return File::get($path.'/'.$value.'.svg');
    }

jnbn avatar Feb 05 '25 02:02 jnbn