Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Rodion Borisov
@vintprox
And here I can't get idea of what files I really need just to activate WYMeditor in my document
I have tried to copy dist/wymeditor folder to my main app folder, where my XHTML file is situated
then I properly added needed script to queue in head: <script src="wymeditor/jquery.wymeditor.min.js" type="text/javascript" />
yeah, after <script src="js/jquery-2.1.4.min.js" type="text/javascript" />
$(document).ready(function() {
    /* other stuff */
    $("#doc").wymeditor();
}

My XHTML have this piece of code: ```

<form>
<textarea id="doc"></textarea>
</form>
```

Rodion Borisov
@vintprox
And result is what use see on picture
Also when I put files from repo in src/wymeditor to wymeditor in my app folder, nothing changes
Looks like src has more advanced things, including core.js, that, I think, is very important in setting my editor.
And that parser folder - hah, yeah, I can't just write my WYSIWYM content without XML parser, it will looks weird and broken
Rodion Borisov
@vintprox
I can't compare two folders src and dist by necessity, cause one loads core modules and at the same time second loads jQuery module. Why are they seprated, and need I unite them actually?
Thanks in advance!
Wes Winham
@winhamwr
@VINTproYKT if you downloaded the pre-built release, you shouldn't have "src" or "dist" folders: https://github.com/wymeditor/wymeditor/releases/download/v1.0.5/wymeditor-1.0.5.tar.gz
That pre-built release is actually just the contents of the "dist" folder, though, if you'd like to use what you already have.
Rodion Borisov
@vintprox
@winhamwr Thank you! So I can place wymeditor folder in my root and place AUTHORS and licenses files in wymeditor, if I'm right? Hm, anyways, I tried to download wymeditor v1.0.5 from Releases page in .zip format. Maybe it's cause?
Rodion Borisov
@vintprox
Got it, it was a source code in .zip. Yeah, I need to learn more about GitHub :D
Rodion Borisov
@vintprox
Shahar Dawn Or
@mightyiam
@VINTproYKT here you go
Rodion Borisov
@vintprox
@mightyiam Alrighty!
Rodion Borisov
@vintprox
Oh no, I hate this app "GitHub" for Windows!
It removed all my files for repo
  1. Created branch "develop".
  2. Just suddenly commited my first upload under wrong name/account.
  3. I have removed branch "develop".
  4. PROFIT, all my files gone!
Rodion Borisov
@vintprox
Erm, it's good that I have saved my OLD copy of project. It's so boring to recreate after all errors have been resolved. :(((
P.S.: GitHub Desktop must burn
Rodion Borisov
@vintprox
OK, I have reproduced my previous state with little efforts, so all is fine :) (but with strange error)
This message was deleted
oh, whaaaaaat. this strange error disappeared itself, bravo :clap:
Shahar Dawn Or
@mightyiam
Phew
Rodion Borisov
@vintprox
or... not. Dam*, I need to resolve it myself. But it looks like exec doesn't work properly... I can't understand why it's happening, cause error addressed to edited.js. This file makes really bad in debug. Before that I have error with skin, and I just cannot understand how you're requiring css and js files inside jquery.wymeditor.js
Rodion Borisov
@vintprox
Console just says that undefined is not a function
Rodion Borisov
@vintprox
AND now it disappeared itself again
what's the heck?
oh, i get it. It appears only when page loads really quick.
Rodion Borisov
@vintprox
Such errors are appearing when I click on iframe, call exec, etc.
WYMeditor.editor.hasSelection, line 3380:
        rangy.isSelectionValid(wym._iframe.contentWindow) !== true
Shahar Dawn Or
@mightyiam
@VINTproYKT you know, WYMeditor is very not modern. Did you consider alternatives?
Rodion Borisov
@vintprox
Looks like rangy is missing function isSelectionValid
WYMeditor.editor.prototype.hasSelection = function () {
    var wym = this;
    console.log(rangy);
    if (
    // `isSelectionValid` is undocumented in current Rangy (`1.2.2`).
    // It seems to be required because the `rangeCount` in `IE <= 8` seems
    // to be misleading.
    rangy.isSelectionValid(wym._iframe.contentWindow) !== true
    ) return false;

    if (wym.selection().rangeCount === 0) return false;

    return true;
};
Object
addCreateMissingNativeApiListener: function (listener) {
addInitListener: function (listener) {
config: Object
createMissingNativeApi: function createMissingNativeApi(win) {
createModule: function (name, initFunc) {
fail: function fail(reason) {
features: Object
init: function init() {
initialized: false
modules: Object
requireModules: function (modules) {
supported: true
util: Object
version: "1.2.2"
warn: function warn(msg) {
__proto__: Object
Shahar Dawn Or
@mightyiam
@VINTproYKT I wrote hasSelection. I'm not sure why I had isSelectionValid while in your setup you seen to not have it.
Rodion Borisov
@vintprox
@mightyiam I know that it really applies my needs, so I'm walking around this trouble. Every project has its pros and cons, I just can't look for ideal solution ever, cause it's here... right here, and I just need to resolve this strange thing. I'll try to debug to this
Yeah, maybe I just get hard to edit foreign libraries, so I want to keep it clear. But I'll make some changes if it looks right :)
Nice, it resolves my problem. I'll note this bug just for further assistance
Rodion Borisov
@vintprox
@mightyiam Contributed
Shahar Dawn Or
@mightyiam
@VINTproYKT thank you for the contributions. I'll look at them perhaps tomorrow.
@VINTproYKT would you like to speak over voice about your WYMeditor involvement and you know, just get acquainted?
Rodion Borisov
@vintprox
@mightyiam Just making it clear, I don't want to sit in corner and do nothing with this creature, cause most people are really silent of open source development. If I'm doing some changes, it'll be good if I also contribute. I like WYSIWYM concept, but seen nothing for it except WYMeditor.
I just make my application for desktop that needs more creative conceptual model of WYSIWYM, so there I go. Of course, I'm sorry to bother you.
Shahar Dawn Or
@mightyiam
@VINTproYKT you do not bother me at all. Where did you get that idea, from? I'm happy for your contribution.
Rodion Borisov
@vintprox
@mightyiam Oops, it's my knowledge of English - as it is called in our places "intermediate". Maybe I misunderstood your dialect at the moment
Anyways, I don't mean smth. bad ;)
Aron Jones
@defrex
Is there any documentation somewhere on all the available initialization options?