humhub / humhub-prosemirror

Other
17 stars 8 forks source link

WIP: Enhance function "collapsible section" by including summary tag #71

Closed schlagmichdoch closed 1 year ago

schlagmichdoch commented 2 years ago

See #67 for introduction and goal. See #69 for pull request that includes:

Goal of this pr is to enhance this function by a editable summary tag.

schlagmichdoch commented 2 years ago

When adding the summary tag, we need further styling in order to have the summary tag shown correctly. I got it working:

  1. Edit humhub/static/less/markdown.less and add the following lines below the blockquote styling (line 94):
    details {
        display: block;
    }

    details summary {
        cursor: pointer;
    }

    summary {
        display: list-item;
    }

    summary p {
        display: inline;
    }
  1. Run grunt built-theme

    As this requires to edit files in humhub/humhub repo and not this one, I don't think I can include it in this pr.

Is there another way of adding styles to the editor?

Adding the style to humhub-prosemirror/css/style.css or humhub-prosemirror/less/built.less and running grunt rollup afterwords, does not do the trick.

luke- commented 2 years ago

@schlagmichdoch thanks, we'll review this PR soon. Currently there are two PRs from you here in the repo? Can you close one of them?

schlagmichdoch commented 2 years ago

@luke- Thanks for the reply. Pull request #69 adds the functionality without editing the summary tag and is ready to be merged. Please review that one.

This pull request #71 is a work in progress and currently not ready to be merged. The goal is to include a editable summary tag („▶️click me“ instead of „▶️Details”).

As I don’t know how to handle nested nodes, in a schema, I need further assistance. It would be really helpful, if #72 was working.

Should I move this to an issue until it’s ready to be merged or is adding „WIP:“ to the title sufficient?