Page 6 of 6 FirstFirst ... 456
Results 51 to 56 of 56

Thread: Create a WYSIWYG editor (embedded)?

  1. #51
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    No relevant progress, but I made another thing for fun. I was trying to work out how to potentially do columns with a single paragraph of text would flow from one to the next in real time.
    http://ci-pro.com/wysiwyg/columns.php

    If you edit one, the others update too. But it's an illusion-- they're just three separate columns positioned each 600px apart (the height of the container). It works... kinda. But then the ends of the columns are chopped off at weird places. I have no idea if it would be possible to fix it with some sort of "chopping detection" in JS. Probably beyond me.

    At this point I can't rely on CSS3 columns. So I think I'll have to just make the users manually move from one column to the next.

    I'll get back to the main script when I have a little more time.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  2. #52
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ok, I've added in some controls for bold and italics, which now include functional code for modifying the HTML in an element.

    There's also a control to get the current node type (eg, P, UL, etc.) for the selection-- that's the first step in allowing an unbold or unitalic feature, by detecting what exists and what to remove as needed.

    Demo:
    http://ci-pro.com/wysiwyg/demo3.php
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #53
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    the only suggestion I can make so far, is, simply for aesthetic purposes, rather than alerting the element, write it to an element? Also, could you make it so that you can unbold and un-italic the text?
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  4. The Following User Says Thank You to bernie1227 For This Useful Post:

    djr33 (10-28-2012)

  5. #54
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    the only suggestion I can make so far, is, simply for aesthetic purposes, rather than alerting the element, write it to an element?
    That's just for working things out. Once it's reliable I'll be using that information for other things such as:
    Also, could you make it so that you can unbold and un-italic the text?
    That's the next step. But I got stuck last night because it's hard to track whether text is bold at the moment. I intend to do it, but it'll take a little time. And unfortunately as this week begins I've got a few other commitments.

    Updates soon!
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #55
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Something else to check out in this vein:

    http://www.dynamicdrive.com/forums/s...ea-using-ENTER

    It starts out very simple but becomes a tutorial on how to do the sort of thing you're interested in.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. The Following User Says Thank You to jscheuer1 For This Useful Post:

    djr33 (10-29-2012)

  8. #56
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by djr33 View Post
    No relevant progress, but I made another thing for fun. I was trying to work out how to potentially do columns with a single paragraph of text would flow from one to the next in real time.
    http://ci-pro.com/wysiwyg/columns.php

    If you edit one, the others update too. But it's an illusion-- they're just three separate columns positioned each 600px apart (the height of the container). It works... kinda. But then the ends of the columns are chopped off at weird places. I have no idea if it would be possible to fix it with some sort of "chopping detection" in JS. Probably beyond me.

    At this point I can't rely on CSS3 columns. So I think I'll have to just make the users manually move from one column to the next.

    I'll get back to the main script when I have a little more time.
    on the topic of that, I managed to dig up a stack overflow thread on the topic:
    http://stackoverflow.com/questions/7...-different-div
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  9. The Following User Says Thank You to bernie1227 For This Useful Post:

    djr33 (10-30-2012)

Similar Threads

  1. WYSIWYG Editor Maintain Formatting
    By bluewalrus in forum Computer hardware and software
    Replies: 5
    Last Post: 12-02-2010, 04:13 PM
  2. Released a UBBEditor WYSIWYG UBB Editor
    By jetiben in forum JavaScript
    Replies: 0
    Last Post: 06-23-2010, 05:22 AM
  3. Dynamic Ajax Content and WYSIWYG editor
    By CarlosAraujo in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 01-05-2010, 04:16 PM
  4. a better WYSIWYG editor?
    By unknownerrors in forum The lounge
    Replies: 7
    Last Post: 02-07-2007, 10:03 AM
  5. Font used in WYSIWYG editor script
    By rizlaa in forum Graphics
    Replies: 1
    Last Post: 08-04-2006, 12:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •