• Hello, thanks for creating this plugin, it’s really useful for our sites.

    Is there a way to implement my own HTML to every shortcode pasted into the editor? For instance, say that I want EVERY shortcode to be pasted like this:

    <span class="something">[xyz-ihs snippet="snippetname"]</span>

    I realise this seems like an odd request, but the reason why we need to do this is because all divs in the content have a span assigned to them with some styling (styled in editor-style.css only of course), so our colleagues doesn’t accidentally delete any important divs.

    Up until now I’ve just made sure to go into the source and use something like find and replace to quickly put spans around all shortcodes, but this isn’t optimal if people without any coding knowledge want to paste in the divs.

    https://wordpress.org/plugins/insert-html-snippet/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Imagef1logic

    (@f1logic)

    we will analyze this and add this to todo list if you think it is useful

    Thread Starter Imageas_dancover

    (@as_dancover)

    Hey, thanks for replying. That’s good, but isn’t there a way for me to manually edit the plugin? Where is it defined what to paste into TinyMCE? Couldn’t I simply add a few lines of code so that it not only paste in the shortcode, but also <span></span> around it as well?

    Plugin Author Imagef1logic

    (@f1logic)

    you can do that in editor_plugin.js.php line no 70

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding own HTML to shortcodes’ is closed to new replies.