• Resolved batcoderstech

    (@batcoderstech)


    I cannot see the Custom JS Variable button in TinyMCE editor. Can you please guide me as to how can that be fixed ?

    Also if this popup is connected to 5 buttons with the same class but different attributes, if I use (this).attr(‘attribute-name’) can I use something like this to pull the attribute value I want to use in the popup ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Dear @batcoderstech ,

    Thanks for the message!

    Could you please try to include the following shortcode [pbvariable selector=“#element-selector” attribute=“value”] inside the popup which will include the “value” of the ‘#element-selector’ html element?

    Please, let us know if that helped.

    Thread Starter batcoderstech

    (@batcoderstech)

    Thanks for your reply. I am able to get the value from an html selector.

    I just have one query – If I have 5 buttons with Same Class and different attribute called ex. “city” and I want that if someone clicks on the buttons, the popup has the city attribute respect to the button.

    If I try the following shortcode –

    [pbvariable selector=”.prop-arc-anchor” attribute=”data-city”]

    Now clicking on all the buttons gives the same value for City. Is there any way to implement it ?

    with jQuery it is very easy as –
    $(“.prop-arc-anchor”).onclick(){$(this).attr(“data-city”)}

    Hello @batcoderstech,

    I’m sorry but in this case, you will need to give a different class for each button to be able to get the correct city name.
    We will consider your case and I hope we can include $(this) inside the function which is responsible for populating the popup content from the outside element.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No Custom JS Variable option in TinyMCE Editor’ is closed to new replies.