2

I have specific issue:

I have a couple of divs on HTML page, each with different fixed sizes and set as overflow:hidden, each of containers is powered by jqueryte wisiwig editor (jqueryte.com) so user can change a content of divs interactively.

The point is to ensure more comfortable work with huge texts (like books etc.). User would insert one big content (also with HTML marks) in some div by editor, but oveflowed part of text (not visible in current div) will be send into next div (assume user will select joined divs before).

For those who are familiar with Adobe InDesign there is exactly the same functionality, but question is if it's applicable on html/css/jquery environment.

Some perfect solution would be that user could edit content in each separate div by editor and content would interactively continue into next joined div, if u understand what i mean.

I have found a couple of tips but all needs either the same width for all divs or non-html content (plain text).

Please guys, is there any posibility to prepare such concept of working with huge HTML-like content?

Thank you very much for any help, regards, Honza.

mr.soroush
  • 1,110
  • 2
  • 14
  • 31
Jan P.
  • 228
  • 1
  • 2
  • 11
  • Additionally to Thanassis_K's answer: Keep in mind that the amount of text that fits in a DIV of a "fixed" size will be different in each browser, for each user, even each OS. InDesign is for print, and the web is not print; you can't apply the same rules/concepts. – RoToRa Aug 07 '13 at 12:26
  • Agree with u, but in case the solution described by Thanassis_K will work at least in one browser and one OS perfectly, it's definitely enought for me, becouse this functionality is for something like student project, so any limitation such as user has to use Mozilla on Windows 7 and similar is acceptable. – Jan P. Aug 07 '13 at 14:17
  • If it's a student project, then it's even more important that you acknowledge and document that weakness. Also even on the same browser and OS there can be differences, e.g. due to different minimal font size settings. – RoToRa Aug 08 '13 at 08:09

1 Answers1

1

If i understand correctly the scenario is the following: Supporse you have two divs, #divOne and #divTwo of fixed width (not the same) both of them. Then you insert a large HTML into #divOne and you want the invisible context in #divOne to be moved into #divTwo. Is that correct?

If so, you could achive that by identifying if the #div one has a scrollbar how to check if an element has a scrollbar

Then you could write an algorithm where you will parse the HTML and at the same time check if the #divOne has scrollbars. Then you could check for any full stop or question mark and cut the HTMl text there and append it to the $("#divTwo").append().

It is just a scenario and you could see if that works for you.

Community
  • 1
  • 1
Thanassis_K
  • 272
  • 1
  • 9
  • Thak u for your reply, I think yes, u understand definitely well and this approach could really works, I will test that, thx:) – Jan P. Aug 07 '13 at 13:34