Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How-to questions and documentation #30

Open
JiveDig opened this issue Mar 21, 2022 · 4 comments
Open

How-to questions and documentation #30

JiveDig opened this issue Mar 21, 2022 · 4 comments
Assignees

Comments

@JiveDig
Copy link

JiveDig commented Mar 21, 2022

I've been lurking/following this class for a while and gave it a try today. Thanks for sharing! It's pretty straightforward and cool but I'm wondering if there is any official documentation that I missed? I've just been digging through the code and the examples.

My biggest concern is over a block preview in the editor. Is it not currently setup to have a preview? I'm wonder if thing widget_ops output argument can take a callback/function so we can return the actual block content in the editor as well?

@pol76
Copy link
Contributor

pol76 commented Mar 28, 2022

Hi Jivedig, sorry for missing your request, I've asked the developers to follow up.
Thanks for your patience,

@Stiofan
Copy link
Contributor

Stiofan commented Mar 29, 2022

Hi @JiveDig,

Do you mean the hover preview or the actual output when editing a block?

This class was originally built only for our internal use and as such we just used code comments inside the class instead of documentation.

If we are talking hover preview then that was not an option when we originally built this class and when I last looked into it there was a bug where if previewed it would then not render initially when added. However if this is what you mean then I can check this again.

If you mean the edit block preview then this can be output in a few ways, usually this will just work out the box but if you need to check if you are in a editor preview then you can use $this->is_preview() and output something different .

Thanks,

Stiofan

@JiveDig
Copy link
Author

JiveDig commented Mar 29, 2022

Hmmm, I don't think I'm looking for either. In the editor I see my block settings but I do not see any of my output/HTML. I don't need anything different in editor vs front end, I was just wondering why I didn't see any of the actual block output.

@Stiofan
Copy link
Contributor

Stiofan commented Apr 1, 2022

You should, are you returning the content in the output() function or echoing it?
You can install this whole repo as a plugin and activate it, you can test the hello world example.

kprajapatii added a commit that referenced this issue Nov 24, 2022
Missing changes from past push
kprajapatii added a commit that referenced this issue Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants