Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added helpers to collectContentPre and collectContentPost #2542

Closed
wants to merge 4 commits into from

Conversation

cristo-rabani
Copy link
Contributor

Function makeContentCollector is used on both sides (client/server)
but sometimes we need read somethings from html attribute.
and passing data by class is very not elegant way.

Function makeContentCollector is used on both sides (client/server) 
but sometimes we need read somethings from html attribute.
and passing data by class is very not elegant way.
@JohnMcLear
Copy link
Member

Please read contributing.md for style guide, your indentation looks incorrect here..?

@cristo-rabani
Copy link
Contributor Author

Sorry, I copied and pasted it from my local version.
I used github editor for this for now.
It will be helpful if you prepare editorconfig file ( http://editorconfig.org/ )

In my bitbucket repository I have many core changes,
mostly for optimization like caching in indexedDB for long texts.
Don't serializing data to json for mongo and storing in a few collections instead just in one (This is new database type for ueberDB [I really don't know why someone wants to serializing data to json before save it to mongodb. This slows down loading about ~20%])

Sometimes I change formatting of some files because I hate if '{' is in new line.
This breaks folding of code in webstorm and makes code is too lengthy and is harder to reading for many people but this can be an 'de gustibus'.

When I will be have free moment, I am going to fix formatting.

@JohnMcLear
Copy link
Member

Bump @cristo-rabani

@cristo-rabani
Copy link
Contributor Author

check now

var helpers = {
//returns attributes like style, id
getAttr: function(htmlAttr){
return dom.nodeAttr(node, htmlAttr);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing still wrong here..

@JohnMcLear
Copy link
Member

JohnMcLear commented Mar 31, 2015

@cristo-rabani sorry dude there are merge conflicts :! My bad, that file is active!

Can you please resolve the merge conflict please?

One thing I would like is an example snippit of the helpers being used in a plugin so others can reference this.. I'd also like to see some docs be included, contentCollectorPre is exposed to plugins so the additional functionality needs docs to land in http://etherpad.org/doc/v1.5.0/#index_collectcontentpre

Once we have:

Then this is good to merge

Thanks!

@JohnMcLear
Copy link
Member

Another bump @cristo-rabani if you want to see this land...

@JohnMcLear
Copy link
Member

Closing as stale.

@JohnMcLear JohnMcLear closed this Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants