• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IFrame Editor

 
Animesh Saxena
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple IFrame editor which has a couple of span tags like

<SPAN class="custombold"> Some Content </SPAN>

<SPAN class="custombold"> Some Other Content </SPAN>

<SPAN class="custombold"> Some Other New Content </SPAN>

When this content is rendered in text form and I try to add new content at the end of span tag it is put inside the SPAN Tag. For example if I go to the end of this line "Some other Content" and press enter for adding new content then this content is added inside the SPAN tag (Second span tag). What I want is that content should come outside span tags. Since we are using span tags for applying styles we can't have user pressing enter to type in some new content and it automatically gets linked with the previous one. It's like user making some text bold and pressing enter and again the new text he types is in Bold. I know the ISSUE is with IFRAME editor, it automatically places the content inside the existing span tag. Is there any work around?

Any ideaz?
 
Animesh Saxena
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a problem when IE renders tags. I was using anchor tag with contentEditable = false property. When I tried using contentEditable = inherit the SPAN tags were coming correctly. So the lame piece of code is

onkeydown --- change all contentEditable properties to inherit

onkeyup --- change it back to false.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic