google-code-backups / lifepress

Automatically exported from code.google.com/p/lifepress
Other
0 stars 0 forks source link

Add a toolbar for Markdown syntax to the editor #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The editor in the admin area should have a toolbar for the most common
syntax to avoid users to remember the Markdown syntax.

The editor should apply the syntax on selected text or just append the
syntax to the textarea and move the cursor to the proper place.

I expect this to use javascript, so the whole toolbar should be loaded with
JS to let it disappear at all when JS is deactivated.

Original issue reported on code.google.com by carsten....@gmail.com on 12 Feb 2010 at 6:21

GoogleCodeExporter commented 8 years ago
I started to work on this issue. I'll add a toolbar of buttons to the textarea 
and
add a javascript file that inserts the Markdown syntax to the selected text. 
Maybe a
new CSS file to style the toolbar, or I add the needed classes to the existing 
CSS.

Original comment by carsten....@gmail.com on 12 Feb 2010 at 5:30

GoogleCodeExporter commented 8 years ago
Here is a JS rich-text editor that may make things even easier.

(You already started work on this issue so I'll leave you be, besides giving 
some 
suggestions)

Original comment by killpack99 on 12 Feb 2010 at 9:45

Attachments:

GoogleCodeExporter commented 8 years ago
I did have something like this going in sweetcron. I was using WMD Editor 
(http://wmd-editor.com/demo).

I found it very easy to get up and running and did exactly what you're 
describing.

Original comment by i...@langleydiving.com on 13 Feb 2010 at 7:44

GoogleCodeExporter commented 8 years ago
I added WMD to lifepress. It was an easy task, thanks for the tip 
@langleydiving. :-)

Right now the license isn't clear to me, the next major release of WMD will use 
a MIT
license too.

Original comment by carsten....@gmail.com on 16 Feb 2010 at 8:38

GoogleCodeExporter commented 8 years ago
The path to the WMD javascript files isn't correct yet. re-opened for 
correction.

Original comment by carsten....@gmail.com on 16 Feb 2010 at 8:45

GoogleCodeExporter commented 8 years ago
In my local files I added the full path to the script files and it is working 
now. Is
there a way to use CodeIgniter things to avoid the hardcoded path or is this the
right way to load the javascript:

<script type="text/javascript" 
src="/system/application/views/admin/wmd/wmd.js"></script>

Original comment by carsten....@gmail.com on 16 Feb 2010 at 8:50

GoogleCodeExporter commented 8 years ago
It is changed to the following now:

<script type="text/javascript" src="<?php echo $this->config->item('base_url');
?>/system/application/views/admin/wmd/wmd.js"></script>

This way you can still install lifepress into a subfolder. :-)

Original comment by carsten....@gmail.com on 16 Feb 2010 at 12:34

GoogleCodeExporter commented 8 years ago

Original comment by carsten....@gmail.com on 16 Feb 2010 at 1:02

GoogleCodeExporter commented 8 years ago

Original comment by carsten....@gmail.com on 17 May 2010 at 9:29