sleemanj / xinha

WYSIWYG HTML Editor Component (turns <textarea> into HTML editors)
http://trac.xinha.org/
Other
13 stars 2 forks source link

Dynamically create textarea and then init Xinha to it (Trac #1523) #1523

Closed sleemanj closed 3 years ago

sleemanj commented 14 years ago

Desktop-like apps work with windows that can be created after app has started and that can be closed en opened again on demand. On this kind of windows textareas can be placed that must be transformed in Xinha-editors. That can be done with Xinha.init and/or Xinha.replace, but problems arise with the standard way of setting and reading text from de editor(s). The way described in help/guide with xinha_editors doesn't work . I found out that __xinhas is global object that enumerates (and stores?) editors. Through a loop over this object it is possible to find the editor and set/get text.

It would be a great enhancement when Xinha is adjusted to this new way of developing of internetapps: to remove an editor when the window is closed form __xinhas object, to created or replace an already existing editor when a window is created and easily keeping track of the existing editors in the app.

Reported by guest, migrated from http://trac.xinha.org/ticket/1523

sleemanj commented 14 years ago

Hmm, I don't understand this ticket, can someone describe a way to set up and reproduce a specific error here?

Desktop-like apps work with windows that can be created after app has started and that can be closed en opened again on demand. On this kind of windows textareas can be placed that must be transformed in Xinha-editors. That can be done with Xinha.init and/or Xinha.replace, but problems arise with the standard way of setting and reading text from de editor(s). The way described in help/guide with xinha_editors doesn't work . I found out that xinhas is global object that enumerates (and stores?) editors. Through a loop over this object it is possible to find the editor and set/get text. It would be a great enhancement when Xinha is adjusted to this new way of developing of internetapps: to remove an editor when the window is closed form xinhas object, to created or replace an already existing editor when a window is created and easily keeping track of the existing editors in the app.

to:

Desktop-like apps work with windows that can be created after app has started and that can be closed en opened again on demand. On this kind of windows textareas can be placed that must be transformed in Xinha-editors. That can be done with Xinha.init and/or Xinha.replace, but problems arise with the standard way of setting and reading text from de editor(s). The way described in help/guide with xinha_editors doesn't work . I found out that __xinhas is global object that enumerates (and stores?) editors. Through a loop over this object it is possible to find the editor and set/get text.

It would be a great enhancement when Xinha is adjusted to this new way of developing of internetapps: to remove an editor when the window is closed form __xinhas object, to created or replace an already existing editor when a window is created and easily keeping track of the existing editors in the app.

sleemanj commented 14 years ago

I'd close it, this is a matter for the person who wants to use Xinha, what they want to do simply requires a different way of using Xinha than is described in the Newbie guide.

We don't describe every possible way that somebody might fancy to use Xinha :)