• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

IFrame Editor

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic