Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-22 Thread Abel Tamayo


It might be because execCommand() is a proprietary, IE-only feature. Not
sure how it would've worked in FF unless you were using a different
implementation at the time...



I developed it all the time thinking towards Firefox and using an article I
found at Mozilla WebDev about
Midas.
I really can't find an explanation but it's driving me nuts.


On 3/20/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:


Abel Tamayo schrieb:
>  but others like support for snippets I don't even know what that
> means. Also, I couldn't find better icons for foreground and
> background colors; I thought those were OK.
Okay, I write together a "usecase", more details hopefully coming later.

I want to write a post on my blog containing a few code snippets.
Something about jQuery. So I start with a few paragraphs of text, maybe
adding a bit bold text here and there, or a few subheadlines. Now comes
the first HTML snippet I want to present. I copy a bit of HTML from a
demo page, and insert it as escaped HTML into the page. Here the editor
has to present a one- or two-click approach of inserting this:
(pasted, escaped html).
A few lines later I want to insert a bit JavaScript, no escaping
neccessary, but I want to have the correct pre/code tags around it:
(pasted js).
Another few lines later I have some inline Javascript, somewhere in a
sentence: (pasted js).

I wouldn't mind configuring support for JS and other languages I'd like
to use, but at least the HTML support with escaping must be built-in.

The actualy syntax-highlighting on the code elements (according to the
given class) is done by the excellent Chili plugin
(http://www.mondotondo.com/aercolino/noteslog/?cat=8).

--
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-20 Thread Jörn Zaefferer
Abel Tamayo schrieb:
>  but others like support for snippets I don't even know what that 
> means. Also, I couldn't find better icons for foreground and 
> background colors; I thought those were OK.
Okay, I write together a "usecase", more details hopefully coming later.

I want to write a post on my blog containing a few code snippets. 
Something about jQuery. So I start with a few paragraphs of text, maybe 
adding a bit bold text here and there, or a few subheadlines. Now comes 
the first HTML snippet I want to present. I copy a bit of HTML from a 
demo page, and insert it as escaped HTML into the page. Here the editor 
has to present a one- or two-click approach of inserting this: 
(pasted, escaped html).
A few lines later I want to insert a bit JavaScript, no escaping 
neccessary, but I want to have the correct pre/code tags around it: 
(pasted js).
Another few lines later I have some inline Javascript, somewhere in a 
sentence: (pasted js).

I wouldn't mind configuring support for JS and other languages I'd like 
to use, but at least the HTML support with escaping must be built-in.

The actualy syntax-highlighting on the code elements (according to the 
given class) is done by the excellent Chili plugin 
(http://www.mondotondo.com/aercolino/noteslog/?cat=8).

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-20 Thread Kenneth

It might be because execCommand() is a proprietary, IE-only feature. Not
sure how it would've worked in FF unless you were using a different
implementation at the time...


On 3/19/07, Abel Tamayo <[EMAIL PROTECTED]> wrote:


Hi everyone.

Finally I'm releasing the plugin I've been so busy developing in the last
month. Textify (see homepage)  It's a
function that transforms a regular iFrame element into a text editor and I
hope it will serve everyone who needs it well. Think of all the
possibilities: email applications, blog, forums, maybe chats...

First thanks to everyone who helped me in developing this plugin (see
acknowlegments in the webpage).

Now, and this is making me crazy: I swear the code worked fine under FF2 a
week ago, but now I'm getting an exception each time I try to apply a style
(any kind of style). These is the exceprt of code that triggers the
exception:

doRichEditCommand: function(aName, aArg){
  try {
private.document.execCommand(aName, false, aArg);
   } catch (er){
if (window.console) console.log(er)
else alert(er);
  }
private.iFrame.contentWindow.focus();
}

So basically now it works pretty well in IE6, but not in Firefox and I
don't understand why. I even tried disabling some of my plugins in case they
where messing it up or something, but nothing, so I would be really thankful
if someone could take a look at it and test it themselves.

Thanks everyone.

Abel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-20 Thread Jörn Zaefferer
Abel Tamayo schrieb:
>
> is it possible to bind it to an input field or a textarea? Without
> javascript the iframe has no function on the page. I think the
> easiest way to do this is to check if the tag is an iframe, if
> it's not get the dimensions of the element and replace it with an
> iframe.
>
>
> I think that's a wonderful idea. I add it to the to-do list.
I second that! The serverside code can the simply generate a plain 
textarea that is transformed on the client-side.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-20 Thread Jörn Zaefferer
Abel Tamayo schrieb:
>
> I don't really have any idea about your current issue.
>
>
> Well, I guess that means my Firefox is broken, since I'm still getting 
> that error wich sucks cause I'd hate to reinstall it with all the 
> plugins, passwords, etc...
I get the same exception! We either have the same plugins installed 
causing the issues, or its something else (which is more likely).
> As for the rest of your recommendations (all of them very 
> appreciated), some of them I already had in mind, but others like 
> support for snippets I don't even know what that means. Also, I 
> couldn't find better icons for foreground and background colors; I 
> thought those were OK.
Ok, I try to put a little specification together for code snippets, 
hopefully that gets you the right idea. Its something I'm really missing 
from virtually every browser rich text editor I've seen so far.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-19 Thread Abel Tamayo


is it possible to bind it to an input field or a textarea? Without
javascript the iframe has no function on the page. I think the easiest way
to do this is to check if the tag is an iframe, if it's not get the
dimensions of the element and replace it with an iframe.



I think that's a wonderful idea. I add it to the to-do list.

Thanks

Abel.

On 3/20/07, David Duymelinck <[EMAIL PROTECTED]> wrote:


Abel Tamayo schreef:
> Hi everyone.
>
> Finally I'm releasing the plugin I've been so busy developing in the
> last month. Textify (see homepage) 
> It's a function that transforms a regular iFrame element into a text
> editor and I hope it will serve everyone who needs it well. Think of
> all the possibilities: email applications, blog, forums, maybe chats...
>
Nice plugin but is it possible to bind it to an input field or a
textarea? Without javascript the iframe has no function on the page. I
think the easiest way to do this is to check if the tag is an iframe, if
it's not get the dimensions of the element and replace it with an iframe.

I don't know if it would add much code to the plugin but it would
degrade nicer. I'm just thinking aloud.

--
David Duymelinck

[EMAIL PROTECTED]


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-19 Thread David Duymelinck
Abel Tamayo schreef:
> Hi everyone.
>
> Finally I'm releasing the plugin I've been so busy developing in the 
> last month. Textify (see homepage)  
> It's a function that transforms a regular iFrame element into a text 
> editor and I hope it will serve everyone who needs it well. Think of 
> all the possibilities: email applications, blog, forums, maybe chats...
>
 Nice plugin but is it possible to bind it to an input field or a 
textarea? Without javascript the iframe has no function on the page. I 
think the easiest way to do this is to check if the tag is an iframe, if 
it's not get the dimensions of the element and replace it with an iframe.

I don't know if it would add much code to the plugin but it would 
degrade nicer. I'm just thinking aloud.

-- 
David Duymelinck

[EMAIL PROTECTED]


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-19 Thread Abel Tamayo


I don't really have any idea about your current issue.



Well, I guess that means my Firefox is broken, since I'm still getting that
error wich sucks cause I'd hate to reinstall it with all the plugins,
passwords, etc...
As for the rest of your recommendations (all of them very appreciated), some
of them I already had in mind, but others like support for snippets I don't
even know what that means. Also, I couldn't find better icons for foreground
and background colors; I thought those were OK.

Abel.


On 3/19/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:


 Abel Tamayo schrieb:

Hi everyone.

Finally I'm releasing the plugin I've been so busy developing in the last
month. Textify (see homepage)  It's a
function that transforms a regular iFrame element into a text editor and I
hope it will serve everyone who needs it well. Think of all the
possibilities: email applications, blog, forums, maybe chats...

I don't really have any idea about your current issue. But your plugin
looks very good so far, so I want to give at least some general feedback:

   - I'd like to see which style is currently selected, eg. make the
   toolbar buttons push buttons that are "active" when, err, active
   - Your To Add list contains "Contextual menu to edit styles.": There
   is already a great context menu plugin, and Chris is working on it to make
   it more context-sensitive, I guess both plugins could profit from each other
   - "Support for insertHTML feature. Lightbox-light plugin required."
   - jQuery offers several xxx-box-style plugins, the rewritten thickbox could
   be a good choice
   - "PNG bug in IE6." - I think there is already one "official"
   fix-png plugin which you could use, or put its code into your plugin
   - "Provide a compressed version.": I'm using a modified build.xml of
   jQuery's build to pack and package my plugins, that makes new releases quite
   easy, let me know if you need help setting that up
   - The icons for colors are not intuitive
   - The clear button would deserve a confirm (hopefully not using an
   actual js-confirm)
   - one of the features I find quite useful in Office 2007 are those
   inline-style-popups: Select a part of your text, move the mouse in the right
   direction (its always in the same corner) and a tooltip/hover popup appears
   with the most important style-toolbar-buttons

And the really most important feature request I have: Please, please
please add proper support for inserting code snippets! That includes
creating pre/code tags, adding proper classes to the code element (to allow
Chili to do its fantastic work), (automatically, can be disabled) escaping
HTML elements.

And once you added the code-snippet support, I'd like to (optionally)
deactivate the rest and just work with plain HTML and escaped code snippets.

Let me know if I can help with that, eg. specifying the requirements in
more detail.

--
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-19 Thread Jörn Zaefferer

Abel Tamayo schrieb:

Hi everyone.

Finally I'm releasing the plugin I've been so busy developing in the 
last month. Textify (see homepage)  
It's a function that transforms a regular iFrame element into a text 
editor and I hope it will serve everyone who needs it well. Think of 
all the possibilities: email applications, blog, forums, maybe chats...
I don't really have any idea about your current issue. But your plugin 
looks very good so far, so I want to give at least some general feedback:


   * I'd like to see which style is currently selected, eg. make the
 toolbar buttons push buttons that are "active" when, err, active
   * Your To Add list contains "Contextual menu to edit styles.": There
 is already a great context menu plugin, and Chris is working on it
 to make it more context-sensitive, I guess both plugins could
 profit from each other
   * "Support for insertHTML feature. Lightbox-light plugin required."
 - jQuery offers several xxx-box-style plugins, the rewritten
 thickbox could be a good choice
   * "PNG bug in IE6." - I think there is already one "official"
 fix-png plugin which you could use, or put its code into your plugin
   * "Provide a compressed version.": I'm using a modified build.xml of
 jQuery's build to pack and package my plugins, that makes new
 releases quite easy, let me know if you need help setting that up
   * The icons for colors are not intuitive
   * The clear button would deserve a confirm (hopefully not using an
 actual js-confirm)
   * one of the features I find quite useful in Office 2007 are those
 inline-style-popups: Select a part of your text, move the mouse in
 the right direction (its always in the same corner) and a
 tooltip/hover popup appears with the most important
 style-toolbar-buttons

And the really most important feature request I have: Please, please 
please add proper support for inserting code snippets! That includes 
creating pre/code tags, adding proper classes to the code element (to 
allow Chili to do its fantastic work), (automatically, can be disabled) 
escaping HTML elements.


And once you added the code-snippet support, I'd like to (optionally) 
deactivate the rest and just work with plain HTML and escaped code snippets.


Let me know if I can help with that, eg. specifying the requirements in 
more detail.


--
Jörn Zaefferer

http://bassistance.de

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Plugin released: textify. PROBLEMS UNSOLVED

2007-03-19 Thread Abel Tamayo

Hi everyone.

Finally I'm releasing the plugin I've been so busy developing in the last
month. Textify (see homepage)  It's a
function that transforms a regular iFrame element into a text editor and I
hope it will serve everyone who needs it well. Think of all the
possibilities: email applications, blog, forums, maybe chats...

First thanks to everyone who helped me in developing this plugin (see
acknowlegments in the webpage).

Now, and this is making me crazy: I swear the code worked fine under FF2 a
week ago, but now I'm getting an exception each time I try to apply a style
(any kind of style). These is the exceprt of code that triggers the
exception:

doRichEditCommand: function(aName, aArg){
 try {
   private.document.execCommand(aName, false, aArg);
  } catch (er){
   if (window.console) console.log(er)
   else alert(er);
 }
   private.iFrame.contentWindow.focus();
}

So basically now it works pretty well in IE6, but not in Firefox and I don't
understand why. I even tried disabling some of my plugins in case they where
messing it up or something, but nothing, so I would be really thankful if
someone could take a look at it and test it themselves.

Thanks everyone.

Abel.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/