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

Disallow subscript and superscript at the same time #5215

Closed
jacekbogdanski opened this issue May 16, 2022 · 4 comments · Fixed by #5312
Closed

Disallow subscript and superscript at the same time #5215

jacekbogdanski opened this issue May 16, 2022 · 4 comments · Fixed by #5312
Assignees
Labels
plugin:basicstyles The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. support:2 An issue reported by a commercially licensed client. type:feature A feature request.
Milestone

Comments

@jacekbogdanski
Copy link
Member

Type of report

Feature request

Provide description of the new feature

Currently, enabling subscript and superscript on the same content will result in producing the below HTML:

<p><sup><sub>foobar</sub></sup></p>

Many popular text editors (like MS Word) don't allow to style text with subscript and superscript at the same time. It's not recommended to change the current implementation, but we could introduce an opt-in configuration option that would give more freedom in choosing proper behavior:

  1. Select text and apply subscript:
    <p><sub>foobar</sub></p>
  2. Select the same text and apply superscript:
    <p><sup>foobar</sup></p>
@jacekbogdanski jacekbogdanski added type:feature A feature request. status:confirmed An issue confirmed by the development team. plugin:basicstyles The plugin which probably causes the issue. support:2 An issue reported by a commercially licensed client. labels May 16, 2022
@jswiderski
Copy link
Contributor

Please note that we have closed such an issue in te past - #3303

@jacekbogdanski
Copy link
Member Author

jacekbogdanski commented May 16, 2022

The reasoning in #3303 (comment) is not totally valid. It's true that both elements can be nested in each other, but that doesn't mean we can't improve a user experience by giving a more predictable interface to manipulate rich content.

@NavnathKumbhar
Copy link

You closed #3303 mentioning about Phrasing content. The rule just says:

Most elements that are categorized as phrasing content can only contain elements that are themselves categorized as phrasing content, not any flow content.

From my understanding, It is just about what it can contain as its child.
The standard do no say that we can not provide such an improvement in the question.

@CKEditorBot
Copy link
Collaborator

Closed in #5312

@CKEditorBot CKEditorBot added this to the 4.20.0 milestone Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:basicstyles The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. support:2 An issue reported by a commercially licensed client. type:feature A feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@jswiderski @jacekbogdanski @KarolDawidziuk @CKEditorBot @NavnathKumbhar and others