Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needed additional props #32

Open
airled opened this issue Mar 2, 2020 · 2 comments
Open

Needed additional props #32

airled opened this issue Mar 2, 2020 · 2 comments

Comments

@airled
Copy link

airled commented Mar 2, 2020

Hi there. I saw this issue #28. It is also needed to have possibility to pass locales (trix uses locales like this) and hide buttons via props.

@dstpierre
Copy link
Collaborator

I'll try to check this for the next release, I just published v0.7.0.

If someone want to tackle this one I'll be happy to review and publish an update.

@dstpierre
Copy link
Collaborator

Hey @airled I'm updating react-trix for the version 1.3.1 of Trix and I was looking at your issue regarding locale. Would the onEditorReady event which pass a reference the Trix's editor could be a good workaround, for instance:

export class Test extends React.Component {
  handleEditorReady(editor) {
    // can the locale be set directly in the editor here?
    // do editing programatically
    editor.insertString("editor is ready");
  }
  render() {
    return (
      <TrixEditor onEditorReady={this.handleEditorReady} />
    );
  }
}

I haven't investigate that much, it's just a quick work around idea.

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

No branches or pull requests

2 participants