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

Deleting a tag after single click or double click (bold, italic) deletes all tags and contents (Issue 70 revived?) #81

Closed
ajmacdonald opened this issue Aug 26, 2013 · 3 comments

Comments

@ajmacdonald
Copy link
Contributor

Testing for this closed issue:
Deleting tags deletes unexpected nested tag. When I bold and italicize the second "DIV1" tag in the Events document it doesn't delete the "DIV1" tag (which is what it is supposed to do, correct?), rather it deletes the "title" tag under the "heading" tag that is the first nested tag under the highlighted "DIV1" tag. (Issue 70)

In the Create an Event template, selected Div1 both ways with same result: deleted all contents inside the Div 1, not the Div I itself.

The deletion of tags did seem to be working, somewhat, elsewhere in the same doc. When I single clicked the tag disappears along with its contents, if any. When I double clicked to italicize it deleted the contents of a DATE tag not the tag itself. (note that this is the reverse of what the issue above says).

I may have forgotten, but is there a reason why we can't deal with deletion in the right click menu? I'd like the options to appear there, something like:
delete tag and all contents
delete tag and enclosed tags
delete tag only
delete contents only

Original: jchartrand/CWRCEditor#72

@ajmacdonald
Copy link
Contributor Author

@SusanBrown When the tag is bold, it means the tag AND its contents are selected. When the tag is italicized and bold, it means just the contents are selected.

I'd removed the delete actions from the right click menu and turned them into buttons below the tree. At that time it was slow to open the menu because of the time it took to load all the possible tags for insertion. That has since been improved. I'll add the following actions back to the menu: remove tag only, remove tag and all content. If you can explain how you'd like the other actions to work I can add those as well.

@SusanBrown
Copy link

It is good to have these options. I was confused about what they should do and think that we definitely want them in the right click menu options too.

Please add to the right click menu, then:

Remove content only [this would work as the bold and italicized option does now]

I think we can probably do without the option to delete just the tag and any internal tags, which was the other option.

I presume it wouldn't be easy to provide a warning and request confirmation if deleting a tag was going to make the document invalid. If it were, and could be done without significant slowdown, then we should.

@ajmacdonald
Copy link
Contributor Author

Added "remove content only": 9ecb2ee

You're right, it would be non-trivial to implement that validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants