WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] How to edit gallery in HTML/Text editor? (10 posts)

  1. mindctrl
    Member
    Posted 1 year ago #

    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.

  2. Click on Add Media again. You get dumped into "Edit Gallery" with a link below to "Add to Gallery" :)

  3. mindctrl
    Member
    Posted 1 year ago #

    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.

  4. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    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.

  5. mindctrl
    Member
    Posted 1 year ago #

    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.

  6. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    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.)

  7. Lonnie
    Member
    Posted 1 year ago #

    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.

  8. winner001
    Member
    Posted 1 year ago #

    <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>

  9. kvignos
    Member
    Posted 8 months ago #

    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!

  10. esmi
    Forum Moderator
    Posted 8 months ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags