Comments (8)
My comments on the above:
- CM comes in an NPM package so we can just use that instead of the submodule for Ace
Whatever makes most sense, I agree
- Both Ace and CM should be served as assets and not sent to clients until requested
Sounds good, both components are really huge, so this makes sense as well
- Please clarify what you mean by "different version". What worked and what didn't?
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.
from meteor-sharejs.
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.
from meteor-sharejs.
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?
from meteor-sharejs.
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
from meteor-sharejs.
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 [email protected]
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
#14 (comment)
.
from meteor-sharejs.
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.
from meteor-sharejs.
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 #27 (comment).
from meteor-sharejs.
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.
from meteor-sharejs.
Related Issues (20)
- ReferenceError: Cannot access 'ShareJS' before initialization HOT 2
- Editor permissions HOT 4
- ShareJS object not exported? HOT 2
- Multiple Ace Editor IDs HOT 2
- mizzao:[email protected] causes app to crash HOT 1
- broken with multiple app instances? HOT 1
- Uncaught Error: Cannot find module 'share/node_modules/browserchannel/dist/bcsocket-uncompressed' HOT 1
- Failed to get ops HOT 39
- Update CodeMirror? HOT 2
- Still Active? HOT 2
- Need to declare use of ecmascript HOT 3
- Update to codemirror 5.25.0
- ShareJS.model.on('applyOp',... causes textarea to lose focus HOT 1
- Alternative package for ShareDB and Meteor HOT 1
- Saving editor content to database HOT 1
- how to sync share js to the local file when something change on the server
- No compatible binary build found for mizzao:[email protected] HOT 1
- ShareJS not defined in Meteor 1.6 HOT 10
- Document was opened but closed right away
- does not save document HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-sharejs.