Closed GoogleCodeExporter closed 8 years ago
Hi. Thanks for asking this question. I have ignored this project for a while,
but recently I have have decided to rewrite the code and fix all the issues
listed in this issue tracker.
I stopped developing this plugin when I could not resolve a particular issue
related to replacing words that span across element nodes.
Looking through the issues and feedback, I have decided that a lot of people
don't actually need this! So I have simplified things a bit, and made the new
plugin a lot easier to work with different spelling engines, which should make
it a lot easier to integrate.
I hope to release an alpha version of the new spellchecker very soon. I will
update this ticket and this googlecode project with information about the new
version once it's released.
Original comment by willis...@gmail.com
on 12 Oct 2012 at 9:42
Sounds fab, look forward to testing the new version!
Also, not sure if this should be a separate issue, but do you plan on making
the 3rd party wysiwyg integrations behave like the HTML demo where inline
dropdown is used?
Original comment by gyorgy.c...@gmail.com
on 12 Oct 2012 at 9:46
That's pretty easy to do, but the main issue I have is the following:
<p>here is a sen<span>tan<em>cc</em>e</span></p>
It's real difficult to write code to replace the word 'sentancce' with
'sentence' in the above string of text. WYSIWYGs might generate a lot of these
situations (for various reasons) and so it's real difficult coding up a
reliable method of replacing words that span across nodes.
This problem was the main reason I abandoned the project initially. But I'm
taking a different direction with the new plugin architecture, and I plan to
solve this issue using a different approach.
To answer your question: if I can resolve the above problem, then yes I will
make the plugin fully compatible with WYSIWYG's!
Original comment by willis...@gmail.com
on 12 Oct 2012 at 9:59
Fully compatible, using the inline dropdown menu.
Original comment by willis...@gmail.com
on 12 Oct 2012 at 10:00
Yes, especially pasting from MS Word slaughters the nice plain text in wysiwygs
with lots of <mso> tags...
Look forward to the rewrite.
Original comment by gyorgy.c...@gmail.com
on 12 Oct 2012 at 10:01
I am now curious how you plan to tackle this issue with the new approach. :)
Would love to read your plans on it. Perhaps I and the other users can chime in
with some help.
Original comment by gyorgy.c...@gmail.com
on 12 Oct 2012 at 10:10
It's definitely an interesting topic :)
Well since I came across this problem, I did a heck-load of research on the
topic. I even tried my best at coming up with a solution here:
https://github.com/badsyntax/domwalker.js/blob/master/js/domwalker.js
James Padolsey wrote a blog post about this at the same time that I was trying
to resolve it:
http://james.padolsey.com/javascript/replacing-text-in-the-dom-its-not-that-simp
le/
And then he recently wrote a new blog post on the topic:
http://james.padolsey.com/javascript/replacing-text-in-the-dom-solved/
There's a lot of useful information in the comments of those blog posts.
Essentially what I will do is look through all the possible solutions mentioned
in the comments. If I can find some code that someone else has written that
works, then I will probably just use that.
I don't want to try solve this myself, as it's gnarley, as that was the reason
why I abandoned the project.
Original comment by willis...@gmail.com
on 12 Oct 2012 at 10:25
Wow, that solution is superb! Awesome find...
This seems to nail it pretty much, and I love the demo
http://padolsey.github.com/findAndReplaceDOMText/demo.html
Original comment by gyorgy.c...@gmail.com
on 12 Oct 2012 at 10:31
It's not a solution I can just drop in, I will need to understand the solution
and change it slightly to fit with my requirements.
"If matches are split across multiple nodes it will wrap each portion
individually"
I don't need to wrap anything, I need to replace words that are spilt across
multiple nodes, and the replacement words can be less or more characters than
the word to replace, so it's a bit more complicated. But that code is a real
good starting point!
Original comment by willis...@gmail.com
on 12 Oct 2012 at 10:38
If jquery replace does not cut it, maybe we can investigate using the
crossbrowser xregexp http://xregexp.com/ I found it mentioned here
http://simonwillison.net/2006/Jan/20/escape/#p-6
Original comment by gyorgy.c...@gmail.com
on 12 Oct 2012 at 2:16
I've decided to use https://github.com/padolsey/findAndReplaceDOMText This
library gives me exactly what I wanted.
I've integrated it into the development version of the new spellchecker here:
https://github.com/badsyntax/jquery-spellchecker/blob/develop/src/js/jquery.spel
lchecker.js
What this means is that we can now properly use the spellchecker in 3rd-party
WYSIWYG editors! I'll get a demo up soon..
Original comment by willis...@gmail.com
on 14 Oct 2012 at 5:31
I've release a new 0.1.0 version here:
https://github.com/badsyntax/jquery-spellchecker
All future development work will happen on github, and this repository will
become obsolete.
You asked about integrating the dropdown menu in wysiwygs? Well here ya go:
http://jquery-spellchecker.badsyntax.co/bootstrap-wysihtml5.html
Please can you test here: http://jquery-spellchecker.badsyntax.co/textarea.html
If you find any issues please create a ticket in the new issue tracker here:
https://github.com/badsyntax/jquery-spellchecker/issues
Original comment by willis...@gmail.com
on 20 Oct 2012 at 4:59
What an awesome job! Wow! Will start playing with integrating it to Tinymce in
a week probably. :)
Original comment by gyorgy.c...@gmail.com
on 20 Oct 2012 at 5:16
Original issue reported on code.google.com by
gyorgy.c...@gmail.com
on 12 Oct 2012 at 9:34