Fix pasting and cmd insertion into the SupSub block of a MathFunction.#44
Open
drgrice1 wants to merge 1 commit intoopenwebwork:mainfrom
Open
Fix pasting and cmd insertion into the SupSub block of a MathFunction.#44drgrice1 wants to merge 1 commit intoopenwebwork:mainfrom
drgrice1 wants to merge 1 commit intoopenwebwork:mainfrom
Conversation
60a897e to
f1857da
Compare
The SubSub block is supposed to only allow a SubSub (i.e., a subscript or superscript) to be entered. Anything else should move to the function parameter block and be inserted there. However, if something is pasted from the clipboard or the API `cmd` method is used to insert a latex command (as is done by the PG mqeditor toolbar), then that is being allowed in the SupSub block. So this fixes those cases to only allow SupSubs as should be the case. Anything else gets moves into the parameter block.
f1857da to
be44d5f
Compare
Member
|
I think I have it set up correctly, but am trying to test this. Can you clarify what was not working or how to test. Is this nesting of button templates? |
Member
Author
|
Type |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The SubSub block is supposed to only allow a SubSub (i.e., a subscript or superscript) to be entered. Anything else should move to the function parameter block and be inserted there. However, if something is pasted from the clipboard or the API
cmdmethod is used to insert a latex command (as is done by the PG mqeditor toolbar), then that is being allowed in the SupSub block. So this fixes those cases to only allow SupSubs as should be the case. Anything else gets moves into the parameter block.Note that this is built on top of #42. Also, this has not yet been published. You can test this with webwork2 and PG by cloning this pull request branch, running
npm install,npm run build, andnpm link, and then in thepg/htdocsdirectory runningnpm link @openwebwork/mathquill. Note that to test thecmdcase with the mqeditor toolbar you will need to do this.I will publish this to npm once merged.