4 Replies - 251 Views - Last Post: 08 July 2014 - 06:33 AM

#1 buzzloghtyear89  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 09-December 13

Is using the contenteditable attribute in HTML5 good to use when build

Posted 07 July 2014 - 04:37 PM

What I mean by text editor is not changing the html format of a web page but by creating a simple text editor similar to (maybe not as good looking) the iwriter Mac app, when a user can write notes and save it locally and edit it again if needed.
Is This A Good Question/Topic? 0
  • +

Replies To: Is using the contenteditable attribute in HTML5 good to use when build

#2 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3572
  • View blog
  • Posts: 10,414
  • Joined: 08-June 10

Re: Is using the contenteditable attribute in HTML5 good to use when build

Posted 08 July 2014 - 01:02 AM

why not using a textarea element as writing canvas? a contentedible’d element doesn’t provide more features anyways.
Was This Post Helpful? 0
  • +
  • -

#3 ge∅  Icon User is offline

  • D.I.C Addict

Reputation: 81
  • View blog
  • Posts: 577
  • Joined: 21-November 13

Re: Is using the contenteditable attribute in HTML5 good to use when build

Posted 08 July 2014 - 03:54 AM

The textarea element doesn't allow to write lists, headers, etc.

However, it's hard to get contentEditable working exactly the way you want in multiple browsers. Chrome messes some things up, Firefox does too, Internet explorer does too, and they don't do it the same way (of course). You need to accept not have a full control of the output text or spending a LOT of time reimplementing some basic stuff manually to make sure they all behave the same way. I personally hate this when I do a backoffice, but if you just want your users to take notes, it doesn't need to be as clean as that.

This post has been edited by ge∅: 08 July 2014 - 03:55 AM

Was This Post Helpful? 0
  • +
  • -

#4 buzzloghtyear89  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 09-December 13

Re: Is using the contenteditable attribute in HTML5 good to use when build

Posted 08 July 2014 - 05:47 AM

I won't worry about cross browser compatibility now because I am new to javascript and I am trying to learn it. and I want to build a personal text editor that did present the sharp borders of the textbox input. It seems some folks use another javascript framework to build something like workflowy.
Was This Post Helpful? 0
  • +
  • -

#5 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3572
  • View blog
  • Posts: 10,414
  • Joined: 08-June 10

Re: Is using the contenteditable attribute in HTML5 good to use when build

Posted 08 July 2014 - 06:33 AM

Quote

I won't worry about cross browser compatibility now because I am new to javascript and I am trying to learn it.

that doesn’t stop cross-browser issues from happening. you should be aware of them from the point you begin learning, otherwise you will shoot yourself in the foot over and over again.


Quote

I want to build a personal text editor that did present the sharp borders of the textbox input.

use CSS for that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1