• Resolved swcomm

    (@swcomm)


    Hi – I’m trying to use your plugin to insert an iframe in a custom field that uses the visual editor. Your button is there, but clicking it does nothing. Manually inserting your iframe shortcode in the field does work and saves, but using the button generated code is kind of the point for my project. Custom fields are generated by ACF, using WP 5.7. Am I missing something? Thanks in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author mdempfle

    (@mdempfle)

    The plugin uses the default way for such a button: It use the send_to_editor method from wordpress.
    I works with the default editor. I have no idea what you mean with custom fields. Is there a visual editor then included?
    Most likely wordpress simply does not find you editor.

    Do you see any Javascript errors in the console?

    Best regards,
    Michael

    Thread Starter swcomm

    (@swcomm)

    I have a custom post type with a number of custom fields, and some of them are wysiwyg fields that include the whole visual editor toolbar from Advanced Editor/TinyMCE, and we’re using the Classic editor, not the Block editor. I use Advanced Custom Fields to create these custom fields:
    ACF WYSIWYG Editor

    Advanced Iframe works fine in the post edit area of the custom post type. The Advanced Iframe button is available in the visual editor toolbar for those custom wysiwyg fields, but clicking the button does nothing.

    There are some jqmigrate errors, but I see them on the post edit field as well, so I don’t think that’s the problem.

    Thanks for any help.

    Plugin Author mdempfle

    (@mdempfle)

    Hi,

    Not sure I can help here. I assume the custom editors do not work together with the WordPress function send_to_editor which is used. Showing a button is different to then inserting this. I think WordPress is maybe looking for a specific id which is predefined for the normal editor. Do you have other buttons on top which inserts something directly? So they maybe have a workaround I can take a look at. I have only “Add Media” which is opening a popup. So this is a different scenario.

    So what you can do is to remove the button. Go to the Administration -> Options -> Display options -> Editor button -> make this field empty and save.

    Best regards, Michael

    Thread Starter swcomm

    (@swcomm)

    I do have other toolbar buttons from plugins that insert shortcodes on those fields and they work as intended – FooGallery and Embed Any Document. The default Add Media button is there as well, and that works fine. I did try disabling both of those plugins to see if they were creating the conflict with Advanced Iframe, but that doesn’t appear to be the issue either. So any help would be great.

    thanks again –

    Plugin Author mdempfle

    (@mdempfle)

    Hi, I checked both plugins and they insert the code in a different way than I do. The use it also slightly differently but I have extracted the soltuion for me which seems to work for the most.

    Can you send me a e-mail so I can send you a version you can test?

    https://www.tinywebgallery.com/en/about.php

    Best regards,
    Michael

    Plugin Author mdempfle

    (@mdempfle)

    My main concern is if the text is inserted to the right editor. I cannot test this…

    Thread Starter swcomm

    (@swcomm)

    Just sent you an email. Sorry for the delay – took some time off for the holiday.

    Plugin Author mdempfle

    (@mdempfle)

    Solved

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom Field WYSIWYG Field’ is closed to new replies.