Squire icon indicating copy to clipboard operation
Squire copied to clipboard

Inserted HTML <button> gets immediately removed

Open Patapom opened this issue 3 years ago • 4 comments

Hello, I tried to add some HTML within the editor div that contains a clickable <button onclick="doStuff()">Test</button>, I can see the button for a short time then it gets removed and replaced by a div instead. Is there a way to configure/prevent this behavior?

Patapom avatar Aug 13 '21 03:08 Patapom

Hello @Patapom how are you? so the way you wrote it is wrong, I think that must be the cause of the problem! Once you write the button function

<button onClick={ doStuff() }>Teste

for the function you called to work, it needs to be inside the {} and not "", understand? you can try this!

natamartins avatar Sep 06 '23 10:09 natamartins

Not sure you have the right address...


From: Natã Martins @.> Sent: Wednesday, September 6, 2023 10:12 AM To: fastmail/Squire @.> Cc: Patapom @.>; Mention @.> Subject: Re: [fastmail/Squire] Inserted HTML

Hello @Patapomhttps://github.com/Patapom how are you? so the way you wrote it is wrong, I think that must be the cause of the problem! Once you write the button function

<button onClick={ doStuff() }>Teste

for the function you called to work, it needs to be inside the {} and not "", understand? you can try this!

— Reply to this email directly, view it on GitHubhttps://github.com/fastmail/Squire/issues/415#issuecomment-1708056919, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANOTVXOXSLLXMZDRWG5GVLXZBD7DANCNFSM5CCXKA3Q. You are receiving this because you were mentioned.Message ID: @.***>

Patapom avatar Sep 07 '23 05:09 Patapom

https://github.com/fastmail/Squire#readme

Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation in a flexible lightweight package (only 16KB of JS after minification and gzip, with no dependencies!).

It was designed to handle email composition for the Fastmail web app.

Does email handle forms (input, select, textarea, button)?

the-djmaze avatar Dec 06 '23 23:12 the-djmaze