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 extra block elements to contentcollector.js #2222

Closed
wants to merge 1 commit into from

Conversation

cetra3
Copy link
Contributor

@cetra3 cetra3 commented Aug 12, 2014

Not sure whether this is the correct way to resolve this issue, but there is a bug with ep_headings which means on import, all styles are stripped out from the pad:

fourplusone/etherpad-plugins#38

I am assuming there is a more proper way to actually implement this within the actual plugin, rather than the core, but I am at a loss. If someone could point me in the right direction that would be awesome.

@JohnMcLear
Copy link
Member

I think there is a hook in content collector no?

If not please add one :-)

----- Reply message -----
From: "cetra3" [email protected]
To: "ether/etherpad-lite" [email protected]
Subject: [etherpad-lite] Added extra block elements to contentcollector.js (#2222)
Date: Tue, Aug 12, 2014 04:13

Not sure whether this is the correct way to resolve this issue, but there is a bug with ep_headings which means on import, all styles are stripped out from the pad:

fourplusone/etherpad-plugins#38fourplusone/etherpad-plugins#38

I am assuming there is a more proper way to actually implement this within the actual plugin, rather than the core, but I am at a loss. If someone could point me in the right direction that would be awesome.


You can merge this Pull Request by running

git pull https://github.com/cetra3/etherpad-lite develop

Or view, comment on, or merge it at:

#2222

Commit Summary

  • Added extra block elements to contentcollector to allow imports to function with ep_headings

File Changes

Patch Links:


Reply to this email directly or view it on GitHubhttps://github.com//pull/2222.

@JohnMcLear
Copy link
Member

@cetra3 Did you look at the hook? I'm goign to close this pull request now because I'm 99% sure there is a hook for doing this... If not we need to add a hook.

@JohnMcLear JohnMcLear closed this Nov 15, 2014
@cetra3
Copy link
Contributor Author

cetra3 commented Nov 17, 2014

@JohnMcLear I looked within contentcollector.js for a hook but I don't think there is one specifically for the block elements, as it looks like an internal variable.

I'm not too sure about how I would add a new hook. Is there any guidance in this area? Any snippets of code to point me in the right direction?

@JohnMcLear
Copy link
Member

See this hook: aceRegisterBlockElements

https://github.com/ether/etherpad-lite/blob/develop/src/static/js/ace2_inner.js#L2967

Is that not the one?

Or.. https://github.com/ether/etherpad-lite/blob/develop/src/static/js/contentcollector.js#L491 ?

If neither of those do it you might want to add a similar hook as https://github.com/ether/etherpad-lite/blob/develop/src/static/js/ace2_inner.js#L2967 in contentcollector.js :)

@cetra3
Copy link
Contributor Author

cetra3 commented Nov 19, 2014

Ok, yeah there should be one of those pretty much identical in contentcollector.js. I think there'll need to be a change in both the ep_headings plugin and content collector. I'll see if I have time to work on another pull request to sort this out.

Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants