WordPress.org

Support

Support » Alpha/Beta » [Resolved] How to edit gallery in HTML/Text editor?

[Resolved] How to edit gallery in HTML/Text editor?

  • Is there a way to edit an existing gallery from the html editor? I see how it works in the visual editor, but I don’t see a way to edit in the html editor.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Click on Add Media again. You get dumped into “Edit Gallery” with a link below to “Add to Gallery” 🙂

    It works until you click Publish, then it no longer presents the edit options. That’s why I didn’t see it before. The Visual editor works after publishing, but not the HTML editor.

    Moderator Andrew Nacin

    @nacin

    Lead Developer

    We were going to do a thing where, if your cursor was inside a [gallery] shortcode, we would open up the “Edit Gallery” window if you clicked “Add Media”. It’s a bit weird, though.

    Once a post is published or saved as a draft, placing the cursor inside the shortcode and clicking “Add Media” does not open the “Edit Gallery” window.

    Moderator Andrew Nacin

    @nacin

    Lead Developer

    To be more clear: We were going to do it for 3.5, but didn’t. Probably a good enhancement for 3.6.

    If you are going to use the text editor, you can still enter [gallery] manually and go to the “Uploaded to this post” view and sort those. (It’ll remember the order.)

    I would love a way to edit the gallery captions / add images one the page has been published from the HTML editor. Even putting your cursor inside the gallery shortcode and clicking the media button would be fine.

    <script language=”javascript”>
    function CheckForm()
    {
    document.form1.content.value=document.form1.doc_html.value;
    }
    </script>
    <form method=”post” action=”add_news_save.asp” onsubmit=”CheckForm()” name=”form1″>
    <object id=doc_html name= doc_html style=”LEFT: 0px; TOP: 0px” data=” gledit.htm” width=530 height=320 type=text/x-scriptlet VIEWASTEXT></object>
    <input type=”hidden” name=”content” >
    </form>

    I have the exact same requirement. We need to edit galleries from text editor. Using the suggestion that Andrew made doesn’t work for editing an existing gallery.

    How can we provide a workaround to edit galleries from text mode?

    I’m trying to add new menu items for each gallery to the Insert Media modal, but it’s complicated since we need to grab each instance of the gallery shortcode (since there can be multiple galleries on a post), and then provide a link to the Edit Gallery modal.

    I know how to add a link to the Insert Media modal, but I’m not sure 1) how to set up a link for each gallery dynamically and 2) once that link is on the Insert Media menu item toolbar, how to open the Edit Gallery modal by passing the correct gallery ids.

    Thanks for any help anyone can provide!

    esmi

    @esmi

    Forum Moderator

    As per the Forum Welcome, please post your own topic. This topic references a much older version of WordPress.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] How to edit gallery in HTML/Text editor?’ is closed to new replies.