[ 4 posts ]

evan yang

  • Username: evanyang
  • Joined: Thu Oct 08, 2009 3:17 pm
  • Posts: 10
  • Offline
  • Profile
Tags:

editor dirty flag question

Post Posted: Thu Feb 11, 2010 3:36 pm
+0-
I am using myEditor.editorDirty flag to find out any thing have changed in the editor, this flag only work if any pf the formatting button is pressed or used, but if simply type new text in the editor, the flag does not get changed. Even if I did a myEditor.saveHTML(), the flag does not changed still.
Please advice how to detect editor content been changed.

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: editor dirty flag question

Post Posted: Thu Feb 11, 2010 9:02 pm
+0-
It doesn't set dirty for all key events only:
Space Bar,End,Home,Left Arrow,Up Arrow,Right Arrow,Down Arrow, Forward Delete, Delete

If you want more, you can listen to the editorKeyDown event and set it:

Code:
myEditor.on('editorKeyDown', function() {
    myEditor.editorDirty = true
});

Khoa Bui

  • Username: khoaminhbui
  • Joined: Tue Aug 09, 2011 6:11 am
  • Posts: 127
  • Location: Vietnam
  • Twitter: khoaminhbui
  • IRC: k_bui
  • Offline
  • Profile

Re: editor dirty flag question

Post Posted: Thu Jul 12, 2012 12:38 am
+0-
Hello Dav,

I want a signal for the actual change of editor content, such as text change, format change (change color, font, underline, bold..).
I cannot find that exact property or event from YUI 2in3 editor.
I may end up compare the original text with the current text, but before doing that, I prefer some support from Editor itself.

Can you help?

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: editor dirty flag question

Post Posted: Thu Jul 12, 2012 6:20 am
+0-
You can listen for the afterNodeChange event, the check for the editorDirty property.
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum