Bugzilla@Mozdev – Bug 24990
Add a variable to set cursor position
Last modified: 2014-12-02 10:11:44
You need to log in before you can comment on or make changes to this bug.
Plan: add a variable %cursor% to determine exact position of the cursor for easier start of editing.
*** Bug 25102 has been marked as a duplicate of this bug. ***
Created an attachment (id=7444) [details] test version with cursor support Here is a first test version, (probably) only works with html templates. I am doing some "clever" stuff here as cursor / caret management is non-trivial. E.g. I need to count visible characters and move the cursor forward letter by letter and also count newlines (<br>) which are not visible.... god knows whether this will work in the majority of cases. the algorith has to replace %cursor% with [[cursor]] and then highlights it. It is a test version! 0.9.3 prerelease 5
One more comment - %cursor% is currently not compatible with Stationery, as this forces itself to load after everything else; there will be more efforts in the future to make st4 compatible with stationery but it is going to take a while.
I would just like to state that while I do see the benefit of having a method of forcing the cursor into a specific place, I too have encountered this problem with my signature and have resolved it quite simply. Just add an HTML element with class moz-signature and make it enclose the signature. Add some <br> space above it so you have some space to type and you're done. An example of a signature/template formatted such: <br> <br> <div class="moz-signature"> This is a signature text, hooray. </div> On my system, TB 17 + SmartTemplate 0.9.2 + Windows 7 x64, this resolved the issue for me. Having said that, I would still like to see a variable such as %cursor% to be able to place the cursor exactly in that spot one would want to see it, in case for example a signature/template is used that has a header. A final note: the text in class moz-signature is by default a greyish type. With a little CSS this can be resolved, or simply by using <font color="black">bla</font> for example. The usual HTML/CSS tricks apply here. I hope this helps you.
Johan, I've got the same setup as you (TB 17 + SmartTemplate 0.9.2 + Windows 7 x64) - and doing the <div class="moz-signature"> hack is not working for me... any suggestions? Regards, Phil
(In reply to comment #5) > Johan, > > I've got the same setup as you (TB 17 + SmartTemplate 0.9.2 + Windows 7 x64) - > and doing the <div class="moz-signature"> hack is not working for me... any > suggestions? > > > Regards, > Phil > I would suggest you try version 0.9.3 that's out now or 0.9.3pre5 that I got from one of these bugreports earlier. Kind regards, Johan
Created an attachment (id=7593) [details] 0.9.3 Prerelease 153 Lastest beta. With this you can use %cursor% and it even displays it at the left hand side of the screen (and not on the right). Unless you are writing in LTR (hebrew) of course!
(In reply to comment #4) > > Just add an HTML element with class moz-signature and make it enclose the > signature. Add some <br> space above it so you have some space to type and > you're done. An example of a signature/template formatted such: > > <br> > <br> > <div class="moz-signature"> > This is a signature text, hooray. > </div> Just a note, this hack will not work from version 0.9.3 onwards. Instead, you can use: <div class="st4cursor"></div> this will be searched & replaced with the cursor. Using %cursor% will insert the same tag [and remove it].
(From update of attachment 7444 [details]) marking as obsolete, due to prerelease 153.
*** Bug 25755 has been marked as a duplicate of this bug. ***
*** Bug 25905 has been marked as a duplicate of this bug. ***