-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
Hi @idleb! Thanks for the PR. Could you tell us:
We usually start by creating issues, so we can deeply discuss use cases for every feature and code change in our codebase. Note, that CKE4 and CKE5 are different editors, they have a little bit different usage and their features don't match 1-1. In the past, we considered
|
Hi @ma2ciek ,I just saw that about First, I am migrating from CKEditor4, and latest editor used this features for mathematical equation. because our product usually was used by teachers in school, e.g. print test paper. So we need these styles. I think use |
I don't see it a problem that Editor Recommendations don't consider sub/sup as semantic enough. ER didn't mean to define the set of features that we can never exceed. It was meant to define a basic set of "Article" oriented features. We already extended that set because there are other use cases than creating articles in CKEditor 5. BTW, even in this package we have underline and code (and they are not covered by ER). We can easily have sub/sup too. So, I'd really like to see a progress with sub/sup. @idleb, if you could reopen the PR, that'd be cool. It adds a very basic sub/sup functionality and that's ok for now. But, I agree with @ma2ciek on one thing – we need to discuss how this feature should be provided. There are things like... can text be in |
@Reinmar ,I am glad you asked me to reopen the PR, this feature is very basic. I don't consider about text is in and at the same time, which one is outside depend on how user typesetting. |
OK, I reported the ticket about the behaviour of this feature: https://github.com/ckeditor/ckeditor5-basic-styles/issues/75 |
src/subscript/subscriptui.js
Outdated
const t = editor.t; | ||
|
||
// Add subscript button to feature components. | ||
editor.ui.componentFactory.add( SUB, locale => { |
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.
The UI item should be named subscript
, not sub
.
src/subscript/subscriptediting.js
Outdated
} ); | ||
|
||
// Create sub command. | ||
editor.commands.add( SUB, new AttributeCommand( editor, SUB ) ); |
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.
The subscript command should be named subscript
, not sub
.
} ); | ||
|
||
// Create super command. | ||
editor.commands.add( SUPER, new AttributeCommand( editor, SUPER ) ); |
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.
Same as above
src/superscript/superscriptui.js
Outdated
view.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' ); | ||
|
||
// Execute command. | ||
this.listenTo( view, 'execute', () => editor.execute( SUPER ) ); |
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.
Same as above
Hi again, @idleb. Sorry for the late review. I've tested it and it works fine, good job 👍. With the current implementation, you can have both Two things are missing now:
It'd be great if you could add these missing things and change the naming of UI items and commands that are mentioned in the review. And the last thing - do you have permissions to use these icons? Did you create them or found them somewhere? |
Hello, I updated you mentioned in the review, the feature name, About these icons, they was used temporary, I found them from otherwhere. I would need a SVG icon for the default theme. |
Thanks guys! |
I noticed that basic-styles look as if coreStyles in CKEditor4, but I didn't find subscript and superscript features, so I added them like CKEditor4