Support » Fixing WordPress » How do I use a standard WP Form on an EditorButton?

  • Hi. I didn`t find a solution for this yet, so I hope you can help me.
    I want to put an extra Button to the tinyMCE Editor. This is not the problem. The Button is already there and works well. But I would like to make the use of the button easier.
    I have a Plugin named PDFEmbedder. Now every PDF which is set to a post through the media upload is shown with a pdf viewer. But sometimes we just want to add a downloadlink for a pdf. My Button opens a js promt and asks for the url of the pdf. Then you have to put it in manually and it appears in an html download link. It would be easier if we could use the wp media upload/media gallery. I already use it in some widgets I`ve written. Is it possible to open a little form like widgets does on a custom tinyMCE button? So that you can fill this form easily and the code behind creates a html link to the editor?

    EDIT: PS: In the widgets I use the media uploader if the button has a special class. In the js I ask where the event starts from $(this) and then I save the value of attachement.url of the media upload as string in another form field with type input which is a sibling of the button. But I have no fields to save the value at this tinyMCE button… So I think I need some form fields

    • This topic was modified 1 year, 6 months ago by Jenni1990.
    • This topic was modified 1 year, 6 months ago by Jenni1990.
Viewing 1 replies (of 1 total)
  • Hello there.

    I think this is easiest simplified with a plug-in that facilitates the download of PDF files?

    Can you give me more info and data about how you want to exactly do this?


Viewing 1 replies (of 1 total)
  • The topic ‘How do I use a standard WP Form on an EditorButton?’ is closed to new replies.