Closed mizzao closed 10 years ago
My comments on the above:
Whatever makes most sense, I agree
Sounds good, both components are really huge, so this makes sense as well
After I integrated CM in package.js, sharejs-client.coffee, sharejs-templates.html I noticed, it was loaded and also texts have been loaded into the editor, but no change was written back. Due debugging I found out, that the eventhandler which is defined in share/webclient/cm.js was not triggered. Since I have a solution here based on pure sharejs ansd codemirror which works, I compared the cm.js which was installed by meteor-sharejs with the one I'm using. So I replaced it by the version which is working in the pure sharejs solution and voila, now it works in sharejs -meteor as well.
Hi @robert-boulanger, would you please fork this package, add the files you e-mailed me into the fork, and commit that? I would really appreciate it.
This will also allow me to look over the code and attach line-comments before I attempt integration myself.
It doesn't look like CodeMirror supports arbitrary rich text formatting, but more like dynamic rendering of a given syntax like Markdown. Is that how you're planning to use it?
Yes thats the way I'm using it. I'm using markdown syntax to write. Makes easy to find headings and comments. Headings will be in larger fonts as you type, Using fonts like Helvetica or Times makes it easier to read.
BTW: It's forked now and my changes are committed
CodeMirror does support arbitrary classes on ranges of text: http://codemirror.net/doc/manual.html#markText It's successfully used by Firepad for quite good WYSIWYG: http://www.firepad.io/examples
(my own use case [http://mathdown.net] is also without formatting, just markdown that's syntax highlighted by CM; I'm currently using firepad by watching meteor-sharejs as possible open-backend replacement...)
On Thu, Jun 5, 2014 at 7:05 AM, robert-boulanger notifications@github.com wrote:
Yes thats the way I'm using it. I'm using markdown syntax to write. Makes easy to find headings and comments. Headings will be in larger fonts as you type, Using fonts like Helvetica or Times makes it easier to read.
BTW: It's forked now and my changes are committed
— Reply to this email directly or view it on GitHub https://github.com/mizzao/meteor-sharejs/issues/14#issuecomment-45222858 .
This is mostly a note to myself - just took another look at this today, and I don't really want to tackle it without a better way to deal with deferred loading on Meteor. Sending both the (currently) 588k Ace code and 318k CM code (uncompressed) to the client is just a lot of unnecessary traffic.
A future approach will probably have the {{> shareJSAce}}
or {{> shareJSCM}}
helpers trigger a deferred load, and then render the actual editor when the client-side JS is ready.
We'll also need a way to make available all the auxiliary files in /addon
, /mode
, and /theme
(probably using {isAsset: true}
as we currently do for Ace). There are a bunch of irrelevant files in those directories as well, which we'll need to cull from inclusion.
This is implemented via #27, and the package has been refactored to use sub-packages for the different editors, so that only the editor being used is being sent to the client.
Some issues still need to be ironed out - see https://github.com/mizzao/meteor-sharejs/pull/27#issuecomment-60039671.
An acceptable package has been published to mizzao:sharejs-codemirror
and can be currently used; see http://documents.meteor.com/. Please report any other problems in a new issue.
As attempted by @robert-boulanger - however, he e-mailed me a bunch of files and I suggested he make a GitHub fork of this package instead.
My comments on the above: