0

I'm still rather new to Javascript, but not programming, and I have been trying to set up a project and can't seem to get off the ground with it.

I am trying to use Electron with code from http://photonkit.com/ as a basic template to start from. The eventual goal is to create a WYSIWYG editor using Reacts Draft.js as a kind of learning experience.

Below is the HTML for the template I am using:

<!DOCTYPE html>
<html>
  <head>
    <title>WYSIWYG</title>

    <!-- Stylesheets -->
    <link rel="stylesheet" href="../css/photon.min.css">

    <!-- Javascript -->
    <script src="js/menu.js" charset="utf-8"></script>
  </head>
  <body>
    <div class="window">

      <!-- .toolbar-header sits at the top of your app -->
      <header class="toolbar toolbar-header">
        <h1 class="title">WYSIWYG</h1>
      </header>

      <!-- Your app's content goes inside .window-content -->
       <div class="window-content">
        <div class="pane-group">
          <div class="pane pane-sm sidebar">

          </div>

          <div class="pane">

          </div>
        </div>
      </div>
    </div>
  </body>
</html>

Now I want to display a Draft.js editor in the "pane" div, however I can't quite figure out how. I have tried inserting script tags into the div, calling scripts at the end of the doc that get the div and display to it, inserting the script directly in the div.

I am almost entirely sure that this is an easy thing to solve, and that it is mostly due to my inexperience with this kind of development however I really can't wrap my head around it.

Also this is my first post as I have never been stuck on something for so long before and I finally became frustrated enough to reach out for help. I am taking this as a learning experience for asking questions as well so if there is anything I did wrong or could do better let me know as well.

Ryan Bass
  • 1
  • 3
  • 1
    I'd recommend going through a proper react tutorial, because you are missing some fundamental react knowledge. I'd recommend - https://reacttraining.com/online/react-fundamentals – Deividas May 13 '17 at 13:27
  • Ok great, I am going through it now. Thank you so much! – Ryan Bass May 13 '17 at 15:02

0 Answers0