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

Composer formatting options should no longer be hardcoded in core #2743

Closed
3 tasks done
julianlam opened this issue Feb 19, 2015 · 6 comments
Closed
3 tasks done

Composer formatting options should no longer be hardcoded in core #2743

julianlam opened this issue Feb 19, 2015 · 6 comments
Assignees
Milestone

Comments

@julianlam
Copy link
Member

We hard-code bold, italic, etc in core, but the real awkward part is that the parser is a plugin, meaning if you swapped out Markdown for something else (like BBCode), you would still get the old formatting options inputting markdown into the composer instead of [b], etc.

Oops.

Additionally, several other plugins attempt to modify the toolbar, but because of this hardcoding, plugins are resorting to tactics like appending to the end, which is good, but not powerful enough.

  • Add a filter for plugins to add their own formatting options
  • Update Markdown plugin to utilise this method
  • Remove hardcoded formatting options from core
@julianlam julianlam self-assigned this Feb 19, 2015
@julianlam julianlam added this to the 0.7.0 milestone Feb 19, 2015
julianlam added a commit to NodeBB/nodebb-plugin-markdown that referenced this issue Feb 19, 2015
@MegaGM
Copy link
Contributor

MegaGM commented Feb 19, 2015

I guess this discussion is related #2654

@julianlam
Copy link
Member Author

Yep, sure is. I incorporated most of the changes outlined in that issue, so we can build off of the changes introduced here.

@julianlam
Copy link
Member Author

@psychobunny @TedRinehart @a5mith I believe you all append buttons to the toolbar in some way?

You can see how Markdown does it here

@MegaGM
Copy link
Contributor

MegaGM commented Feb 19, 2015

Thank you! These changes were necessary, definitely.
Next step will be using composer in plugins :3 I've planned it for nodebb-plugin-mega-chatbox

@julianlam
Copy link
Member Author

Please let us know if you run into any awkward issues with the composer when integrating with another plugin.

For example, the composer itself should be a distinct entity from other parts of NodeBB, so if you catch it doing weird things like posting new topics, etc, let us know.

@MegaGM
Copy link
Contributor

MegaGM commented Feb 19, 2015

so if you catch it doing weird things like posting new topics, etc, let us know.

@julianlam Of course 👍

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