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

Atomic Blot #22

Closed
eugenkiss opened this issue Nov 24, 2016 · 1 comment
Closed

Atomic Blot #22

eugenkiss opened this issue Nov 24, 2016 · 1 comment

Comments

@eugenkiss
Copy link

Let's say I have a special LinkBlot AtomicBlot that is similar to the default LinkBlot example with the following differences. When the curser/selection is somewhere inside that AtomicBlot's text and I delete at least one character then the whole AtomicBlot is removed. Similarly, I must not be able to add characters to AtomicBlot.

My idea was to make AtomicBlot extend from the inline Embed blot. In that case the whole AtomicBlot is deleted when the cursor is right to it's last character and backspace is pressed. But when the cursor is at some other position it does only remove one character and not the whole AtomicBlot. I assume I need to override some of the Blot methods to achieve the correct behavior but I am a bit at a loss.

I was not sure whether to put this question here or on the Quill project. In any case, any advice would be appreciated.

@eugenkiss
Copy link
Author

I think StackOverflow is a better place to post this question. Here it is: http://stackoverflow.com/questions/40840321/atomic-text-blot-in-quill

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

1 participant