How to implement placeholder text which only shows up in composer, not on site?

Posted in: Newspaper
Post count: 17

I’ve written a plugin which pulls a value from postmeta and renders is on a category page. I can drag it from the list of blocks into place, save it, and the plugin behaves as intended. However because the plugin has no content of it’s own, I’m not able to select it in tagDiv composer to make edits.

Does the tagDiv Block API have an option for “placeholder text” or something similar? Or is there a way to output the name of the plugin while in composer? For example, I could do a check in my code to say:


if ($editMode) {
    return 'My block';
} else {
    // do my code
}
Post count: 35449

Hi technologyadvicecom, I think that you can do that to use a check like the one above, or what you also can do, is something similar with text with title or column text elements -> https://i.imgur.com/fybd4eh.png
I hope this will help you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.