Giter Club home page Giter Club logo

raptor-editor's Introduction

Raptor Editor

Raptor Editor is a user-focused extensible WYSIWYG website content editor - check out the [Demo]1.

It is designed to be user and developer friendly

Development Status

The Raptor Editor team is currently undergoing some changes. With more and more client work coming our way, our development team are stretched and we're having to redirect our priorities. We're still here, we're still supporting our licencees and we're expanding the team to match our growth. In the mean time, we just might be a bit slower to fix bugs and introduce new features!

Usage

Instantiating the Raptor editor with no options (zero configuration) results in all buttons and plugins being enabled. This is the quickest and easiest way to see Raptor in action.

<div id="element-to-edit"></div>
<script type="text/javascript" src="raptor.js"></script>
<script type="text/javascript">
    $('#element-to-edit').raptor();
</script>

Learn More

To learn more about how to use Raptor, see: [Raptor Editor]2. The site also contains extensive [documentation]3, and some [examples]4.

Keep up to date on announcements and more by following Raptor editor on Twitter, @RaptorEditor.

License

For license information see the [Raptor Editor license]5 page.

Contributing

See the following links for information on build & contributing to Raptor:

Footnotes

  1. http://www.raptor-editor.com/demo (Raptor Editor Demo)

  2. http://www.raptor-editor.com/ (Download, usage examples and documentation)

  3. http://www.raptor-editor.com/documentation (Raptor documentation)

  4. http://www.raptor-editor.com/demo/docking (Raptor Editor Examples)

  5. http://www.raptor-editor.com/license (Raptor license)

raptor-editor's People

Contributors

bubach avatar faceleg avatar langmans avatar mmrichards avatar netzpirat avatar nikosd avatar petah avatar sebcorbin avatar tristanm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raptor-editor's Issues

Automatic replacement of Textareas

Currently, to make Raptor function correctly on a textarea, one must use at least:

<textarea></textarea>
<script>
    $('textarea').editor({
        replace: true
    });
</script>

Failing to use at least replace: true results in broken behaviour.

Raptor should detect textareas and replace them automatically, and the replace option should be removed.

Latest Version Does Not Work With Forms (data fails to transmit)

I'm testing the latest version of the editor on my forms. Unfortunately, now when I save, the data is no longer passed through as it did last time.

To confirm, I switched back to TinyMCE with the same form, and the data successfully passed.

I know there were some recent changes to how textareas were handled. Could something inadvertently been changed that now adversely impacts form handling and submission?

Uncaught ReferenceError: rangy is not defined , raptor.js:8805

Hi!
I am trying to use raptor, but I get the following error on script loading :
Uncaught ReferenceError: rangy is not defined , raptor.js:8805
That's with jQuery 1.7.2.

By the way is there anything else needed to be included than raptor.js ? no css or anything ? The Install instructions are a bit unclear on this subject.

Editor Seems Slow for Fast Typists

I'm now testing the editor within Joomla, and thus far no conflicts. I am using the latest version of raptor.light.min.js (because I already have jQuery and jQuery UI loaded in my test installation).

One minor quibble - the editor seems to be slow for fairly fast typists like myself. The lag when I type is noticeable (as compared to, say, TinyMCE and CKEditor). This also happens when I test Raptor in the provided download example. My computer is a quad core and I'm using Chrome, which is a fairly fast browser, so I doubt those are the culprits.

Any ideas or suggestions? Thanks!

Insufficient Documentation for Customized Editor Instances

The provided documentation is EXCELLENT - for developers. However, I'm looking for documentation that specifically tells me how to enable each of Raptor's options when I am initiating the editor. I do not want to enable the entire ui block. For example, I want specific edit buttons {H!, H2, etc} as well as the character counter (and I need to pass the counter the desired character limit via PHP variable, as this number will be different based on where the editor is called). It shows in the code documentation as a UI feature - but the documentation shows the jQuery direct calls, and NOT how to call it when initiating the editor.

Sample code (the character counter doesn't work, obviously because I'm not calling it correctly):

// WHERE does length go?!!!
    $('#test').editor({
    autoEnable: true,
    replace: true,
    enableUi: false,
    draggable: false,
    ui: {
        textBold: true,
        textItalic: true,
        textUnderline: true,
        textStrike: true,
        quoteBlock: true,
        fontSizeInc: true,
        fontSizeDec: true,
        listOrdered: true,
        listUnordered: true,
        length: true
    },
    plugins: {
        dock: {
            docked: true,
            dockToElement: true
        },
        placeholder: {
        content: '[Your comment here]'
        }
    }
});

If there is such documentation, I'd greatly appreciate a link. Thanks!

Enter keypress behaviour

Enter keypress behaviour currently broken, and should behave as follows:

  • If cursor is inside a block element
    • If cursor is at the start of a block element, insert options.enter before element and select start of it
    • If cursor is at the end of a block element, insert options.enter after element and select start of it
    • Else break the block element and set cursor to the start of the second element
  • Else insert options.enter at cursor position and select start of it

Editor is using Divs instead of Paragraphs for base elements

I'm doing extensive testing of editors for a project aimed at novelists, and this editor has my attention, very beautiful and I can see how my users would enjoy it, and the Word post features are fantastic (and necessary as you know people will just copy and paste).

However, there is a serious issue with semantics. When I looked at the generated HTML after, say, posting from Word or applying positioning (such as centering). Divs are being used, and that can be an issue, especially in my environment (Joomla) which uses divs extensively for layout.

In addition, semantically speaking, paragraphs should be the default type, not divs. This is also a requirement for our publication standards.

Is there a way to override this so that I can set the paragraph tag as my default block type (like in TinyMCE and CKEditor)? Thanks!

dependency listing/reporting

Hi, it would be nice to have an exact listing on the website on which parts of the jQuery UI that is required for full operation - especially since the UI lib can be built from sizes of only 30kb up to a few hundred kb's.

Also the editor should detect missing features and give sufficient information about it. Right now it kind of works without the interaction part of jQuery UI - but behaves buggy without error or explanation. It was a trial & error run for me to figure out what parts of UI was needed.

Editor wraps everything in <p> tags

Hi, when having the editor tied to a H1-tag it will wrap this text into a P-tag even if it's already a header. It will do this, no matter if I cancel the edit, or if I decide to edit another area it will still add P into the editable H1.

Move Hotkeys into Core

Hotkeys should be integrated with Raptor core, with UI / Plugins able to specify which hotkey combination triggers a given action.

Window resize doesn't update dock spacer

When a window resize leads to a change in the height of the dock, the dock spacer isn't resized as well. This may results in content that is not visible due to the dock is over the content, or that the dock spacer is visible when the dock shrinks.

How to disable a plugin

How can I tell the editor that I don't want a plugin (in my case the $.editor.plugin.emptyElement) to be loaded.

Editor now defaults to German

The latest build defaults to German upon init. I can manually switch the language to English, but I thought you should know.

EDIT: Um... HOW do I set the editor to default to English? I can't seem to find the parameter for it.

MORE INFO: This is REALLY odd - when I set the following parameter, the editor suddenly defaulted to English again:

i18n: true

That never happened with the earlier version... hmm....

Missing translation variable in the statistics

I've noticed that the {{limit}} variable in the translations isn't available and thus the statistics contains the sentence:

Content contains more than null characters and may be truncated

Editor methods unacessible

After editor instantiation (it renders on page) following code:

console.log( element );
console.log( element.getCleanHtml() );

causes following eror:

<...DOM Node representation...>
Uncaught TypeError: Object [object Object] has no method 'getCleanHtml' 

element is jQ-object for editor.

length option not working?

I init the editor with following code, it always shows the limit is 128, instead of 1024 I claimed in the options

<script type='text/javascript'>
    $('#binContent').editor({
            autoEnable: true,
            replace: true,
            enableUi: false,
            draggable: false,
            ui: {
                textBold: true,
                textItalic: true,
                textUnderline: true,
                textStrike: true,
                quoteBlock: true,
                fontSizeInc: true,
                fontSizeDec: true,
                viewSource: true,
                undo: true,
                redo: true,
                alignLeft: true,
                alignCenter: true,
                alignJustify: true,
                alignRight: true,
                textBold: true,
                textItalic: true,
                textUnderline: true,
                textStrike: true,
                textSuper: true,
                textSub: true,
                listUnordered: true,
                listOrdered: true,
                hr: true,
                quoteBlock: true,
                fontSizeInc: true,
                fontSizeDec: true,
                colorPickerBasic: true,
                clearFormatting: true,
                link: true, 
                unlink:true,
            embed: false,
                floatLeft: false, 
                floatNone: false, 
                floatRight: false,
                tagMenu: true,
                i18n: false,
                length: true,
            },
            plugins: {
                dock: {
                    docked: true,
                    dockToElement: true
                },
                placeholder: {
                    content: '[Paste your text here]'
                },
                length:{
                    length:1024
                }
            },
            disabledPlugins: ['unsavedEditWarning'],
            unloadWarning: false
        });
    </script>

Save event should fire after the server responds with success

Save event should fire after the server responds with success.

Currently the edit save method/event fires as soon as the button is pressed, so if the server failed to save the content, the editor will still set the original html to the new content, regardless of the response.

Never mind

EDIT: This wasn't a bug, just bad documentation. I found out how to do it on my own. Request deletion of this issue.

Tag Menu Drop Down Issues

  • Tag menu not updating depending on selection
  • Attempting to change selection's tag does not work as expected

Extra [tag] Element added to POST Array when tagMenu is Enabled

I'm now testing Raptor's behavior in forms, especially the data on submission. So far, it looks like the data is being passed. However, I found a very odd issue when examining the POST contents: an extra field called "tag" was added:

["tag"]=> string(1) "p" ["test"]=> string(29) "Testing Raptor on form submit" 

On a hunch, i turned off tagMenu and resubmitted. The result is what I would expect:

 ["test"]=> string(29) "Testing Raptor on form submit" 

For some reason, tagMenu is adding an extra field to the POST array. It could be the drop-down select that is used, but again, I cannot be sure.

For my purposes, this field would have no impact in the server-side model and would essentially just be discarded, but still it should be noted that there is some impact on POST.

Select option on menu doesn't hide like it should for jQuery UI

This one is a very small issue:

When I enabled the "tagMenu" option, the original drop-down tag selector didn't hide as it should behind the jQuery ui style (which it should); instead, the UI version appeared beneath it. Below is the rendered code, courtesy of Chrome's debug console:

<select autocomplete="off" name="tag" class="ui-editor-tag-select" style="display: none; ">
<option value="na">N/A</option>
<option value="p">Paragraph</option>
<option value="h1">Heading 1</option>
<option value="h2">Heading 2</option>
<option value="h3">Heading 3</option>
</select>

The first line is the problem - it turns out there is a style in use somewhere in my test site that probably is interfering. For this to work as intended, you have to add the CSS !important attribute to make sure this takes precedence. In my Chrome debug console, I made the following change:

<select autocomplete="off" name="tag" class="ui-editor-tag-select" style="display: none !important;"> 

And that fixed the issue. Not sure how/where to fix in the actual source code, though.

Crating an instance withoud the editor path footer

I'm trying to create a very simple implementation where I would like to show only the save button.

I got it almost working but I can't get rid of the path-footer div (classname ui-editor-path).

Is there a way to disable this?

$('#test').editor({
// which var do I need?
});

Conflict with Twitter Bootstrap javascript

This issue was raised in the raptor-editor-rails repository ( PANmedia/raptor-editor-rails#1 ):

In /apps/assets/javascripts/application.js, if I include //= bootstrap, the Raptor Editor UI doesn't show. I don't know what you should do about it, but you might want to mention it in the documentation, or develop a workaround. Took me a while to narrow down the issue.

I can also confirm this. The load order makes no difference and there are no console errors. The gem installed for the Bootstrap is bootstrap-sass.

localization optimizations

I suggest using short versions instead of full english string before the translations as one of many steps towards a smaller code-base. or maybe the localization functions can look up the string in the english array and use corresponding array[number] for selected language?

Unable to build Raptor

Trying to build raptor using the source I pulled from GitHub on OS X 10.6.8 (Snow Leopard). Following the build instructions, I got Phing installed and ran the build command 'phing build'. However, I get the following error:
PHP Parse error: parse error in /Users/mbauer/Documents/development/PANmedia Raptor/classes/TranslationCheckTask.php on line 92

I am probably missing some dependency, though I am not sure what.

length option not working?

I init the editor with following code, it always shows the limit is 128, instead of 1024 I claimed in the options

<script type='text/javascript'>
    $('#binContent').editor({
            autoEnable: true,
            replace: true,
            enableUi: false,
            draggable: false,
            ui: {
                textBold: true,
                textItalic: true,
                textUnderline: true,
                textStrike: true,
                quoteBlock: true,
                fontSizeInc: true,
                fontSizeDec: true,
                viewSource: true,
                undo: true,
                redo: true,
                alignLeft: true,
                alignCenter: true,
                alignJustify: true,
                alignRight: true,
                textBold: true,
                textItalic: true,
                textUnderline: true,
                textStrike: true,
                textSuper: true,
                textSub: true,
                listUnordered: true,
                listOrdered: true,
                hr: true,
                quoteBlock: true,
                fontSizeInc: true,
                fontSizeDec: true,
                colorPickerBasic: true,
                clearFormatting: true,
                link: true, 
                unlink:true,
            embed: false,
                floatLeft: false, 
                floatNone: false, 
                floatRight: false,
                tagMenu: true,
                i18n: false,
                length: true,
            },
            plugins: {
                dock: {
                    docked: true,
                    dockToElement: true
                },
                placeholder: {
                    content: '[Paste your text here]'
                },
                length:{
                    length:1024
                }
            },
            disabledPlugins: ['unsavedEditWarning'],
            unloadWarning: false
        });
    </script>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.