Jump to content

Stable version: The ACE Editor, your new favorite Inputfield


Adam Kiss

Recommended Posts

Do you hate dislike TinyMCE and heart Markdown? Or Textile? Or HTML? Do you wish there was better way to create content than textarea?

Well there is!

Content creation oriented, syntax highlighted and easy on the eyes, that is this new plugin I made. And I know you'll love it! And did I mention it supports HTML, Markdown and Textile?

screenshot.png

Download/fork/star here:

Features

  • Syntax highlight your text, for easier preparation of content
  • Nice light, readable theme
  • Supports Textile, Markdown & HTML
  • Auto selects mode, based on field's textformatters (last found is used)
  • Works with multiple fields on page, each with different settings

Features inspired by iA writer

  • Blue Cursor
  • Focus mode

We are still kind-of in beta, so please, test your browsers and let me know… Thank you!

<3 PW :)

  • Like 16
Link to comment
Share on other sites

Maybe you should add something like this:

public function ___install() {

if(ProcessWire::versionMajor == 2 && ProcessWire::versionMinor < 2) {
throw new WireException("This module requires ProcessWire 2.2 or newer"); 
}
}

Btw.: My template editor module now requires your Inputfield :)

Link to comment
Share on other sites

Hey all! Finished 1.0 version!

Updates for version 1.0

  • [add] Added Textile mode, with huge number of enhancements
  • [add] Added auto mode select (yes!)
  • [add] Added PHP mode, even though there are no means to invoke that yet
  • [enh] Enhanced quote rendering in markdown
  • [enh] Added many styles (sup,sub,cite,code,ins,del,…)
  • [fix] Fixed the default values (and saving the default values)
  • [cng] Show invisibles is off as default

Note: Still testing in various browser

Please, let me know on github, what works and what doesn't. Thank you!

  • Like 5
Link to comment
Share on other sites

Great module! Thanks Adam for doing it, great job.

post-100-0-27171700-1354746869_thumb.png

1. I enabled invis and everytime I save the page there's some chars appended in the editor like -> -> -> I use MD textformatter, and have use focus mode on. Not sure what's happening.

3. Also I get some warning when debug mode on in admin: "Notice: Trying to get property of non-object in /xxx/site/modules/InputfieldAceEditor/InputfieldAceEditor.module on line 125

Changing it to "if($field && $field->textformatters)" removes it.

2. Don't know if it's possible anway, but would be maybe nice if the "editor" area would be drag sizable in height like textareas.

Keep up the good work.

  • Like 1
Link to comment
Share on other sites

When saving an Inputfield using my new favourite inputfield I get an error message:

Error Call to undefined function _() (line 83 of /xxx/xxx/InputfieldAceEditor/InputfieldAceEditor.module)

Some sniffing on my part I found two issues here:

$field->description=_('Dims all but currently active line');

works if I change it too:

$field->description=$this_('Dims all but currently active line');

and

$field->description=_('Show non-printable characters like tabs or new line characters');

works if I change it to:

$field->description=$this->_('Show non-printable characters like tabs or new line characters');

Any clues on how to do this using GitHub? Tried to fork it, but that didn't seem the proper way. Thanks for creating this!

Link to comment
Share on other sites

I don't think that is correct, is it?

Are you running latest version? I thought _() function was added as multilingual helper, as a global function? Anyway, I'll look into it, just post it int github as an issue please, thanks :)

---

Actually, thinking about it: you make changes in your repo, commit as usually, push into your repo on github, then go into mine and make a pull request :) That would be first pull request, so if you want to go the extra mile, I'd be glad :)

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...