-
Notifications
You must be signed in to change notification settings - Fork 221
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
DOC-1969: lists and advlists plugins, text_patterns, and implicit and explicit list-creation UIs #2693
base: archived/release/docs-6
Are you sure you want to change the base?
Conversation
1. Removed references to the `lists` plugin being required for some text-patterns to work: the plugin is not so required. 2. Edited the opening paragraphs for presentation clarity. 3. Edited, and altered the presentation of the notes documenting the use of each configuration example.
Added sub-section to Text Patterns section noting it being the cause of TinyMCE now coming with explicit and implicit list-creation UIs by default. Also added xref pointing to lists.adoc and the documentation of these UIs therin.
New partial file: /partials/configuration/text_patterns-and-lists.adoc. Section added to new partial file documenting the presence of both implicit and explicit list creation UI.
New partial file: /partials/misc/admon-turning-text_patterns-off.adoc. NOTE admonition added to new partial regarding the supported (and not supported) ways of turning `text_patterns` off. This NOTE was already in `migration-from-5x.adoc`. Turning the note into a partial enables adding the same admonition to `lists.adoc`.
1. Copy-edits. 2. Comment added to block patterns example configuration re Advanced List Premium plugin requirement. 3. Added include statement pointing to `/configuration/text_patterns-and-lists.adoc`.
Replaced a section and NOTE admonition with include statements pointing to the same material.
1. Copy edits. 2. expanded notes re the relationship between lists and text_patterns to note the relationship extends to Advanced Lists if that plugin is available. 3. include statement pointing to `misc/admon-turning-text_patterns-off.adoc` added. 4. comment re Advanced Lists Premium plugin requirement added to example configuration.
1.`toolbar: ‘bullist numlist’,` added to basic setup example configuration. 2. include statement pointing to configuration/text_patterns-and-lists.adoc added.
Added entry for this ticket.
Co-authored-by: Karl Kemister-Sheppard <[email protected]>
Co-authored-by: Karl Kemister-Sheppard <[email protected]>
Co-authored-by: Karl Kemister-Sheppard <[email protected]>
1. error correction: advlist is not a Premium plugin. 2. Added further example: a complete, and specified, implicit lists UI without an explicit UI.
Error correction: advlist is not a Premium plugin.
The `text_patterns` array in the example above duplicates the default `text_patterns` set available even if `text_patterns` is not explicitly specified in a {productname} configuration. | ||
|
||
== Basic setup for a specifically defined implicit lists UI but no explicit lists UI | ||
|
||
|
||
[source,js] | ||
---- | ||
tinymce.init({ | ||
selector: 'textarea', // change this value according to your HTML | ||
plugins: 'lists', | ||
text_patterns: [ | ||
{ start: '#', format: 'h1' }, | ||
{ start: '##', format: 'h2' }, | ||
{ start: '###', format: 'h3' }, | ||
{ start: '####', format: 'h4' }, | ||
{ start: '#####', format: 'h5' }, | ||
{ start: '######', format: 'h6' }, | ||
{ start: '* ', cmd: 'InsertUnorderedList' }, | ||
{ start: '- ', cmd: 'InsertUnorderedList' }, | ||
{ start: '1. ', cmd: 'InsertOrderedList', value: { 'list-style-type': 'decimal' } }, | ||
// the block patterns below require the Advanced Lists plugin | ||
{ start: '1) ', cmd: 'InsertOrderedList', value: { 'list-style-type': 'decimal' } }, | ||
{ start: 'a. ', cmd: 'InsertOrderedList', value: { 'list-style-type': 'lower-alpha' } }, | ||
{ start: 'a) ', cmd: 'InsertOrderedList', value: { 'list-style-type': 'lower-alpha' } }, | ||
{ start: 'i. ', cmd: 'InsertOrderedList', value: { 'list-style-type': 'lower-roman' } }, | ||
{ start: 'i) ', cmd: 'InsertOrderedList', value: { 'list-style-type': 'lower-roman' } } | ||
] | ||
}); | ||
---- | ||
|
||
The `text_patterns` array in the example above also duplicates the default `text_patterns` set. This example, however, removes the ordered and unordered list toolbar items. The `list` plugin does not provide a menu item, so not loading the toolbar items removes the explicit lists UI. |
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.
What purpose does this example serve? The toolbar buttons aren't removed, they just aren't configured.
It is important to note that, by default, {productname} includes both implicit and explicit list-creation user-interfaces. | ||
|
||
Adding the `lists` plugin and the `bullist` and `numlist` toolbar items to a {productname} configuration enables the explicit list-creation user-interface (UI). | ||
|
||
The implicit list-creation UI comes via xref:content-behavior-options.adoc#text_patterns[text patterns]. The default set of `text_patterns` enabled when {productname} is initialized include https://daringfireball.net/projects/markdown/syntax[Markdown]-based patterns that {productname} automatically turns into basic ordered and unordered lists. | ||
|
||
If the xref:advlist.adoc[Advanced Lists] Premium plugin is part of a {productname} configuration, the default `text_patterns` set also includes patterns that provide an implicit UI for generating the advanced ordered and unordered lists this plugin makes possible. |
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.
What is the importance of describing both the implicit and explicit UI? The plugin basically only adds the toolbar buttons, which is all that should really be on this page.
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.
While I'm not opposed to calling it an implicit ui
, I think we can still make this easier to follow.
It is important to note that, by default, {productname} includes both implicit and explicit list-creation user-interfaces. | |
Adding the `lists` plugin and the `bullist` and `numlist` toolbar items to a {productname} configuration enables the explicit list-creation user-interface (UI). | |
The implicit list-creation UI comes via xref:content-behavior-options.adoc#text_patterns[text patterns]. The default set of `text_patterns` enabled when {productname} is initialized include https://daringfireball.net/projects/markdown/syntax[Markdown]-based patterns that {productname} automatically turns into basic ordered and unordered lists. | |
If the xref:advlist.adoc[Advanced Lists] Premium plugin is part of a {productname} configuration, the default `text_patterns` set also includes patterns that provide an implicit UI for generating the advanced ordered and unordered lists this plugin makes possible. | |
It is important to note that, by default, {productname} includes both implicit and explicit list-creation user-interfaces. | |
Adding the `lists` plugin and the `bullist` and `numlist` toolbar items to a {productname} configuration enables the explicit list-creation user-interface (UI). | |
The implicit list-creation UI comes via xref:content-behavior-options.adoc#text_patterns[text patterns], which are enabled by default in {productname} version 6. The default set of `text_patterns` enabled when {productname} is initialized include https://daringfireball.net/projects/markdown/syntax[Markdown]-based patterns that {productname} automatically create ordered and unordered lists. |
Following that, I agree the examples should be simplified and moved to the text_patterns
documentation. I think we can lose the first two examples and just demonstrate that with the list plugin and list text_patterns
config but no toolbar buttons, lists can still be inserted.
---- | ||
|
||
|
||
== Basic lists UI: explicit lists UI but no implicit lists UI |
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.
Is there any explanation for what is meant by explicit and implicit UI? I'm not sure I understand
{ start: '* ', cmd: 'InsertUnorderedList' }, | ||
{ start: '- ', cmd: 'InsertUnorderedList' }, | ||
{ start: '1. ', cmd: 'InsertOrderedList', value: { 'list-style-type': 'decimal' } }, | ||
// the block patterns below require the Advanced Lists plugin |
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 block patterns below require the Advanced Lists plugin |
{ start: '* ', cmd: 'InsertUnorderedList' }, | ||
{ start: '- ', cmd: 'InsertUnorderedList' }, | ||
{ start: '1. ', cmd: 'InsertOrderedList', value: { 'list-style-type': 'decimal' } }, | ||
// the block patterns below require the Advanced Lists plugin |
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 block patterns below require the Advanced Lists plugin |
It is important to note that, by default, {productname} includes both implicit and explicit list-creation user-interfaces. | ||
|
||
Adding the `lists` plugin and the `bullist` and `numlist` toolbar items to a {productname} configuration enables the explicit list-creation user-interface (UI). | ||
|
||
The implicit list-creation UI comes via xref:content-behavior-options.adoc#text_patterns[text patterns]. The default set of `text_patterns` enabled when {productname} is initialized include https://daringfireball.net/projects/markdown/syntax[Markdown]-based patterns that {productname} automatically turns into basic ordered and unordered lists. | ||
|
||
If the xref:advlist.adoc[Advanced Lists] Premium plugin is part of a {productname} configuration, the default `text_patterns` set also includes patterns that provide an implicit UI for generating the advanced ordered and unordered lists this plugin makes possible. |
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.
While I'm not opposed to calling it an implicit ui
, I think we can still make this easier to follow.
It is important to note that, by default, {productname} includes both implicit and explicit list-creation user-interfaces. | |
Adding the `lists` plugin and the `bullist` and `numlist` toolbar items to a {productname} configuration enables the explicit list-creation user-interface (UI). | |
The implicit list-creation UI comes via xref:content-behavior-options.adoc#text_patterns[text patterns]. The default set of `text_patterns` enabled when {productname} is initialized include https://daringfireball.net/projects/markdown/syntax[Markdown]-based patterns that {productname} automatically turns into basic ordered and unordered lists. | |
If the xref:advlist.adoc[Advanced Lists] Premium plugin is part of a {productname} configuration, the default `text_patterns` set also includes patterns that provide an implicit UI for generating the advanced ordered and unordered lists this plugin makes possible. | |
It is important to note that, by default, {productname} includes both implicit and explicit list-creation user-interfaces. | |
Adding the `lists` plugin and the `bullist` and `numlist` toolbar items to a {productname} configuration enables the explicit list-creation user-interface (UI). | |
The implicit list-creation UI comes via xref:content-behavior-options.adoc#text_patterns[text patterns], which are enabled by default in {productname} version 6. The default set of `text_patterns` enabled when {productname} is initialized include https://daringfireball.net/projects/markdown/syntax[Markdown]-based patterns that {productname} automatically create ordered and unordered lists. |
Following that, I agree the examples should be simplified and moved to the text_patterns
documentation. I think we can lose the first two examples and just demonstrate that with the list plugin and list text_patterns
config but no toolbar buttons, lists can still be inserted.
Typo correction in code sample
Ticket: lists and advlists plugins, text_patterns, and implicit and explicit list-creation UIs.
Changes:
lists
plugin being required for some text-patterns to work: the plugin is not so required.Pre-checks:
feature/6/
orhotfix/6/
Review: