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

"Headless TinyMCE" #560

Closed
androb opened this issue Apr 28, 2017 · 7 comments · May be fixed by monzerfoda/gutenberg#15 or makbarGroup/gutenberg#53
Closed

"Headless TinyMCE" #560

androb opened this issue Apr 28, 2017 · 7 comments · May be fixed by monzerfoda/gutenberg#15 or makbarGroup/gutenberg#53

Comments

@androb
Copy link
Contributor

androb commented Apr 28, 2017

This has been asked for, need to understand the requirement more.

@androb androb added the TinyMCE label Apr 28, 2017
@jasmussen
Copy link
Contributor

Thanks Andrew. @iseulde can you help clarify what this could entail? Thanks.

@ellatrix
Copy link
Member

A "headless" version of TinyMCE would be the current version but without any UI, plugin loader, and stuff like that. Just a package that fixes bad browser manipulation in contentEditable, maybe with some tools/API to make it easier to use. Ideally it's also in npm and doesn't create global variables.

@aduth
Copy link
Member

aduth commented May 1, 2017

@androb
Copy link
Contributor Author

androb commented Oct 4, 2017

This was added in TinyMCE 4.7. Setting the theme to false will cause TinyMCE to be headless.

@androb androb closed this as completed Oct 4, 2017
@dsifford
Copy link
Contributor

dsifford commented Oct 22, 2017

@androb Would you be able to point us to an example of this API? I'm trying to run headless using Jest/jsdom and there are tons of errors being thrown by the core tinymce library because of all of the DOM APIs that it needs.

I tried stubbing window.matchMedia and that worked, but then an error was being thrown for tinymce's util.toAbsPath because the base URI is not defined. I'm assuming this is going to become a giant chain of stubbing DOM APIs if I keep proceeding down this path.

Does this need to run in an actual headless browser? Will jsdom not cut it?

CC: @spocke

Thanks in advance.

@spocke
Copy link

spocke commented Oct 25, 2017

What we mean by headless is that it has no ui similar to headless browsers like phantomjs. JSDom is a js implementation of the dom that is very limited so only parts of a complex editor like tiny would be able to support that and we don’t have that on our roadmap. Tiny and all it’s tests works in a headless browser you can run our tests command line using grunt for example. So if you could run your tests though phantomjs it should work fine.

@dsifford
Copy link
Contributor

I see. Thanks for the clarification.

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