Giter Club home page Giter Club logo

summernote-text-findnreplace's Introduction

summernote-text-findnreplace

A plugin for the Summernote WYSIWYG editor.

Adds a button to the Toolbar that adds an area to the Toolbar that allows Find and Replace text in the editor.

Here are the functions you can do with this plugin:

  • Find text in the editor area.
  • Selecting text before opening the plugin will copy the selected text into the find field.
  • Selecting text after opening the plugin will replace the selection with text entered in the replace field.
  • Feedback is displayed in the Toolbar area.

summernote-text-findnreplace

Installation

1. Include JS

Include the following code after including Summernote:

<script src="summernote-text-findnreplace.js"></script>
<script src="lang/[language-COUNTRY].js"></script>

2. Supported languages

Supported languages can be found in the lang folder, and should be included after the plugin, then setting the chosen language when initialising Summernote.

3. Summernote options

Finally, customize the Summernote Toolbar.

$(document).ready(function() {
  $('#summernote').summernote({
    toolbar:[
      ['custom',['findnreplace']], // The button
      ['style',['style']],
      ['font',['bold','italic','underline','clear']],
      ['fontname',['fontname']],
      ['color',['color']],
      ['para',['ul','ol','paragraph']],
      ['height',['height']],
      ['table',['table']],
      ['insert',['media','link','hr']],
      ['view',['fullscreen','codeview']],
      ['help',['help']]
    ],
    findnreplace:{
      lang: 'en-US' // Change to your chosen language
    }
  });
});

4. Check out our other Summernote Plugins via our main Github page.

summernote-text-findnreplace's People

Contributors

diemendesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

summernote-text-findnreplace's Issues

The 'en-US.js' file under the lang folder is empy

Hi,

I am trying to add the findnreplace plugin for the summernote library but I am unable to load it properly as the button is not executing any action. I am just trying to understand if the 'en-US.js' file is supposed to be empty or not.

Furthermore, the 'lite.css' file, is not exactly explained where should be in the hierarchy.

  • Index.html
  • ...
    • [www]
      • [js]
        • summernote-text-findnreplace.js
        • ...
      • [css]
        • lite.css
        • ...

I have the index and a folder called 'www' with 'js', 'css' and under 'summernote-text-findnreplace.js' the jquery is mentioning the following:

$('<link/>', { rel: 'stylesheet', type: 'text/css', href: '../summernote-text-findnreplace/css/lite.css' }).appendTo('head');

However, I am not sure how to fit the 'lite.css' file.

Could you please help me setup this addon, as I find it very useful.

Best,

Teo

Searching finds HTML tags and displays them

This find and replace plugin seemed fine until I tested by typing only one letter "a" or "c", etc. It would display HTML tags.
I then realized that any word that matches an HTML tag would be displayed, such as "center" since I centered my text. I can't use this like this, too bad :( - I hope it can be fixed.

See screenshot below for an example:

find-and-replace-bug

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.