Skip to content

Conversation

n-studio
Copy link

The tag now accepts a hash of classes to customize each component.
Each component also has a new class ms--<name-of-the-component> for easy styling.

<%= marksmith_tag :body,
  disabled: true,
  placeholder: "Write your best markdown here.",
  extra_preview_params: { foo: "bar" },
  enable_file_uploads: true,
  upload_url: nil,
  classes: {
    textarea: "bg-red-500",
    editor_pane: "bg-blue-500",
    preview_pane: "bg-green-500",
    action_bar: "bg-yellow-500",
  }
  %>

The classes attribute is still retrocompatible if provided a String instead of a Hash, so this shouldn't be a breaking change.

For technical limitations, the rendered body cannot receive custom classes. Styling must be done through ms--rendered-body.

@adrianthedev
Copy link
Contributor

I just merged #74.

I think this is a CSS issue and could be fixed with CSS and the semantic classes should help with that.

Would that PR fix the issues you're encountering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants