[Sugar-devel] Preview field in web activities

Suraj K S suraj.gillespie at gmail.com
Mon Sep 9 09:52:12 EDT 2013


canvas.toDataURL() throws the Security Exception in both paint-web and
markdown activities.

I tried it on an earlier an activity which i made some time back,
https://github.com/surajgillespie/myactivity
In this case it works fine.
I'm able to get the image in a base 64 encoded string.




On 9 September 2013 18:21, Daniel Narvaez <dwnarvaez at gmail.com> wrote:

> Did you try with a very simple page, just some text for example. From one
> ticket on their github it seems like it could depend on the content and
> there might be issues with svg.
>
>
> On 9 September 2013 14:49, Suraj K S <suraj.gillespie at gmail.com> wrote:
>
>> @Daniel, yes, I did download it locally.
>>
>> @Manuel, canvas.toDataURL() isn't generating any trouble in your
>> activity.
>>
>> Regarding the performance, it can match the quality of the preview image
>> in python, if not better. Tested it for many pages, seems to render the
>> preview image well enough.
>>
>>
>>> Assuming we can get it to work, even if it's not great we could keep the
>>> JS implementation as a fallback for platforms that don't have a native
>>> implementation.
>>>
>>
>> And yeah, I'll try getting this working asap.
>>
>
>
>
> --
> Daniel Narvaez
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130909/d891df66/attachment.html>


More information about the Sugar-devel mailing list