editor

  • This topic has 2 replies, 2 voices, and was last updated by Rin.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Rin
    Participant

    Hello,

    While editing a page with tooltips a new inserting a shortcode,the editor changes the sign ‘ to “. I did it several times and every time the sign was changed. A long search has come to an end!!!!

    Regards,
    Rin

    team
    Moderator

    Hi,

    Hope you are doing well and having happy days with your family 🙂

    Our developer have make a similar shortcode in classic editor like this in code editor:


    [tooltips keyword='test' content="" ]

    In front end, when mouse hover tooltip term test, it works well, we can see the image popup in tooltip window box 🙂

    After changed to visual editor, wordpress will change it as this format automatically:

    [tooltips keyword='test' content="" ]

    then in front end, when mouse hover tooltip term, it can not works.

    Just like we said: the only worked format is:

    [tooltips keyword='test' content="" ]

    Our developer tried our best to solve this problem for you, the problem of replace ‘ to ” is caused by the code of “classic editor”, it is not caused by wordpress tooltip plugin, we cannot change code of classic editor, so we want to find other methods to solve the problem, via wordpress standard API / hooks, we traced into wordpress core codes about shortcode to find a solution, we tried to develop a few functions to bypass the problem, for example, we tried to develop our own function shortcode_atts which in wordpress core code to load shortcodes…etc, but finally all functons cannot work. After traced into wordpress core codes, we found when we try to use wordpress standard shortcode function add_shortcode(), this function will give us a php atts array (that means array of keyword and content), if users use the error format [tooltips keyword='test' content="" ], the atts array looks like this:
    ————-
    array(4) {
    [“keyword”]=>
    string(4) “test”
    [0]=>
    string(0) “”
    [“src”]=>
    string(51) “http://127.0.0.1/wp-content/uploads/2022/10/new.png”
    [1]=>
    string(3) “/>””
    }
    ————-

    As you can see in here, the tag will be deleted by wordpress core function add_shortcode(), that means, once you use the error format, our plugin have not chance to get the content from wordpress official API at all, in the wordpress offial function add_shortcode, there are no any hooks like add_action or add_filter to allow developer to replace their output at all, that means we have no way to hook and add_shortcode API to correct this problem, we believe we cannot re-write wordpress core function in wordpress official codes, that is not safe and once you upgrade the wordpress, all works will lost, based on the same reason, we cannot change the code of classic editor too, the problem is caused by classic editor — they will change format automatically, in our side we have no way to control classic editor plugin from our plugin.

    Sorry for this, we have try our best to sovle this problem with very hard work days, the only solution is, when users edit the post, at the latest step in editor, change to code editor and replace the shortcode with the correct format again like this:
    —-
    [tooltips keyword='test' content="" ]
    —-

    Sorry we cannot solve this problem this time, the problem is not caused by our plugin, and we we have tried our best to solve it, in the current time, we cannot find a method to solve it for you.

    Have a blessed day with your family 🙂

    Best Regards,
    Support

    Rin
    Participant

    Hello, it’s me again,

    I cloud make it work now

    Regards,
    Rin

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.