You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This creates a <lang lang="fi">the text that was selected</lang> in the editor. Works nicely, and changes the selected text between chosen languages.
I have another action which uses nodeChange(null, null ["lang"], null); to reset the formatting.
Case 1 (Works): Reset exact selection back to plaintext by using nodeChange with first parameter null
Case 2 (Nothing happens): Reset overlapping selection back to plaintext by using nodeChange with first parameter null
Case 3 (Multiple tags): Change language with overlapping selection creates two new nodes, and leaves the old node in the middle.
Now I found a way to work around case 3 using mergeSameTags, so that's fine, but I might be going at it the wrong way, any input is welcome.
What I'm really struggling with is Case 2, and the only way I managed to get it to work was to manually look for lang tags and just unwrap them, losing the active selection in the process.
What would be the correct way to clear the custom formatting?
The text was updated successfully, but these errors were encountered:
I'm using a custom plugin with active of:
This creates a
<lang lang="fi">the text that was selected</lang>
in the editor. Works nicely, and changes the selected text between chosen languages.I have another action which uses
nodeChange(null, null ["lang"], null);
to reset the formatting.Case 1 (Works): Reset exact selection back to plaintext by using nodeChange with first parameter
![Image](https://private-user-images.githubusercontent.com/1110164/407425208-bf1cc61f-e634-44d9-934d-26757cefda26.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Nzg3NjksIm5iZiI6MTczOTY3ODQ2OSwicGF0aCI6Ii8xMTEwMTY0LzQwNzQyNTIwOC1iZjFjYzYxZi1lNjM0LTQ0ZDktOTM0ZC0yNjc1N2NlZmRhMjYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTZUMDQwMTA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWI3NGI4YTJhNDIxNzUwMTNkZDAxYTdhMWM0YzZiZDk0MzBjZmEyN2ZhNWNjYjc3ZThiN2Q0NDFhOGQ1ZDU5ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.FG1vGLSAWxZcApH1h4Xu9eLhaJHxa1ncoMBgCZJvxZI)
null
Case 2 (Nothing happens): Reset overlapping selection back to plaintext by using nodeChange with first parameter
null
Case 3 (Multiple tags): Change language with overlapping selection creates two new nodes, and leaves the old node in the middle.
Now I found a way to work around case 3 using mergeSameTags, so that's fine, but I might be going at it the wrong way, any input is welcome.
What I'm really struggling with is Case 2, and the only way I managed to get it to work was to manually look for lang tags and just unwrap them, losing the active selection in the process.
What would be the correct way to clear the custom formatting?
The text was updated successfully, but these errors were encountered: