-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Move creation API to the editor directly #1242
Conversation
plugins/balloontoolbar/plugin.js
Outdated
* Set of instance-specific public APIs exposed by the [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin. | ||
* Balloon Toolbar manager for a given editor instance. It ensures that there's only one toolbar visible at a time. | ||
* | ||
* It is the simplest way to create a Balloon Toolbar. It uses {@link CKEDITOR.plugins.balloontoolbar.contextManager#create} underneath. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line could be simplified something like:
- Use {@link CKEDITOR.plugins.balloontoolbar.contextManager#create} method to register a new toolbar context.
plugins/balloontoolbar/plugin.js
Outdated
@@ -376,6 +376,21 @@ | |||
} | |||
|
|||
ContextManager.prototype = { | |||
|
|||
/** | |||
* Creates {@link CKEDITOR.plugins.balloontoolbar.context} from the given options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should repeat returned type explicitly here. It's enough it's in the @returns
tag.
Let's just make it something like "Creates a toolbar context", so that we reduce change that future maintainer will change return value in one place, and not the other.
It would be also nice to add the information that this method (as opposed to add method) creates, adds and returns the context.
I would also love to see a short code listing here (yea I know that one was in the editor.balloonToolbars
property, but I think it won't do harm).
Just a couple of minor doc details. Proposed my changes in #1245. |
Merged changes and rebased on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Move creation API to the editor directly
What is the purpose of this pull request?
Task: API refactoring
Does your PR contain necessary tests?
All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.
This PR contains
What changes did you make?
Closes #1237.