fakruzaruret On second thought, there really is no need for this because as stated there are already extensions which do pretty close to what you’re describing. And, I just updated my bbbbcode extension so that the spoiler BBcode does not require a title now. If you don’t give the spoiler a title, it will now default to Read More being what you click on.
For example:
[spoiler]This is more text.[/spoiler]
Gives you:
Read More
Obviously not here, but in a forum with this extension, you’d click read more and see the rest of the post. But there would also be a down arrow to the left of Read More which you may not like but you can hide that and style this however you want with a little custom CSS.
Now, is [spoiler]the rest of your post[/spoiler]
as easy as what you may be thinking? Perhaps not. You may ideally be wanting a button in the editor. But, it’s still pretty easy.
Finally, you might not want to install bbbbcode because it may give your users more options than you would prefer to give them. If that’s the case, at some point, I could break the spoiler out into its own extension. But, there is already a lone spoiler extension if you search this forum. I’m not sure how that one works (exactly how it codes the spoiler).