-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add/549 list block indent buttons #717
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
40472da
Add lists plugin to support list indenting correctly
tiny-james b19ee7f
Add onNodeChange as an optional entry in the Editable props
tiny-james 2418990
Add indent/outdent buttons; list type buttons handle sublists
tiny-james d5c0d0b
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james 5f2c3d0
Avoid use of global tinymce.activeEditor
tiny-james 390e99a
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james ba33927
Allow the control.isActive function to be optional defaulting to false
tiny-james 8dfdd74
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james 1d93fbc
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james 4cc20bf
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james f60e11d
Moved list logic into Editable
tiny-james abb531f
Removed onSetup and onNodeChange callbacks
tiny-james 17a5168
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james 1104141
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james 27e1c0f
Put separate CSS selectors on different lines to improve readablity
tiny-james 7156082
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james f8cce5a
Revert "Removed onSetup and onNodeChange callbacks"
tiny-james befe07b
Revert "Moved list logic into Editable"
tiny-james 528f088
Removed onNodeChange; allow tinyMCE configuration outside Editable
tiny-james 05288e1
Merge branch 'master' into add/549-list-block-indent-buttons
tiny-james 68ab9ee
Remove onNodeChange property callback
tiny-james 8e36e05
Renamed onConfig to getSettings
tiny-james 9c5b029
Use find from lodash to avoid IE 11 support problems
tiny-james 9ed5cf4
Replaced some out of position tab chars with spaces
tiny-james File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.blocks-list .blocks-editable__tinymce { | ||
.blocks-list .blocks-editable__tinymce, | ||
.blocks-list .blocks-editable__tinymce ul, | ||
.blocks-list .blocks-editable__tinymce ol { | ||
padding-left: 2.5em; | ||
margin-left: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 haven't really settled on whether we should encourage attributes as a generic object store. One issue and potential reason for not leaning on it heavily is that the default behavior of serializing block comments is to encode any additional attributes outside a block's own
attributes
property into the comment itself. You can see this when changing from Visual to Text, that the block separation includeseditor
andinternalListType
:<!-- wp:core/list editor="[object Object]" internalListType="null" -->
The proposed block API includes an
encodeAttributes
function which was intended to address this concern, allowing block implementers to omit properties not desired to be included in the comment. This has not yet been implemented though. If it were, I might suggest that it be an opt-in than an opt-out to the comment attributes.What do you think?
We could leave this for now and address separately. This is also why I'd considered using
state
in theedit: class extends Component
gist for editor and internal list type.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'll leave it for now.
I was unaware that state was being serialized beyond what I was outputting in save. I think it should be opt-in.