iink SDK Web

Answered

editor.theme is not a function

 Hi,

I have the MyScript editor working great, but I wanted to change the theme. When I try to reference the theme, I get the error that theme is not a function. Below is a snippet of my code.


  useEffect(() => {
    let editor = editorRef.current;
    editor = iink.register(editorRef.current, {
      recognitionParams: {
        type: 'MATH',
        protocol: 'WEBSOCKET',
        apiVersion: 'V4',
        server: {
            scheme: 'https',
            host: 'webdemoapi.myscript.com',
        }
      }
    });
    editor.theme("stroke { color: #0000FFFF; }");
},[])



Best Answer

Hi,


You should go into your Cloud dashboard


There in the Applications panel, you can revoke the key that you posted by accident by clicking on the "Revoke" button on the right side of the key line.

Afterthat you can generate a new key from the "Generate application key" in the same panel.



Best regards,


Gwenaëlle



Dear Winston,


Thank you for contacting us. In order to customize style, we recommand you taking a look at this example:

The corresponding source code is available here:

https://github.com/MyScript/iinkJS/blob/master/examples/v4/customize_style.html


Best regards,


Gwenaëlle

How do I change my application key? I posted it by accident.

Answer

Hi,


You should go into your Cloud dashboard


There in the Applications panel, you can revoke the key that you posted by accident by clicking on the "Revoke" button on the right side of the key line.

Afterthat you can generate a new key from the "Generate application key" in the same panel.



Best regards,


Gwenaëlle