Giter Site home page Giter Site logo

kirby-wysiwyg's People

Contributors

dgdsp avatar jonasdoebertin 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

kirby-wysiwyg's Issues

Issue on save

Hi, Great Plugin!
I don't know if it's the expected behavior, but when you save the page, page is refreshed automatically (reloaded). Before trying this plugin, page updated via $.post & $.get without page reloading and got a friendly green smiley on top right of the viewport. I've tried to hack the wysiwyg.js file but none of my experiments failed. Is there a way to tell the plugin to rebind '.btn-submit' events? Is it a conflit with mediumEditor.js ?

Image tag broke with _ underscore

Hello,
A small bug : it's not possible to add images with '_' in there names, because the converter escape this symbol.
It's probably easy to fix by making a rule to not sanitize text in kirbytags ?

Safari Bug

I'm having an issue in Safari. When I'm attempting to edit a page that has wysiwyg enabled, the browser will franticly refresh. I've looked into the JS file, but can't seem to figure out how to fix.

I was able to recreate the issue in a fresh install of kirby and kriby-wysiwyg.

Kirby 2.2.3, Safari 9.0.3

Support for tables

Hi all,

The wysiwyg editor has lot of options which is great but still lacks support for tables. If I paste some HTML code works fine but then is impossible to edit back that code. See the snapshot below:

screen shot 2016-04-25 at 10 03 51

Would be nice to border the table cells and add some shortcuts to add rows and columns. Would that be very difficult? If you give me some guidance I could do it myself.

Thank you,

Custom buttons selection recognition is off

Custom buttons may not work as expected when selecting content that has been modified with them.

They don't recognize the selected content correctly.

Original Description:

  • marked text does not highlight the mark button
  • unmarking marked text does not work
  • only when marking the whole line, the mark button is highlighted and the text can be unmarked, the mark button stays active though

tested on Safari 8.0.3 (10600.3.18) and Chrome 40.0.2214.115 (64-bit)

kirby-wysiwyg--mark-button--bug--20150223

Doesn't work with images in content

I cannot drag the files from the file list into the content like you can with the default editor. If I instead just insert the image syntax (image: photo1.jpg) then all formatting disappears from the final rendered text and I just get a huge block of text (all html elements are stripped).

Anyone else having this problem and know of a fix?

How to translate button tooltips?

Tooltips come from this file:

/wysiwyg/assets/js/vendor/medium-editor-5.9.0.min.js

// 'heading type 2' for instance:
h2: {
  name: "h2",
  action: "append-h2",
  aria: "header type two",
  tagNames: ["h2"],
  contentDefault: "<b>H2</b>",
  contentFA: '<i class="fa fa-header"><sup>2</sup>'
}

How to translate that?

H1 & H2 always create H5 & H6

I'm having a problem with the H1 and H2 buttons in the editor - no matter how I mess around with the config or blueprint settings, they always give me ##### this and ###### this

I'm having the same issue in several installations of kirby. Anything I can do?

Kirbytag

Hello,
Is there a way to add kirbytags like: (image: myawesomepicture.jpg)?
Thank you!

Please some more installation instructions for non-coders

I copied the folder to the plugins folder but I can't get it to work.
I keep getting the following error message (after I add a wysiwyg field to blueprint): "The wysiwyg field is missing. Please add it to your installed fields or remove it from your blueprint."

Can you extend the installation instructions for dummies?

Also an example of the settings in the config.php file would be handy.

Field initialization runs every time the user hits "Save"

The medium editor is being initialized every time the panel content form is saved. This leads to a large amount of unused instances of the editor and plenty of unnecessary toolbar elements and dynamic CSS rules.

We need to modify the below initialization callback in a way that the initialization runs only when the panel JS application is loaded for the first time. Does this make sense?

(function($) {
    $.fn.wysiwygeditorfield = function() {
        WysiwygEditorField.init(this);
    };
})(jQuery);

Dynamically style Header 1& Header 2 headings

Currently, the headline styles are defined like this:

.wysiwyg-editor h2 {
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 1em;
}

.wysiwyg-editor h3 {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 1em;
}

While this is fine in most cases, users may specify different HTML heading tags to be used instead. To compensate for this, these styles should be injected dynamically.

Remove <style> tag to prevent invisible pasted inline CSS

Hello,

When you paste content from, for exemple, Word, it paste also the inline <style> rules.
This behavior is invisible for the user but it can broke enterly the website CSS.
So, l.245, in the HTMLToMarkdown params, I added 'remove_nodes' => 'style', and I think you should add it to the core, don't you think ?

Schuss,
Pierre

Make "buttons" option settable from blueprints

The buttons configuration option, which determines which buttons will be shown in the editors toolbar should be settable per field from the blueprints to allow for a more flexible usage.

fields:
  mytext:
    label: Medium Editor Field
    type:  medium
    buttons:
      - bold
      - italic
      - ...

Images ?

Is there a way to add image in the text ? I tried to drag image in text area wit Kirby 2.2.3 and this do nothing... Is this function working with previous version of Kirby ?

Kirby cli 2.4: "Invalid Kirby Plugin Type"

The install failed:

$ kirby plugin:install storypioneers/kirby-wysiwyg
Downloading from: https://github.com/storypioneers/kirby-wysiwyg/archive/master.zip


  [RuntimeException]
  Invalid Kirby Plugin Type


plugin:install <path>

formatting: mark text does not work as expected

  • marked text does not highlight the mark button
  • unmarking marked text does not work
  • marking of text is not saved
  • only when marking the whole line, the mark button is highlighted and the text can be unmarked, the mark button stays active though

tested on Safari 8.0.3 (10600.3.18) and Chrome 40.0.2214.115 (64-bit)

kirby-wysiwyg--mark-button--bug--20150223

Anchors broken in 2.2.2

unfortunately the intended behaviour of anchors and anchor previews is broken in 2.2.2.: links are opened directly instead of being intercepted by medium-editor, resulting in a barely usable anchor button.

css: editor theme toolbar

  • toolbar-arrow misplaced, if toolbar has more than one row of buttons
  • toolbar buttons could be smaller (60px => 32px)

Add configuration options

More of the JS editors options need to be settable by the user without modifying the medium.js resource. These options should be avaiable in the projects main config.php file.

  • disableDoubleReturn
  • firstHeader
  • secondHeader
  • buttons

Shift+Enter

Using SHIFT+ENTER to make a line break between lines is replaced with a paragraph break when you save the page.

Problems with "à"

Hi guys, nice job. Wysiwyg is really helpful. I have a problem though, as I'm Swiss Italian I do need to work with accented letters. Unfortunately the "à" seems to have some king of bug, as the result is the one in the attachment:
wysiwygbug

This is what I see the first time I refresh the page, while the second time every "à" just disappears (also from Kirby panel).

Do you think you could fix this? I'm working on a project that could really use your plugin.
Thanks! Sara

Linebreak

Hi,
is there an possibility to integrate an linebreak?
Actually it creates on every break an paragraph.

Cheers

Additional options not working, or not supported, by plugin.

I was just looking to add a "center text" option, and I discovered some preexisting text alignment options that add an appropriate class ('center', 'left', 'right'), presumably to be styled in the front end.

When I add the options to the wysiwyg editor fields, they show up, and as expected when I select text and click on them it add's the class to the element if you're inspecting it. But when I save the page, the classes get thrown out and not saved.

c::set('field.wysiwyg.buttons',array(
  'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'bold', 'italic', 'underline',
  'strikethrough', 'subscript', 'superscript', 'anchor', 'quote', 'pre',
  'orderedlist', 'unorderedlist', 'justifyLeft', 'justifyCenter',  'justifyRight'));

Escapes underscores in filepath

Image names with underscores such as (image: screen_shot.png) renders as:
<figure><img src="localhost/screen\_shot.png" alt=""></figure>
and therefore returns a broken link.

Pasting problems with <div> tags

It seems that whenever clipboard content that includes

tags (and other HTML elements) is pasted into the text area, it's not pasted in as plain text. After a save, HTML has not been stripped out, and a bunch of other formatting errors (such as markdown characters being /escaped) come up.

I see this in wysiwyg.js:

            paste: {
                cleanPastedHTML: true,
                forcePlainText: true,
            },

But neither seem to be happening.

File Upload reverting WYSIWYG field to last saved state.

I have a new content type called Reports with a wysiwyg field. I can create a new Report and fill in the title and wysiwyg fields. However, when I upload a file, it reverts to the last saved state of the wysiwyg field.

Create new Report.
Content: "Hello".
Press Save.
Content: "Goodbye". (Don't press save).
Upload file.
File will upload and content will revert to "Hello". (The last saved state).

Error when saving field within structure field

Hi,

when I am using this plugin within a structure field and try to save the entry I get the following error:

Fatal error: Uncaught exception 'Exception' with message 'Invalid route' in /mysite/panel/app/panel.php on line 240
( ! ) Exception: Invalid route in /mysite/panel/app/panel.php on line 240

Tested with:
Toolkit Version: 2.1.1
Kirby Version: 2.1.1
Panel Version: 2.1.1
v1.1.0 - Maintenance Release

New paragraph

Hello,

I don't really understand how I am able to create a new paragraph. When I hit the return key (alone or with a shift/command/ctrl/alt combinaison), nothing happen. I tried to hit the return key twice but it doesn't work either.

The only way I found was to set disableReturn: false in the js/wysiwyg.js file (line 37).
But I guess this is not the good solution.

Thank you in advance.

German Umlaute

German Umlaute doesn't work.

ü -> ü
ä -> ä
ö -> ö

Wild <span> elements in medium-editor output

Sometimes, when copy and pasting text inside the editor, there are some wild <span> elements being added. As they randomly have line-height and font-size inline styles attached, they might break the pages design.

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.